From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y3Oca-0002PL-8W for qemu-devel@nongnu.org; Tue, 23 Dec 2014 07:31:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y3OcN-00054g-4Z for qemu-devel@nongnu.org; Tue, 23 Dec 2014 07:31:28 -0500 Received: from e7.ny.us.ibm.com ([32.97.182.137]:45023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y3OcN-00054S-0K for qemu-devel@nongnu.org; Tue, 23 Dec 2014 07:31:15 -0500 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 23 Dec 2014 07:31:14 -0500 From: Michael Roth Date: Tue, 23 Dec 2014 06:30:27 -0600 Message-Id: <1419337831-16552-14-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1419337831-16552-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1419337831-16552-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v4 13/17] spapr_pci: create DRConnectors for each PCI slot during PHB realize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aik@ozlabs.ru, agraf@suse.de, ncmike@ncultra.org, qemu-ppc@nongnu.org, tyreld@linux.vnet.ibm.com, bharata.rao@gmail.com, nfont@linux.vnet.ibm.com These will be used to support hotplug/unplug of PCI devices to the PCI bus associated with a particular PHB. Signed-off-by: Michael Roth --- 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 4850f9a..73e86a4 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; @@ -622,6 +624,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 << 8) | (i << 3)); + } + } + if (!info->finish_realize) { error_setg(errp, "finish_realize not defined"); return; -- 1.9.1