aboutsummaryrefslogtreecommitdiff
path: root/hw/pci
diff options
context:
space:
mode:
authorJens Freimann <jfreimann@redhat.com>2019-10-29 12:49:01 +0100
committerMichael S. Tsirkin <mst@redhat.com>2019-10-29 18:55:26 -0400
commita1190ab628c0e2816eae42786cd7396d6638aa48 (patch)
tree17b7cebe7fa91d106f14862fc2f68965548c2eb5 /hw/pci
parent70d04971f1ec71ba01c3dc5d4c760fa2c87e2612 (diff)
downloadqemu-a1190ab628c0e2816eae42786cd7396d6638aa48.zip
qemu-a1190ab628c0e2816eae42786cd7396d6638aa48.tar.gz
qemu-a1190ab628c0e2816eae42786cd7396d6638aa48.tar.bz2
migration: allow unplug during migration for failover devices
In "b06424de62 migration: Disable hotplug/unplug during migration" we added a check to disable unplug for all devices until we have figured out what works. For failover primary devices qdev_unplug() is called from the migration handler, i.e. during migration. This patch adds a flag to DeviceState which is set to false for all devices and makes an exception for PCI devices that are also primary devices in a failover pair. Signed-off-by: Jens Freimann <jfreimann@redhat.com> Message-Id: <20191029114905.6856-8-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/pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 824ab4e..c68498c 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2130,6 +2130,7 @@ static void pci_qdev_realize(DeviceState *qdev, Error **errp)
pci_qdev_unrealize(DEVICE(pci_dev), NULL);
return;
}
+ qdev->allow_unplug_during_migration = true;
}
/* rom loading */