• J
    qemu: Restore label before reattach device to host · 409de00e
    John Ferlan 提交于
    When a hostdev is attached to the guest (and removed from the host),
    the order of operations is call qemuHostdevPreparePCIDevices to remove
    the device from the host, call qemuSetupHostdevCgroup to setup the cgroups,
    and virSecurityManagerSetHostdevLabel to set the labels.
    
    When the device is removed from the guest, the code didn't use the
    reverse order leading to possible issues (especially if the path to
    the device no longer exists). This patch will move the call to
    virSecurityManagerRestoreHostdevLabel to prior to reattaching the
    device to the host.
    409de00e
qemu_hotplug.c 144.6 KB