qemu: format dma-translation on intel-iommu command line

Add dma-translation attribute to qemu command line if specified in
domain conf.

Signed-off-by: Sandesh Patel <sandesh.patel@nutanix.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Sandesh Patel 2024-08-07 07:37:51 +00:00 committed by Michal Privoznik
parent 6866f958c1
commit 6d7dd09e8a
2 changed files with 2 additions and 1 deletions

View File

@ -6209,6 +6209,7 @@ qemuBuildIOMMUCommandLine(virCommand *cmd,
"S:eim", qemuOnOffAuto(iommu->eim),
"T:device-iotlb", iommu->iotlb,
"z:aw-bits", iommu->aw_bits,
"T:dma-translation", iommu->dma_translation,
NULL) < 0)
return -1;

View File

@ -26,7 +26,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
-device '{"driver":"intel-iommu","id":"iommu0","intremap":"on"}' \
-device '{"driver":"intel-iommu","id":"iommu0","intremap":"on","dma-translation":false}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-global ICH9-LPC.noreboot=off \
-watchdog-action reset \