From: Michal Privoznik Date: Wed, 18 Sep 2019 09:36:18 +0000 (+0200) Subject: qemu: Mark NVMe disks as 'need VFIO' X-Git-Tag: v6.0.0-rc1~243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=329a68029703c67678ddb722f68186cdaeb71fb8;p=thirdparty%2Flibvirt.git qemu: Mark NVMe disks as 'need VFIO' 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 Reviewed-by: Cole Robinson --- diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 2e09a97cbc..189f10cfd1 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -13826,7 +13826,8 @@ bool qemuDomainNeedsVFIO(const virDomainDef *def) { return virDomainDefHasVFIOHostdev(def) || - virDomainDefHasMdevHostdev(def); + virDomainDefHasMdevHostdev(def) || + virDomainDefHasNVMeDisk(def); }