From nobody Sun Feb 8 06:05:23 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1655135266; cv=none; d=zohomail.com; s=zohoarc; b=KqIRCWRoJteVO13ZpKs7Xm0j35UL4Zlvt8hZZ2dBQmeUWSyOKok+b5KpNdRXbyDFY5WjgSz4hT0FyCQVOmD0Oa4FqqJQAMUkAzMCagbtvOtE/1G99uUauQy+ZjADCcgF6tWlYMcJ/I4ij5gqcINFEtrd4x46vn9vvQwNB+6YxS0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1655135266; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=q8qsUXrBfgdMMV5TJTGUCMFTwzWF6HCem2b7eATsFtI=; b=RggvWndVGIOCCx4D+QyZthnRIbo9xBfdByVrX/mz+uIoRD9i/5+p87lnU1Pa+G0fYkBjTzuZ/bXpd6JGs/8KzX8N2aQ11JMYS2tIpS5i63Z1aAN9M87lwniZurJuFOV0VNb11g2clHF1Wh+OOOfWQ4i4TbK62nc7faF/0VpKfvQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16551352663581021.1315830395656; Mon, 13 Jun 2022 08:47:46 -0700 (PDT) Received: from localhost ([::1]:36298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0mI4-0002mU-Bq for importer@patchew.org; Mon, 13 Jun 2022 11:47:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0mFf-0008PI-8j; Mon, 13 Jun 2022 11:45:15 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:10002 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0mFd-0001yh-JF; Mon, 13 Jun 2022 11:45:15 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25DE9E1N020118; Mon, 13 Jun 2022 15:45:03 GMT Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gn548bfrs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Jun 2022 15:45:03 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 25DFheCm010150; Mon, 13 Jun 2022 15:45:02 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma04wdc.us.ibm.com with ESMTP id 3gmjp9eeab-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Jun 2022 15:45:02 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 25DFj2Xr5112666 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Jun 2022 15:45:02 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 64642AC059; Mon, 13 Jun 2022 15:45:02 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 28E01AC05B; Mon, 13 Jun 2022 15:45:01 +0000 (GMT) Received: from balboa.COMFAST (unknown [9.77.153.150]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 13 Jun 2022 15:45:00 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=q8qsUXrBfgdMMV5TJTGUCMFTwzWF6HCem2b7eATsFtI=; b=nyadC5qvq1HUrr/2Lvr47dtT1LWlTg56PXxgBLM+TrBAKRDcePDQpSoDWsy8Dswh6N8y yyDdPyxjn+Jjn/69ASWovA8S5IzpppHDmPS4xRsmwln79ooRKK0xaPcO3i819pTf5pzb V3iwGGmIJRY1SDqKNmCRPyH3pAviTYwazXfP5L9XeQTSB8mpycerjc7Osylj1L71aZGp xkTfxmeP1kEzl59H/aGDz6kEtTtjb5K/1vTPELo0TMfpmWxp6TXF7ObNn8Tv+bCMBBEx yLfXXu9iPTgJ/ZGx2v3yEa+m6I7warlbBQN6K9WKLN2Gz4NjnlrqIT8iRCWgYND+anV/ Dg== From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, clg@kaod.org, fbarrat@linux.ibm.com, mark.cave-ayland@ilande.co.uk Subject: [PATCH 01/11] ppc/pnv: move root port attach to pnv_phb4_realize() Date: Mon, 13 Jun 2022 12:44:46 -0300 Message-Id: <20220613154456.359674-2-danielhb@linux.ibm.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613154456.359674-1-danielhb@linux.ibm.com> References: <20220613154456.359674-1-danielhb@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: -5AvZYV1nXLTNhKdRW7BSLKKyvcCI-0- X-Proofpoint-ORIG-GUID: -5AvZYV1nXLTNhKdRW7BSLKKyvcCI-0- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-13_07,2022-06-13_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 clxscore=1015 adultscore=0 bulkscore=0 spamscore=0 lowpriorityscore=0 priorityscore=1501 mlxlogscore=999 suspectscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206130069 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=danielhb@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1655135268232100001 Content-Type: text/plain; charset="utf-8" Creating a root port is something related to the PHB, not the PEC. It also makes the logic more in line with what pnv-phb3 does. Signed-off-by: Daniel Henrique Barboza Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Frederic Barrat --- hw/pci-host/pnv_phb4.c | 4 ++++ hw/pci-host/pnv_phb4_pec.c | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c index 6594016121..23ad8de7ee 100644 --- a/hw/pci-host/pnv_phb4.c +++ b/hw/pci-host/pnv_phb4.c @@ -1547,6 +1547,7 @@ static void pnv_phb4_instance_init(Object *obj) static void pnv_phb4_realize(DeviceState *dev, Error **errp) { PnvPHB4 *phb =3D PNV_PHB4(dev); + PnvPhb4PecClass *pecc =3D PNV_PHB4_PEC_GET_CLASS(phb->pec); PCIHostState *pci =3D PCI_HOST_BRIDGE(dev); XiveSource *xsrc =3D &phb->xsrc; int nr_irqs; @@ -1583,6 +1584,9 @@ static void pnv_phb4_realize(DeviceState *dev, Error = **errp) pci_setup_iommu(pci->bus, pnv_phb4_dma_iommu, phb); pci->bus->flags |=3D PCI_BUS_EXTENDED_CONFIG_SPACE; =20 + /* Add a single Root port if running with defaults */ + pnv_phb_attach_root_port(pci, pecc->rp_model); + /* Setup XIVE Source */ if (phb->big_phb) { nr_irqs =3D PNV_PHB4_MAX_INTs; diff --git a/hw/pci-host/pnv_phb4_pec.c b/hw/pci-host/pnv_phb4_pec.c index 8b7e823fa5..c9aaf1c28e 100644 --- a/hw/pci-host/pnv_phb4_pec.c +++ b/hw/pci-host/pnv_phb4_pec.c @@ -130,9 +130,6 @@ static void pnv_pec_default_phb_realize(PnvPhb4PecState= *pec, if (!sysbus_realize(SYS_BUS_DEVICE(phb), errp)) { return; } - - /* Add a single Root port if running with defaults */ - pnv_phb_attach_root_port(PCI_HOST_BRIDGE(phb), pecc->rp_model); } =20 static void pnv_pec_realize(DeviceState *dev, Error **errp) --=20 2.36.1