]> Git Repo - qemu.git/commitdiff
spapr_pci: emit hotplug add/remove events during hotplug
authorTyrel Datwyler <[email protected]>
Thu, 7 May 2015 05:33:56 +0000 (15:33 +1000)
committerAlexander Graf <[email protected]>
Wed, 3 Jun 2015 21:56:55 +0000 (23:56 +0200)
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
device_add/device_del.

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

Signed-off-by: Tyrel Datwyler <[email protected]>
Signed-off-by: Michael Roth <[email protected]>
Reviewed-by: David Gibson <[email protected]>
Signed-off-by: David Gibson <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
hw/ppc/spapr_pci.c

index d2e41619981881d8ca54804dcff2ac4f5732866f..4df3a33db4c5aa61a8ca9321c0e86439bbb9f102 100644 (file)
@@ -1075,6 +1075,9 @@ static void spapr_phb_hot_plug_child(HotplugHandler *plug_handler,
         error_propagate(errp, local_err);
         return;
     }
+    if (plugged_dev->hotplugged) {
+        spapr_hotplug_req_add_event(drc);
+    }
 }
 
 static void spapr_phb_hot_unplug_child(HotplugHandler *plug_handler,
@@ -1101,6 +1104,7 @@ static void spapr_phb_hot_unplug_child(HotplugHandler *plug_handler,
             error_propagate(errp, local_err);
             return;
         }
+        spapr_hotplug_req_remove_event(drc);
     }
 }
 
This page took 0.03001 seconds and 4 git commands to generate.