[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 12/16] spapr_pci: create DRConnectors for each PC
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH v5 12/16] spapr_pci: create DRConnectors for each PCI slot during PHB realize |
Date: |
Mon, 16 Feb 2015 08:10:54 -0600 |
These will be used to support hotplug/unplug of PCI devices to the PCI
bus associated with a particular PHB.
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: Michael Roth <address@hidden>
---
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
- [Qemu-devel] [PATCH v5 00/16] spapr: add support for pci hotplug, Michael Roth, 2015/02/16
- [Qemu-devel] [PATCH v5 09/16] spapr_events: event-scan RTAS interface, Michael Roth, 2015/02/16
- [Qemu-devel] [PATCH v5 10/16] spapr_drc: add spapr_drc_populate_dt(), Michael Roth, 2015/02/16
- [Qemu-devel] [PATCH v5 13/16] spapr_pci: populate DRC dt entries for PHBs, Michael Roth, 2015/02/16
- [Qemu-devel] [PATCH v5 11/16] spapr_pci: add dynamic-reconfiguration option for spapr-pci-host-bridge, Michael Roth, 2015/02/16
- [Qemu-devel] [PATCH v5 12/16] spapr_pci: create DRConnectors for each PCI slot during PHB realize,
Michael Roth <=
- [Qemu-devel] [PATCH v5 16/16] spapr_pci: emit hotplug add/remove events during hotplug, Michael Roth, 2015/02/16
- [Qemu-devel] [PATCH v5 14/16] pci: make pci_bar useable outside pci.c, Michael Roth, 2015/02/16
- [Qemu-devel] [PATCH v5 03/16] spapr_rtas: add get/set-power-level RTAS interfaces, Michael Roth, 2015/02/16
- [Qemu-devel] [PATCH v5 15/16] spapr_pci: enable basic hotplug operations, Michael Roth, 2015/02/16
- [Qemu-devel] [PATCH v5 04/16] spapr_rtas: add set-indicator RTAS interface, Michael Roth, 2015/02/16
- [Qemu-devel] [PATCH v5 06/16] spapr: add rtas_st_buffer_direct() helper, Michael Roth, 2015/02/16
- [Qemu-devel] [PATCH v5 08/16] spapr_events: re-use EPOW event infrastructure for hotplug events, Michael Roth, 2015/02/16
- [Qemu-devel] [PATCH v5 07/16] spapr_rtas: add ibm, configure-connector RTAS interface, Michael Roth, 2015/02/16
- [Qemu-devel] [PATCH v5 01/16] docs: add sPAPR hotplug/dynamic-reconfiguration documentation, Michael Roth, 2015/02/16
- [Qemu-devel] [PATCH v5 02/16] spapr_drc: initial implementation of sPAPRDRConnector device, Michael Roth, 2015/02/16