xemu/include/hw/pci-host
Greg Kurz ef28b98d58 spapr_pci: add PHB unrealize
To support PHB hotplug we need to clean up lingering references,
memory, child properties, etc. prior to the PHB object being
finalized. Generally this will be called as a result of calling
object_unparent() on the PHB object, which in turn would normally
be called as the result of an unplug() operation.

When the PHB is finalized, child objects will be unparented in
turn, and finalized if the PHB was the only reference holder. so
we don't bother to explicitly unparent child objects of the PHB,
with the notable exception of DRCs. This is needed to avoid a QEMU
crash when unplugging a PHB and resetting the machine before the
guest could handle the event. The DRCs are removed from the QOM tree
by  pci_unregister_root_bus() and we must make sure we're not leaving
stale aliases under the global /dr-connector path.

The formula that gives the number of DMA windows is moved to an
inline function in the hw/pci-host/spapr.h header because it
will have other users.

The unrealize function is able to cope with partially realized PHBs.
It is hence used to implement proper rollback on the realize error
path.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <155059669881.1466090.13515030705986041517.stgit@bahia.lab.toulouse-stg.fr.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-02-26 09:21:25 +11:00
..
designware.h pci: Add support for Designware IP block 2018-03-09 17:09:43 +00:00
gpex.h Don't talk about the LGPL if the file is licensed under the GPL 2019-01-30 10:51:20 +01:00
pam.h hw/i386: remove smram_update 2015-06-05 17:36:39 +02:00
ppce500.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
q35.h Don't talk about the LGPL if the file is licensed under the GPL 2019-01-30 10:51:20 +01:00
sabre.h apb: rename apb.c to sabre.c 2018-01-24 19:19:51 +00:00
spapr.h spapr_pci: add PHB unrealize 2019-02-26 09:21:25 +11:00
uninorth.h uninorth: add ofw-addr property to allow correct fw path generation 2018-08-30 10:42:18 +10:00
xilinx-pcie.h pci: Move bridge data structures from pci_bus.h to pci_bridge.h 2017-12-05 19:13:45 +02:00