mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-02 06:32:54 -10:00
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 <[email protected]> Message-Id: <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
This commit is contained in:
1 parent
4f5b6a05a4
commit
a99c4da9fc
2 files changed
+4
No files matched your search
@@ -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));
|
||||
}
|
||||
|
||||
@@ -265,6 +265,7 @@ typedef struct PCIReqIDCache PCIReqIDCache;
|
||||
|
||||
struct PCIDevice {
|
||||
DeviceState qdev;
|
||||
bool partially_hotplugged;
|
||||
|
||||
/* PCI config space */
|
||||
uint8_t *config;
|
||||
|
||||
Reference in new issue
Block a user