All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/qtest/iommu-smmuv3-test: Skip if no TCG GICv3 device present
@ 2026-05-07 14:48 Peter Maydell
  2026-05-07 14:53 ` Fabiano Rosas
  2026-05-07 16:27 ` Eric Auger
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Maydell @ 2026-05-07 14:48 UTC (permalink / raw)
  To: qemu-arm, qemu-devel
  Cc: qemu-stable, Eric Auger, Fabiano Rosas, Laurent Vivier,
	Paolo Bonzini

On a KVM-only (--disable-tcg) build, the iommu-smmuv3 qtest fails:

qemu-system-aarch64: QTest does not support GICv3 emulation
Broken pipe
../../tests/qtest/libqtest.c:201: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0)

This is because the test runs the virt board with the qtest
accelerator and gic-version=3.  In the virt board this selects the
TCG (emulated) GICv3, but in a --disable-tcg build we don't compile
that device, only the KVM GICv3 (which isn't usable with qtest).

Add a check to the test so we skip it if the arm-gicv3 device isn't
in the QEMU binary.

Cc: qemu-stable@nongnu.org
Fixes: d8d19c31b220142641 ("tests/qtest: Add SMMUv3 bare-metal test using iommu-testdev")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
Looks like our CI compile-tests the --disable-tcg build but doesn't
try to run "make check" on it.
---
 tests/qtest/iommu-smmuv3-test.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/qtest/iommu-smmuv3-test.c b/tests/qtest/iommu-smmuv3-test.c
index dae9821b92..708fae5fd3 100644
--- a/tests/qtest/iommu-smmuv3-test.c
+++ b/tests/qtest/iommu-smmuv3-test.c
@@ -64,6 +64,11 @@ static void run_smmuv3_translation(const QSMMUTestConfig *cfg)
         g_test_skip("virt machine not available");
         return;
     }
+    if (!qtest_has_device("arm-gicv3")) {
+        /* This can happen for a KVM-only build: qtest uses the TCG GICv3 */
+        g_test_skip("gicv3 not available");
+        return;
+    }
 
     /* Initialize QEMU environment for SMMU testing */
     qts = qtest_init("-machine virt,acpi=off,gic-version=3,iommu=smmuv3 "
-- 
2.43.0



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

* Re: [PATCH] tests/qtest/iommu-smmuv3-test: Skip if no TCG GICv3 device present
  2026-05-07 14:48 [PATCH] tests/qtest/iommu-smmuv3-test: Skip if no TCG GICv3 device present Peter Maydell
@ 2026-05-07 14:53 ` Fabiano Rosas
  2026-05-07 16:27 ` Eric Auger
  1 sibling, 0 replies; 3+ messages in thread
From: Fabiano Rosas @ 2026-05-07 14:53 UTC (permalink / raw)
  To: Peter Maydell, qemu-arm, qemu-devel
  Cc: qemu-stable, Eric Auger, Laurent Vivier, Paolo Bonzini

Peter Maydell <peter.maydell@linaro.org> writes:

> On a KVM-only (--disable-tcg) build, the iommu-smmuv3 qtest fails:
>
> qemu-system-aarch64: QTest does not support GICv3 emulation
> Broken pipe
> ../../tests/qtest/libqtest.c:201: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0)
>
> This is because the test runs the virt board with the qtest
> accelerator and gic-version=3.  In the virt board this selects the
> TCG (emulated) GICv3, but in a --disable-tcg build we don't compile
> that device, only the KVM GICv3 (which isn't usable with qtest).
>
> Add a check to the test so we skip it if the arm-gicv3 device isn't
> in the QEMU binary.
>
> Cc: qemu-stable@nongnu.org
> Fixes: d8d19c31b220142641 ("tests/qtest: Add SMMUv3 bare-metal test using iommu-testdev")
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Looks like our CI compile-tests the --disable-tcg build but doesn't
> try to run "make check" on it.
> ---
>  tests/qtest/iommu-smmuv3-test.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/tests/qtest/iommu-smmuv3-test.c b/tests/qtest/iommu-smmuv3-test.c
> index dae9821b92..708fae5fd3 100644
> --- a/tests/qtest/iommu-smmuv3-test.c
> +++ b/tests/qtest/iommu-smmuv3-test.c
> @@ -64,6 +64,11 @@ static void run_smmuv3_translation(const QSMMUTestConfig *cfg)
>          g_test_skip("virt machine not available");
>          return;
>      }
> +    if (!qtest_has_device("arm-gicv3")) {
> +        /* This can happen for a KVM-only build: qtest uses the TCG GICv3 */
> +        g_test_skip("gicv3 not available");
> +        return;
> +    }
>  
>      /* Initialize QEMU environment for SMMU testing */
>      qts = qtest_init("-machine virt,acpi=off,gic-version=3,iommu=smmuv3 "

Reviewed-by: Fabiano Rosas <farosas@suse.de>


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

* Re: [PATCH] tests/qtest/iommu-smmuv3-test: Skip if no TCG GICv3 device present
  2026-05-07 14:48 [PATCH] tests/qtest/iommu-smmuv3-test: Skip if no TCG GICv3 device present Peter Maydell
  2026-05-07 14:53 ` Fabiano Rosas
@ 2026-05-07 16:27 ` Eric Auger
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Auger @ 2026-05-07 16:27 UTC (permalink / raw)
  To: Peter Maydell, qemu-arm, qemu-devel
  Cc: qemu-stable, Fabiano Rosas, Laurent Vivier, Paolo Bonzini

Hi Peter,

On 5/7/26 4:48 PM, Peter Maydell wrote:
> On a KVM-only (--disable-tcg) build, the iommu-smmuv3 qtest fails:
>
> qemu-system-aarch64: QTest does not support GICv3 emulation
> Broken pipe
> ../../tests/qtest/libqtest.c:201: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0)
>
> This is because the test runs the virt board with the qtest
> accelerator and gic-version=3.  In the virt board this selects the
> TCG (emulated) GICv3, but in a --disable-tcg build we don't compile
> that device, only the KVM GICv3 (which isn't usable with qtest).
>
> Add a check to the test so we skip it if the arm-gicv3 device isn't
> in the QEMU binary.
>
> Cc: qemu-stable@nongnu.org
> Fixes: d8d19c31b220142641 ("tests/qtest: Add SMMUv3 bare-metal test using iommu-testdev")
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>

Thanks!

Eric
> ---
> Looks like our CI compile-tests the --disable-tcg build but doesn't
> try to run "make check" on it.
> ---
>  tests/qtest/iommu-smmuv3-test.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/tests/qtest/iommu-smmuv3-test.c b/tests/qtest/iommu-smmuv3-test.c
> index dae9821b92..708fae5fd3 100644
> --- a/tests/qtest/iommu-smmuv3-test.c
> +++ b/tests/qtest/iommu-smmuv3-test.c
> @@ -64,6 +64,11 @@ static void run_smmuv3_translation(const QSMMUTestConfig *cfg)
>          g_test_skip("virt machine not available");
>          return;
>      }
> +    if (!qtest_has_device("arm-gicv3")) {
> +        /* This can happen for a KVM-only build: qtest uses the TCG GICv3 */
> +        g_test_skip("gicv3 not available");
> +        return;
> +    }
>  
>      /* Initialize QEMU environment for SMMU testing */
>      qts = qtest_init("-machine virt,acpi=off,gic-version=3,iommu=smmuv3 "



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

end of thread, other threads:[~2026-05-07 16:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07 14:48 [PATCH] tests/qtest/iommu-smmuv3-test: Skip if no TCG GICv3 device present Peter Maydell
2026-05-07 14:53 ` Fabiano Rosas
2026-05-07 16:27 ` Eric Auger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.