]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: format dma-translation on intel-iommu command line
authorSandesh Patel <sandesh.patel@nutanix.com>
Wed, 7 Aug 2024 07:37:51 +0000 (07:37 +0000)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 9 Aug 2024 08:05:56 +0000 (10:05 +0200)
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>
src/qemu/qemu_command.c
tests/qemuxmlconfdata/intel-iommu-dma-translation.x86_64-latest.args

index f15e6bda1e6cfe6bbf696e059bc345ef26855178..28914c9c346a3ffe1fa30924540ae27ab696eb76 100644 (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;
 
index 41f30d7fdcc43fadf2207b388481be931be7ff9b..cc7f819f5cc807097c2f0f066ac5cfce5255d26d 100644 (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 \