]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu_cgroup: Teardown Cgroup for more host device types
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 17 Sep 2019 08:39:00 +0000 (10:39 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 21 Oct 2019 11:50:24 +0000 (13:50 +0200)
Since its introduction in v1.0.5-rc1-19-g6e13860cb4 the
qemuTeardownHostdevCgroup() does nothing unless the passed
hostdev is a PCI device with VFIO backend. This seems
unnecessary.

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

index b0e1bcab767ec532e2304bc0623698f87b526bee..f8bb2701175bfa7e4c2199f29149b12a68c21689 100644 (file)
@@ -405,16 +405,10 @@ qemuTeardownHostdevCgroup(virDomainObjPtr vm,
     size_t i, npaths = 0;
     int rv, ret = -1;
 
-    /* currently this only does something for PCI devices using vfio
-     * for device assignment, but it is called for *all* hostdev
-     * devices.
-     */
-
     if (!virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_DEVICES))
         return 0;
 
-    if (virHostdevIsVFIODevice(dev) &&
-        qemuDomainGetHostdevPath(vm->def, dev, true,
+    if (qemuDomainGetHostdevPath(vm->def, dev, true,
                                  &npaths, &path, NULL) < 0)
         goto cleanup;