https://bugzilla.redhat.com/show_bug.cgi?id=1575526
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/qemu/qemu_command.c | 4 +++-
tests/qemuxml2argvdata/iommu-smmuv3.aarch64-latest.args | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index a11b6d40da..59dc134785 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6968,7 +6968,8 @@ qemuBuildIOMMUCommandLine(virCommandPtr cmd,
}
case VIR_DOMAIN_IOMMU_MODEL_SMMUV3:
- break;
+ /* There is no -device for SMMUv3, so nothing to be done here */
+ return 0;
case VIR_DOMAIN_IOMMU_MODEL_LAST:
default:
@@ -7617,6 +7618,7 @@ qemuBuildMachineCommandLine(virCommandPtr cmd,
break;
case VIR_DOMAIN_IOMMU_MODEL_SMMUV3:
+ virBufferAddLit(&buf, ",iommu=smmuv3");
break;
case VIR_DOMAIN_IOMMU_MODEL_LAST:
diff --git a/tests/qemuxml2argvdata/iommu-smmuv3.aarch64-latest.args
b/tests/qemuxml2argvdata/iommu-smmuv3.aarch64-latest.args
index a96669078b..3d4bf3f0d6 100644
--- a/tests/qemuxml2argvdata/iommu-smmuv3.aarch64-latest.args
+++ b/tests/qemuxml2argvdata/iommu-smmuv3.aarch64-latest.args
@@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
-S \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-guest/master-key.aes \
--machine virt,accel=tcg,usb=off,dump-guest-core=off,gic-version=2 \
+-machine virt,accel=tcg,usb=off,dump-guest-core=off,gic-version=2,iommu=smmuv3 \
-m 1024 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
--
2.21.0