]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Format IOMMU devices after controllers
authorNathan Chen <nathanc@nvidia.com>
Thu, 20 Nov 2025 01:42:42 +0000 (17:42 -0800)
committerJán Tomko <jtomko@redhat.com>
Thu, 20 Nov 2025 21:56:25 +0000 (22:56 +0100)
Format qemu arguments for IOMMU devices after
controllers as the multi-SMMUv3 model associates
SMMUv3 devices with hostdevs by plugging them
into the same controller upstream.

Signed-off-by: Nathan Chen <nathanc@nvidia.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_command.c

index d5a4201e129e629dba46ea0c8f64127eabe5f427..84a3abcfa57efd85d2237700d985b9333688482c 100644 (file)
@@ -10821,15 +10821,15 @@ qemuBuildCommandLine(virDomainObj *vm,
     if (qemuBuildBootCommandLine(cmd, def) < 0)
         return NULL;
 
-    if (qemuBuildIOMMUCommandLine(cmd, def, qemuCaps) < 0)
-        return NULL;
-
     if (qemuBuildGlobalControllerCommandLine(cmd, def) < 0)
         return NULL;
 
     if (qemuBuildControllersCommandLine(cmd, def, qemuCaps) < 0)
         return NULL;
 
+    if (qemuBuildIOMMUCommandLine(cmd, def, qemuCaps) < 0)
+        return NULL;
+
     if (qemuBuildMemoryDeviceCommandLine(cmd, cfg, def, priv) < 0)
         return NULL;