@samitouri / QOSamiQemu / commits / 0129c62650

tests/qtest/iommu-smmuv3-test: Skip if no TCG GICv3 device present

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: Fabiano Rosas <farosas@suse.de> Reviewed-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>

Peter Maydell committed May 7, 2026 at 15:48 UTC 0129c626503c6d7220848a1f944a8f8e033ceaf9
1 file changed +5
tests/qtest/iommu-smmuv3-test.c
+5
@@ -64,6 +64,11 @@ static void run_smmuv3_translation(const QSMMUTestConfig *cfg)
64 g_test_skip("virt machine not available");
65 return;
66 }
67 + if (!qtest_has_device("arm-gicv3")) {
68 + /* This can happen for a KVM-only build: qtest uses the TCG GICv3 */
69 + g_test_skip("gicv3 not available");
70 + return;
71 + }
72
73 /* Initialize QEMU environment for SMMU testing */
74 qts = qtest_init("-machine virt,acpi=off,gic-version=3,iommu=smmuv3 "