[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH kvm-unit-tests] fixup! arm/arm64: ITS: pending table migration te
From: |
Andrew Jones |
Subject: |
[PATCH kvm-unit-tests] fixup! arm/arm64: ITS: pending table migration test |
Date: |
Thu, 2 Apr 2020 20:01:48 +0200 |
[ Without the fix this test would hang, as timeouts don't work with
the migration scripts (yet). Use errata to skip instead of hang. ]
Signed-off-by: Andrew Jones <address@hidden>
---
arm/gic.c | 18 ++++++++++++++++--
errata.txt | 1 +
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/arm/gic.c b/arm/gic.c
index ddf0f9d09b14..c0781f8c2c80 100644
--- a/arm/gic.c
+++ b/arm/gic.c
@@ -12,6 +12,7 @@
* This work is licensed under the terms of the GNU LGPL, version 2.
*/
#include <libcflat.h>
+#include <errata.h>
#include <asm/setup.h>
#include <asm/processor.h>
#include <asm/delay.h>
@@ -812,13 +813,23 @@ static void test_its_migration(void)
check_lpi_stats("dev7/eventid=255 triggers LPI 8196 on PE #2 after
migration");
}
+#define ERRATA_UNMAPPED_COLLECTIONS "ERRATA_8c58be34494b"
+
static void test_migrate_unmapped_collection(void)
{
- struct its_collection *col;
- struct its_device *dev2, *dev7;
+ struct its_collection *col = NULL;
+ struct its_device *dev2 = NULL, *dev7 = NULL;
+ bool test_skipped = false;
int pe0 = 0;
u8 config;
+ if (!errata(ERRATA_UNMAPPED_COLLECTIONS)) {
+ report_skip("Skipping test, as this test hangs without the fix.
"
+ "Set %s=y to enable.", ERRATA_UNMAPPED_COLLECTIONS);
+ test_skipped = true;
+ goto do_migrate;
+ }
+
if (its_setup1())
return;
@@ -830,9 +841,12 @@ static void test_migrate_unmapped_collection(void)
its_send_mapti(dev2, 8192, 0, col);
gicv3_lpi_set_config(8192, LPI_PROP_DEFAULT);
+do_migrate:
puts("Now migrate the VM, then press a key to continue...\n");
(void)getchar();
report_info("Migration complete");
+ if (test_skipped)
+ return;
/* on the destination, map the collection */
its_send_mapc(col, true);
diff --git a/errata.txt b/errata.txt
index 7d6abc2a7bf6..b66afaa9c079 100644
--- a/errata.txt
+++ b/errata.txt
@@ -5,4 +5,5 @@
9e3f7a296940 : 4.9 : arm64: KVM: pmu: Fix AArch32
cycle counter access
7b6b46311a85 : 4.11 : KVM: arm/arm64: Emulate the
EL1 phys timer registers
6c7a5dce22b3 : 4.12 : KVM: arm/arm64: fix races in
kvm_psci_vcpu_on
+8c58be34494b : 5.6 : KVM: arm/arm64: vgic-its:
Fix restoration of unmapped collections
#---------------:-------------------------------:---------------------------------------------------
--
2.25.1
- [kvm-unit-tests PATCH v8 04/13] arm/arm64: gicv3: Add some re-distributor defines, (continued)
- [kvm-unit-tests PATCH v8 04/13] arm/arm64: gicv3: Add some re-distributor defines, Eric Auger, 2020/04/02
- [kvm-unit-tests PATCH v8 05/13] arm/arm64: gicv3: Set the LPI config and pending tables, Eric Auger, 2020/04/02
- [kvm-unit-tests PATCH v8 06/13] arm/arm64: ITS: Introspection tests, Eric Auger, 2020/04/02
- [kvm-unit-tests PATCH v8 07/13] arm/arm64: ITS: its_enable_defaults, Eric Auger, 2020/04/02
- [kvm-unit-tests PATCH v8 08/13] arm/arm64: ITS: Device and collection Initialization, Eric Auger, 2020/04/02
- [kvm-unit-tests PATCH v8 10/13] arm/arm64: ITS: INT functional tests, Eric Auger, 2020/04/02
- [kvm-unit-tests PATCH v8 09/13] arm/arm64: ITS: Commands, Eric Auger, 2020/04/02
- [kvm-unit-tests PATCH v8 11/13] arm/run: Allow Migration tests, Eric Auger, 2020/04/02
- [kvm-unit-tests PATCH v8 12/13] arm/arm64: ITS: migration tests, Eric Auger, 2020/04/02
- [kvm-unit-tests PATCH v8 13/13] arm/arm64: ITS: pending table migration test, Eric Auger, 2020/04/02
- [PATCH kvm-unit-tests] fixup! arm/arm64: ITS: pending table migration test,
Andrew Jones <=