Note that we can only do this for intel-iommu and virtio-iommu,
which are configured using -device; smmuv3 is configured using
a machine type property, so there's no room on the command line
for an alias in that case.
https://bugzilla.redhat.com/show_bug.cgi?id=
2108483
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
case VIR_DOMAIN_IOMMU_MODEL_INTEL:
if (virJSONValueObjectAdd(&props,
"s:driver", "intel-iommu",
+ "s:id", iommu->info.alias,
"S:intremap", qemuOnOffAuto(iommu->intremap),
"T:caching-mode", iommu->caching_mode,
"S:eim", qemuOnOffAuto(iommu->eim),
case VIR_DOMAIN_IOMMU_MODEL_VIRTIO:
if (virJSONValueObjectAdd(&props,
"s:driver", "virtio-iommu",
+ "s:id", iommu->info.alias,
NULL) < 0) {
return -1;
}
-no-shutdown \
-no-acpi \
-boot strict=on \
--device '{"driver":"intel-iommu","intremap":"on","aw-bits":48}' \
+-device '{"driver":"intel-iommu","id":"iommu0","intremap":"on","aw-bits":48}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
-no-shutdown \
-no-acpi \
-boot strict=on \
--device '{"driver":"intel-iommu","intremap":"on","caching-mode":true}' \
+-device '{"driver":"intel-iommu","id":"iommu0","intremap":"on","caching-mode":true}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
-no-shutdown \
-no-acpi \
-boot strict=on \
--device '{"driver":"intel-iommu","intremap":"on","device-iotlb":true}' \
+-device '{"driver":"intel-iommu","id":"iommu0","intremap":"on","device-iotlb":true}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
-no-shutdown \
-no-acpi \
-boot strict=on \
--device '{"driver":"intel-iommu","intremap":"on","eim":"on"}' \
+-device '{"driver":"intel-iommu","id":"iommu0","intremap":"on","eim":"on"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
-no-shutdown \
-no-acpi \
-boot strict=on \
--device '{"driver":"intel-iommu"}' \
+-device '{"driver":"intel-iommu","id":"iommu0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
-rtc base=utc \
-no-shutdown \
-boot strict=on \
--device '{"driver":"virtio-iommu","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"virtio-iommu","id":"iommu0","bus":"pcie.0","addr":"0x1"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
-rtc base=utc \
-no-shutdown \
-boot strict=on \
--device '{"driver":"virtio-iommu","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"virtio-iommu","id":"iommu0","bus":"pcie.0","addr":"0x1"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on