These will be used to support hotplug/unplug of PCI devices to the PCI bus associated with a particular PHB.
Reviewed-by: David Gibson <da...@gibson.dropbear.id.au> Signed-off-by: Michael Roth <mdr...@linux.vnet.ibm.com> --- hw/ppc/spapr_pci.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index ab67715..7ee6f9e 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -47,6 +47,8 @@ #define RTAS_TYPE_MSI 1 #define RTAS_TYPE_MSIX 2 +#include "hw/ppc/spapr_drc.h" + static sPAPRPHBState *find_phb(sPAPREnvironment *spapr, uint64_t buid) { sPAPRPHBState *sphb; @@ -628,6 +630,15 @@ static void spapr_phb_realize(DeviceState *dev, Error **errp) sphb->lsi_table[i].irq = irq; } + /* allocate connectors for child PCI devices */ + if (sphb->dr_enabled) { + for (i = 0; i < PCI_SLOT_MAX; i++) { + spapr_dr_connector_new(OBJECT(phb), + SPAPR_DR_CONNECTOR_TYPE_PCI, + (sphb->index << 16) | (i << 3)); + } + } + if (!info->finish_realize) { error_setg(errp, "finish_realize not defined"); return; -- 1.9.1