[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 14/17] spapr_pci: populate DRC dt entries for PHB
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH v4 14/17] spapr_pci: populate DRC dt entries for PHBs |
Date: |
Tue, 23 Dec 2014 06:30:28 -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 | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 73e86a4..a5d7791 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
+#define FDT_MAX_SIZE 0x10000
+
#include "hw/ppc/spapr_drc.h"
static sPAPRPHBState *find_phb(sPAPREnvironment *spapr, uint64_t buid)
@@ -872,7 +874,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) };
struct {
@@ -951,6 +953,11 @@ 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, SPAPR_DR_CONNECTOR_TYPE_PCI);
+ if (ret) {
+ return ret;
+ }
+
return 0;
}
--
1.9.1
- [Qemu-devel] [PATCH v4 06/17] spapr: add rtas_st_buffer_direct() helper, (continued)
- [Qemu-devel] [PATCH v4 06/17] spapr: add rtas_st_buffer_direct() helper, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 03/17] spapr_rtas: add get/set-power-level RTAS interfaces, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 07/17] spapr_rtas: add ibm, configure-connector RTAS interface, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 09/17] spapr_events: event-scan RTAS interface, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 08/17] spapr_events: re-use EPOW event infrastructure for hotplug events, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 10/17] spapr_drc: add spapr_drc_populate_dt(), Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 11/17] spapr: introduce pseries-2.3 machine type, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 12/17] spapr_pci: add dynamic-reconfiguration option for spapr-pci-host-bridge, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 15/17] pci: make pci_bar useable outside pci.c, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 13/17] spapr_pci: create DRConnectors for each PCI slot during PHB realize, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 14/17] spapr_pci: populate DRC dt entries for PHBs,
Michael Roth <=
- [Qemu-devel] [PATCH v4 16/17] spapr_pci: enable basic hotplug operations, Michael Roth, 2014/12/23
- [Qemu-devel] [PATCH v4 17/17] spapr_pci: emit hotplug add/remove events during hotplug, Michael Roth, 2014/12/23