spapr: add hotplug hooks for PHB hotplug
commitbb2bdd812ee9a9a38007b95c3967c528e552912c
authorGreg Kurz <groug@kaod.org>
Tue, 19 Feb 2019 17:18:49 +0000 (19 18:18 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 25 Feb 2019 22:21:25 +0000 (26 09:21 +1100)
tree10b7c2507816096686afc88c9f30de620f491ba3
parentf130928d2a9b598ccdb61e1d834674f224eb9faa
spapr: add hotplug hooks for PHB hotplug

Hotplugging PHBs is a machine-level operation, but PHBs reside on the
main system bus, so we register spapr machine as the handler for the
main system bus.

Provide the usual pre-plug, plug and unplug-request handlers.

Move the checking of the PHB index to the pre-plug handler. It is okay
to do that and assert in the realize function because the pre-plug
handler is always called, even for the oldest machine types we support.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
(Fixed interrupt controller phandle in "interrupt-map" and
 TCE table size in "ibm,dma-window" FDT fragment, Greg Kurz)
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <155059672926.1466090.13612804072190051439.stgit@bahia.lab.toulouse-stg.fr.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c
hw/ppc/spapr_drc.c
hw/ppc/spapr_pci.c
include/hw/ppc/spapr.h