From 329a68029703c67678ddb722f68186cdaeb71fb8 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Wed, 18 Sep 2019 11:36:18 +0200 Subject: [PATCH] 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 --- src/qemu/qemu_domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- GitLab