When the hostdev managed=true, the VFIO devices are reattached
to the host driver before coming to qemuTeardownHostdevCgroup().
So, the /dev/vfio/<iommu> path would not exist. We ignore the
EACCES error here.
Signed-off-by: Kothapally Madhu Pavan <kmp(a)linux.vnet.ibm.com>
---
src/qemu/qemu_cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index c76d585..2850346 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -427,7 +427,7 @@ qemuTeardownHostdevCgroup(virDomainObjPtr vm,
VIR_DEBUG("Cgroup deny %s for PCI device assignment", path);
rv = virCgroupDenyDevicePath(priv->cgroup, path,
- VIR_CGROUP_DEVICE_RWM, false);
+ VIR_CGROUP_DEVICE_RWM, dev->managed);
virDomainAuditCgroupPath(vm, priv->cgroup,
"deny", path, "rwm", rv ==
0);
if (rv < 0)