diff options
author | Tyrel Datwyler <tyreld@linux.vnet.ibm.com> | 2015-05-07 15:33:56 +1000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2015-06-03 23:56:55 +0200 |
commit | c5bc152bc399ae7ec8ac5227762e4320d0fd2d1c (patch) | |
tree | 2e9590ecf113ca438293358ec8f54325e8a34fa0 /hw/ppc | |
parent | 7454c7af91bdd60216e2b6eead827c012bb4d0d0 (diff) |
spapr_pci: emit hotplug add/remove events during hotplug
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 <tyreld@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/ppc')
-rw-r--r-- | hw/ppc/spapr_pci.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index d2e4161998..4df3a33db4 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -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); } } |