kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH v4 0/3] GIC ITS tests
@ 2021-11-19 16:37 Alex Bennée
  2021-11-19 16:37 ` [kvm-unit-tests PATCH v4 1/3] arm64: remove invalid check from its-trigger test Alex Bennée
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Alex Bennée @ 2021-11-19 16:37 UTC (permalink / raw)
  To: kvm
  Cc: qemu-arm, linux-arm-kernel, kvmarm, christoffer.dall, maz,
	Alex Bennée

Hi,

changes since v3:

  - dropped the pending LPI test altogether

Alex Bennée (3):
  arm64: remove invalid check from its-trigger test
  arm64: enable its-migration tests for TCG
  arch-run: do not process ERRATA when running under TCG

 scripts/arch-run.bash |  4 +++-
 arm/gic.c             | 28 ++++++++--------------------
 arm/unittests.cfg     |  3 ---
 3 files changed, 11 insertions(+), 24 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [kvm-unit-tests PATCH v4 1/3] arm64: remove invalid check from its-trigger test
  2021-11-19 16:37 [kvm-unit-tests PATCH v4 0/3] GIC ITS tests Alex Bennée
@ 2021-11-19 16:37 ` Alex Bennée
  2021-11-19 16:37 ` [kvm-unit-tests PATCH v4 2/3] arm64: enable its-migration tests for TCG Alex Bennée
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Alex Bennée @ 2021-11-19 16:37 UTC (permalink / raw)
  To: kvm
  Cc: qemu-arm, linux-arm-kernel, kvmarm, christoffer.dall, maz,
	Alex Bennée, Eric Auger, Shashi Mallela

While an IRQ is not "guaranteed to be visible until an appropriate
invalidation" it doesn't stop the actual implementation delivering it
earlier if it wants to. This is the case for QEMU's TCG and as tests
should only be checking architectural compliance this check is
invalid.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Cc: Shashi Mallela <shashi.mallela@linaro.org>
Message-Id: <20210525172628.2088-2-alex.bennee@linaro.org>

---
v4
  - drop the pending test altogether
v3
  - reflow the comment, drop "willingly do not call" as per Eric's suggestion
---
 arm/gic.c | 28 ++++++++--------------------
 1 file changed, 8 insertions(+), 20 deletions(-)

diff --git a/arm/gic.c b/arm/gic.c
index 98135ef..1b9ad06 100644
--- a/arm/gic.c
+++ b/arm/gic.c
@@ -732,34 +732,22 @@ static void test_its_trigger(void)
 			"dev2/eventid=20 does not trigger any LPI");
 
 	/*
-	 * re-enable the LPI but willingly do not call invall
-	 * so the change in config is not taken into account.
-	 * The LPI should not hit
+	 * re-enable the LPI. While "A change to the LPI configuration
+	 * is not guaranteed to be visible until an appropriate
+	 * invalidation operation has completed" hardware that doesn't
+	 * implement caches may have delivered the event at any point
+	 * after the enabling. Check the LPI has hit by the time the
+	 * invall is done.
 	 */
-	gicv3_lpi_set_config(8195, LPI_PROP_DEFAULT);
-	stats_reset();
-	cpumask_clear(&mask);
-	its_send_int(dev2, 20);
-	wait_for_interrupts(&mask);
-	report(check_acked(&mask, -1, -1),
-			"dev2/eventid=20 still does not trigger any LPI");
-
-	/* Now call the invall and check the LPI hits */
 	stats_reset();
-	cpumask_clear(&mask);
-	cpumask_set_cpu(3, &mask);
+	gicv3_lpi_set_config(8195, LPI_PROP_DEFAULT);
 	its_send_invall(col3);
-	wait_for_interrupts(&mask);
-	report(check_acked(&mask, 0, 8195),
-			"dev2/eventid=20 pending LPI is received");
-
-	stats_reset();
 	cpumask_clear(&mask);
 	cpumask_set_cpu(3, &mask);
 	its_send_int(dev2, 20);
 	wait_for_interrupts(&mask);
 	report(check_acked(&mask, 0, 8195),
-			"dev2/eventid=20 now triggers an LPI");
+			"dev2/eventid=20 triggers an LPI");
 
 	report_prefix_pop();
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [kvm-unit-tests PATCH v4 2/3] arm64: enable its-migration tests for TCG
  2021-11-19 16:37 [kvm-unit-tests PATCH v4 0/3] GIC ITS tests Alex Bennée
  2021-11-19 16:37 ` [kvm-unit-tests PATCH v4 1/3] arm64: remove invalid check from its-trigger test Alex Bennée
@ 2021-11-19 16:37 ` Alex Bennée
  2021-11-19 16:37 ` [kvm-unit-tests PATCH v4 3/3] arch-run: do not process ERRATA when running under TCG Alex Bennée
  2021-11-19 18:32 ` [kvm-unit-tests PATCH v4 0/3] GIC ITS tests Andrew Jones
  3 siblings, 0 replies; 5+ messages in thread
From: Alex Bennée @ 2021-11-19 16:37 UTC (permalink / raw)
  To: kvm
  Cc: qemu-arm, linux-arm-kernel, kvmarm, christoffer.dall, maz,
	Alex Bennée, Eric Auger, Andrew Jones, Shashi Mallela

With the support for TCG emulated GIC we can also test these now.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Cc: Shashi Mallela <shashi.mallela@linaro.org>
Message-Id: <20210525172628.2088-4-alex.bennee@linaro.org>

---
v3
  - add its-migrate-unmapped-collection
---
 arm/unittests.cfg | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arm/unittests.cfg b/arm/unittests.cfg
index f776b66..21474b8 100644
--- a/arm/unittests.cfg
+++ b/arm/unittests.cfg
@@ -194,7 +194,6 @@ arch = arm64
 [its-migration]
 file = gic.flat
 smp = $MAX_SMP
-accel = kvm
 extra_params = -machine gic-version=3 -append 'its-migration'
 groups = its migration
 arch = arm64
@@ -202,7 +201,6 @@ arch = arm64
 [its-pending-migration]
 file = gic.flat
 smp = $MAX_SMP
-accel = kvm
 extra_params = -machine gic-version=3 -append 'its-pending-migration'
 groups = its migration
 arch = arm64
@@ -210,7 +208,6 @@ arch = arm64
 [its-migrate-unmapped-collection]
 file = gic.flat
 smp = $MAX_SMP
-accel = kvm
 extra_params = -machine gic-version=3 -append 'its-migrate-unmapped-collection'
 groups = its migration
 arch = arm64
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [kvm-unit-tests PATCH v4 3/3] arch-run: do not process ERRATA when running under TCG
  2021-11-19 16:37 [kvm-unit-tests PATCH v4 0/3] GIC ITS tests Alex Bennée
  2021-11-19 16:37 ` [kvm-unit-tests PATCH v4 1/3] arm64: remove invalid check from its-trigger test Alex Bennée
  2021-11-19 16:37 ` [kvm-unit-tests PATCH v4 2/3] arm64: enable its-migration tests for TCG Alex Bennée
@ 2021-11-19 16:37 ` Alex Bennée
  2021-11-19 18:32 ` [kvm-unit-tests PATCH v4 0/3] GIC ITS tests Andrew Jones
  3 siblings, 0 replies; 5+ messages in thread
From: Alex Bennée @ 2021-11-19 16:37 UTC (permalink / raw)
  To: kvm
  Cc: qemu-arm, linux-arm-kernel, kvmarm, christoffer.dall, maz,
	Alex Bennée

All the errata checking looks at the current host kernel version. For
TCG runs this is entirely irrelevant as the host kernel has no impact
on the behaviour of the guest. In fact we should set ERRATA_FORCE to
ensure we run those tests as QEMU doesn't attempt to model
non-confirming architectures.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 scripts/arch-run.bash | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
index 43da998..f1f4456 100644
--- a/scripts/arch-run.bash
+++ b/scripts/arch-run.bash
@@ -267,7 +267,9 @@ env_file ()
 
 env_errata ()
 {
-	if [ "$ERRATATXT" ] && [ ! -f "$ERRATATXT" ]; then
+	if [ "$ACCEL" = "tcg" ]; then
+		eval export "ERRATA_FORCE=y"
+	elif [ "$ERRATATXT" ] && [ ! -f "$ERRATATXT" ]; then
 		echo "$ERRATATXT not found. (ERRATATXT=$ERRATATXT)" >&2
 		return 2
 	elif [ "$ERRATATXT" ]; then
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [kvm-unit-tests PATCH v4 0/3] GIC ITS tests
  2021-11-19 16:37 [kvm-unit-tests PATCH v4 0/3] GIC ITS tests Alex Bennée
                   ` (2 preceding siblings ...)
  2021-11-19 16:37 ` [kvm-unit-tests PATCH v4 3/3] arch-run: do not process ERRATA when running under TCG Alex Bennée
@ 2021-11-19 18:32 ` Andrew Jones
  3 siblings, 0 replies; 5+ messages in thread
From: Andrew Jones @ 2021-11-19 18:32 UTC (permalink / raw)
  To: Alex Bennée; +Cc: kvm, maz, qemu-arm, kvmarm, linux-arm-kernel

Hi Alex,

Please CC me on the full series. I'm not always able to keep up
on the lists. I see there's another series too that you've
posted. I'll look next week.

Thanks,
drew

On Fri, Nov 19, 2021 at 04:37:07PM +0000, Alex Bennée wrote:
> Hi,
> 
> changes since v3:
> 
>   - dropped the pending LPI test altogether
> 
> Alex Bennée (3):
>   arm64: remove invalid check from its-trigger test
>   arm64: enable its-migration tests for TCG
>   arch-run: do not process ERRATA when running under TCG
> 
>  scripts/arch-run.bash |  4 +++-
>  arm/gic.c             | 28 ++++++++--------------------
>  arm/unittests.cfg     |  3 ---
>  3 files changed, 11 insertions(+), 24 deletions(-)
> 
> -- 
> 2.30.2
> 
> _______________________________________________
> kvmarm mailing list
> kvmarm@lists.cs.columbia.edu
> https://lists.cs.columbia.edu/mailman/listinfo/kvmarm


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-19 18:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19 16:37 [kvm-unit-tests PATCH v4 0/3] GIC ITS tests Alex Bennée
2021-11-19 16:37 ` [kvm-unit-tests PATCH v4 1/3] arm64: remove invalid check from its-trigger test Alex Bennée
2021-11-19 16:37 ` [kvm-unit-tests PATCH v4 2/3] arm64: enable its-migration tests for TCG Alex Bennée
2021-11-19 16:37 ` [kvm-unit-tests PATCH v4 3/3] arch-run: do not process ERRATA when running under TCG Alex Bennée
2021-11-19 18:32 ` [kvm-unit-tests PATCH v4 0/3] GIC ITS tests Andrew Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).