qemu: Generate command line for virtio-iommu

https://bugzilla.redhat.com/show_bug.cgi?id=1653327

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Andrea Bolognani 2021-09-24 19:29:37 +02:00
parent e015606984
commit 19734c3050
3 changed files with 14 additions and 0 deletions

View File

@ -6452,6 +6452,18 @@ qemuBuildIOMMUCommandLine(virCommand *cmd,
return 0;
case VIR_DOMAIN_IOMMU_MODEL_VIRTIO:
if (virJSONValueObjectAdd(&props,
"s:driver", "virtio-iommu",
NULL) < 0) {
return -1;
}
if (qemuBuildDeviceAddressProps(props, def, &iommu->info) < 0)
return -1;
if (qemuBuildDeviceCommandlineFromJSON(cmd, props, def, qemuCaps) < 0)
return -1;
return 0;
case VIR_DOMAIN_IOMMU_MODEL_SMMUV3:

View File

@ -30,6 +30,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
-device '{"driver":"virtio-iommu","bus":"pcie.0","addr":"0x1"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -26,6 +26,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
-device '{"driver":"virtio-iommu","bus":"pcie.0","addr":"0x1"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on