File kvm-qemu-no-hot-unplug-for-certain-devices.patch of Package kvm.853

Index: qemu-kvm-0.14.0/hw/acpi_piix4.c
===================================================================
--- qemu-kvm-0.14.0.orig/hw/acpi_piix4.c
+++ qemu-kvm-0.14.0/hw/acpi_piix4.c
@@ -605,11 +605,13 @@ static void pciej_write(void *opaque, ui
     BusState *bus = opaque;
     DeviceState *qdev, *next;
     PCIDevice *dev;
+    PCIDeviceInfo *info;
     int slot = ffs(val) - 1;
 
     QLIST_FOREACH_SAFE(qdev, &bus->children, sibling, next) {
         dev = DO_UPCAST(PCIDevice, qdev, qdev);
-        if (PCI_SLOT(dev->devfn) == slot) {
+        info = container_of(qdev->info, PCIDeviceInfo, qdev);
+        if (PCI_SLOT(dev->devfn) == slot && !info->no_hotplug) {
             qdev_free(qdev);
         }
     }