]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Format SMMUv3 IOMMU
authorAndrea Bolognani <abologna@redhat.com>
Tue, 28 May 2019 12:18:15 +0000 (14:18 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 3 Jun 2019 15:40:57 +0000 (17:40 +0200)
https://bugzilla.redhat.com/show_bug.cgi?id=1575526

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_command.c
tests/qemuxml2argvdata/iommu-smmuv3.aarch64-latest.args

index a11b6d40da071b9c7d875b46fe6b39175608045f..59dc13478508bdd44c4949e714489760c6072101 100644 (file)
@@ -6968,7 +6968,8 @@ qemuBuildIOMMUCommandLine(virCommandPtr cmd,
     }
 
     case VIR_DOMAIN_IOMMU_MODEL_SMMUV3:
-        break;
+        /* There is no -device for SMMUv3, so nothing to be done here */
+        return 0;
 
     case VIR_DOMAIN_IOMMU_MODEL_LAST:
     default:
@@ -7617,6 +7618,7 @@ qemuBuildMachineCommandLine(virCommandPtr cmd,
             break;
 
         case VIR_DOMAIN_IOMMU_MODEL_SMMUV3:
+            virBufferAddLit(&buf, ",iommu=smmuv3");
             break;
 
         case VIR_DOMAIN_IOMMU_MODEL_LAST:
index a96669078ba4c1d910f79686e6e326d93bf06ceb..3d4bf3f0d6dd7929ce661f54ab0a015c00b37060 100644 (file)
@@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
 -S \
 -object secret,id=masterKey0,format=raw,\
 file=/tmp/lib/domain--1-guest/master-key.aes \
--machine virt,accel=tcg,usb=off,dump-guest-core=off,gic-version=2 \
+-machine virt,accel=tcg,usb=off,dump-guest-core=off,gic-version=2,iommu=smmuv3 \
 -m 1024 \
 -overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \