[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 9/9] pci: mark device having guest unplug request pe
From: |
Jens Freimann |
Subject: |
[Qemu-devel] [PATCH 9/9] pci: mark device having guest unplug request pending |
Date: |
Fri, 2 Aug 2019 17:06:05 +0200 |
Set pending_deleted_event before triggering the unplug request and reset
it in the unplug handler when the device is marked as partially
hotplugged. This is required to be able to plug it back in in case of a
migration failure.
Signed-off-by: Jens Freimann <address@hidden>
---
hw/pci/pcie.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 19363ff8ce..08718188bb 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -457,6 +457,7 @@ static void pcie_unplug_device(PCIBus *bus, PCIDevice *dev,
void *opaque)
HotplugHandler *hotplug_ctrl = qdev_get_hotplug_handler(DEVICE(dev));
if (dev->partially_hotplugged) {
+ dev->qdev.pending_deleted_event = false;
return;
}
hotplug_handler_unplug(hotplug_ctrl, DEVICE(dev), &error_abort);
@@ -476,6 +477,8 @@ void pcie_cap_slot_unplug_request_cb(HotplugHandler
*hotplug_dev,
return;
}
+ dev->pending_deleted_event = true;
+
/* In case user cancel the operation of multi-function hot-add,
* remove the function that is unexposed to guest individually,
* without interaction with guest.
--
2.21.0
[Qemu-devel] [PATCH 4/9] migration: allow unplug during migration for failover devices, Jens Freimann, 2019/08/02
[Qemu-devel] [PATCH 5/9] qapi: add unplug primary event, Jens Freimann, 2019/08/02
[Qemu-devel] [PATCH 6/9] qapi: Add failover negotiated event, Jens Freimann, 2019/08/02
[Qemu-devel] [PATCH 7/9] migration: Add new migration state wait-unplug, Jens Freimann, 2019/08/02
[Qemu-devel] [PATCH 8/9] pci: mark devices partially unplugged, Jens Freimann, 2019/08/02
[Qemu-devel] [PATCH 9/9] pci: mark device having guest unplug request pending,
Jens Freimann <=
Re: [Qemu-devel] [PATCH v2 0/9] add failover feature for assigned network devices, Michael S. Tsirkin, 2019/08/02
Re: [Qemu-devel] [PATCH v2 0/9] add failover feature for assigned network devices, no-reply, 2019/08/02
Re: [Qemu-devel] [PATCH v2 0/9] add failover feature for assigned network devices, no-reply, 2019/08/02
Re: [Qemu-devel] [PATCH v2 0/9] add failover feature for assigned network devices, Michael S. Tsirkin, 2019/08/12