aboutsummaryrefslogtreecommitdiff
path: root/hw/pci
diff options
context:
space:
mode:
authorJens Freimann <jfreimann@redhat.com>2019-10-29 12:48:57 +0100
committerMichael S. Tsirkin <mst@redhat.com>2019-10-29 18:55:26 -0400
commita99c4da9fc2a39847cfebbc0c6802ee122dcca39 (patch)
tree5e1653b62c77ef5ee261635c7a0b587acebd9cff /hw/pci
parent4f5b6a05a4e76892d8d03838a36aca735e9bcefb (diff)
downloadqemu-a99c4da9fc2a39847cfebbc0c6802ee122dcca39.zip
qemu-a99c4da9fc2a39847cfebbc0c6802ee122dcca39.tar.gz
qemu-a99c4da9fc2a39847cfebbc0c6802ee122dcca39.tar.bz2
pci: mark devices partially unplugged
Only the guest unplug request was triggered. This is needed for the failover feature. In case of a failed migration we need to plug the device back to the guest. Signed-off-by: Jens Freimann <jfreimann@redhat.com> Message-Id: <20191029114905.6856-4-jfreimann@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci')
-rw-r--r--hw/pci/pcie.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index a6beb56..19363ff 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -456,6 +456,9 @@ static void pcie_unplug_device(PCIBus *bus, PCIDevice *dev, void *opaque)
{
HotplugHandler *hotplug_ctrl = qdev_get_hotplug_handler(DEVICE(dev));
+ if (dev->partially_hotplugged) {
+ return;
+ }
hotplug_handler_unplug(hotplug_ctrl, DEVICE(dev), &error_abort);
object_unparent(OBJECT(dev));
}