]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Mark NVMe disks as 'need VFIO'
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 18 Sep 2019 09:36:18 +0000 (11:36 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 17 Dec 2019 09:04:44 +0000 (10:04 +0100)
There are couple of places where a domain with a VFIO device gets
special treatment: in CGroups when enabling/disabling access to
/dev/vfio/vfio, and when creating/removing nodes in domain mount
namespace. Well, a NVMe disk is a VFIO device too. Fortunately,
we have this qemuDomainNeedsVFIO() function which is the only
place that needs adjustment.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
src/qemu/qemu_domain.c

index 2e09a97cbc50f59608ac5ea3b5745935c690e483..189f10cfd1a63ea46fd9422de6838be4eaa23811 100644 (file)
@@ -13826,7 +13826,8 @@ bool
 qemuDomainNeedsVFIO(const virDomainDef *def)
 {
     return virDomainDefHasVFIOHostdev(def) ||
-        virDomainDefHasMdevHostdev(def);
+        virDomainDefHasMdevHostdev(def) ||
+        virDomainDefHasNVMeDisk(def);
 }