mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
qemu: Add IOMMU device alias to command line
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>
This commit is contained in:
parent
0ee76b1dfa
commit
5105409614
@ -6441,6 +6441,7 @@ qemuBuildIOMMUCommandLine(virCommand *cmd,
|
||||
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),
|
||||
@ -6457,6 +6458,7 @@ qemuBuildIOMMUCommandLine(virCommand *cmd,
|
||||
case VIR_DOMAIN_IOMMU_MODEL_VIRTIO:
|
||||
if (virJSONValueObjectAdd(&props,
|
||||
"s:driver", "virtio-iommu",
|
||||
"s:id", iommu->info.alias,
|
||||
NULL) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
|
||||
-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
|
||||
|
@ -27,7 +27,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
|
||||
-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
|
||||
|
@ -27,7 +27,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
|
||||
-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
|
||||
|
@ -27,7 +27,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
|
||||
-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
|
||||
|
@ -27,7 +27,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
|
||||
-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
|
||||
|
@ -30,7 +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"}' \
|
||||
-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
|
||||
|
@ -26,7 +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"}' \
|
||||
-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
|
||||
|
Loading…
x
Reference in New Issue
Block a user