[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v5 13/16] spapr_pci: populate DRC dt entries for PHBs
From: |
Michael Roth |
Subject: |
[Qemu-ppc] [PATCH v5 13/16] spapr_pci: populate DRC dt entries for PHBs |
Date: |
Mon, 16 Feb 2015 08:27:49 -0600 |
Reserve 32 entries of type PCI in each PHB's initial FDT. This
advertises to guests that each PHB is DR-capable device with
physical hotpluggable slots. This is necessary for allowing
hotplugging of devices to it later via bus rescan or guest rpaphp
hotplug module.
Signed-off-by: Michael Roth <address@hidden>
---
hw/ppc/spapr_pci.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 7ee6f9e..6a3d917 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -878,7 +878,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,
uint32_t xics_phandle,
void *fdt)
{
- int bus_off, i, j;
+ int bus_off, i, j, ret;
char nodename[256];
uint32_t bus_range[] = { cpu_to_be32(0), cpu_to_be32(0xff) };
const uint64_t mmiosize = memory_region_size(&phb->memwindow);
@@ -967,6 +967,12 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,
object_child_foreach(OBJECT(phb), spapr_phb_children_dt,
&((sPAPRTCEDT){ .fdt = fdt, .node_off = bus_off }));
+ ret = spapr_drc_populate_dt(fdt, bus_off, OBJECT(phb),
+ SPAPR_DR_CONNECTOR_TYPE_PCI);
+ if (ret) {
+ return ret;
+ }
+
return 0;
}
--
1.9.1
[Qemu-ppc] [PATCH v5 01/16] docs: add sPAPR hotplug/dynamic-reconfiguration documentation, Michael Roth, 2015/02/16