diff options
author | Greg Kurz | 2019-02-19 18:18:18 +0100 |
---|---|---|
committer | David Gibson | 2019-02-25 23:21:25 +0100 |
commit | ef28b98d58121b0a9ae94c9397d1def2531166ed (patch) | |
tree | 3796cf255d75f2916d7dd9486785d1c433d4276e /include/hw/ppc/spapr.h | |
parent | spapr_irq: Expose the phandle of the interrupt controller (diff) | |
download | qemu-ef28b98d58121b0a9ae94c9397d1def2531166ed.tar.gz qemu-ef28b98d58121b0a9ae94c9397d1def2531166ed.tar.xz qemu-ef28b98d58121b0a9ae94c9397d1def2531166ed.zip |
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>
Diffstat (limited to 'include/hw/ppc/spapr.h')
0 files changed, 0 insertions, 0 deletions