[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-ppc] [PATCH v4 17/17] spapr_pci: emit hotplug add/remove events du

From: Michael Roth
Subject: [Qemu-ppc] [PATCH v4 17/17] spapr_pci: emit hotplug add/remove events during hotplug
Date: Tue, 23 Dec 2014 06:30:31 -0600

From: Tyrel Datwyler <address@hidden>

This uses extension of existing EPOW interrupt/event mechanism
to notify userspace tools like librtas/drmgr to handle
in-guest configuration/cleanup operations in response to

Userspace tools that don't implement this extension will need
to be run manually in response/advance of device_add/device_del,

Signed-off-by: Tyrel Datwyler <address@hidden>
Signed-off-by: Michael Roth <address@hidden>
 hw/ppc/spapr_pci.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 94e33b4..f17f984 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -705,6 +705,9 @@ static void spapr_phb_hot_plug(HotplugHandler *plug_handler,
     spapr_device_hotplug_add(drc, phb, pdev);
+    if (plugged_dev->hotplugged) {
+        spapr_hotplug_req_add_event(drc);
+    }
 static void spapr_phb_hot_unplug(HotplugHandler *plug_handler,
@@ -722,6 +725,7 @@ static void spapr_phb_hot_unplug(HotplugHandler 
     spapr_device_hotplug_remove(drc, phb, pdev);
+    spapr_hotplug_req_remove_event(drc);
 static void spapr_phb_realize(DeviceState *dev, Error **errp)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]