From nobody Sun Feb 8 06:55:28 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=1637082383; cv=none; d=zohomail.com; s=zohoarc; b=SivxSIpSV1dWb8HFFtWl4iGTlFmS0rcXRixSMg11Ei9BgNYAv6SesvsB+P/DLvCwEe6ye60g3k1GGIPFmUsXXxcVaCqyHDQEyC243bbW3HE4gOC4aVgavr1HCJEtn4YpzmQqjaNe1XlwlmL8PJ9Dr03Av+UJJiGinvVm+FXSElE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637082383; h=Content-Transfer-Encoding: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=YFysD9HSrEHHcMMXePgaiu0/qu+JjRVbXlEtz+LhC3Y=; b=Dh9yeRA245v+rRCRzwpMx5oqL5phOVtGneT58MWz4v11AotlZxLdaUeKkcu8mKI9yo+F9dazLooBWwVhuknpoiyngec6qTlEDbrQvQOdHavI8pm4SZ0iu5lSazGydZhdMbDp77CBzWigCfVVnihVajXYcLQIUXb7I+9pBF7e7qE= 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 1637082383661177.91646416262165; Tue, 16 Nov 2021 09:06:23 -0800 (PST) Received: from localhost ([::1]:36156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mn1uY-0001Ea-A4 for importer@patchew.org; Tue, 16 Nov 2021 12:06:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mn1q9-0002OZ-7T; Tue, 16 Nov 2021 12:01:49 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:26190 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 1mn1q7-0001Aq-9s; Tue, 16 Nov 2021 12:01:48 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AGGJhiv013546; Tue, 16 Nov 2021 17:01:39 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3ccg2h0ymf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Nov 2021 17:01:39 +0000 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1AGGucXd026325; Tue, 16 Nov 2021 17:01:38 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 3ccg2h0ykj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Nov 2021 17:01:38 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1AGGrAel015907; Tue, 16 Nov 2021 17:01:37 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03ams.nl.ibm.com with ESMTP id 3ca50a251d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Nov 2021 17:01:36 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1AGH1YpQ19268004 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Nov 2021 17:01:34 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 80799AE061; Tue, 16 Nov 2021 17:01:34 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3D3A4AE04D; Tue, 16 Nov 2021 17:01:34 +0000 (GMT) Received: from localhost.ibm.com (unknown [9.101.4.17]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 16 Nov 2021 17:01:34 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=YFysD9HSrEHHcMMXePgaiu0/qu+JjRVbXlEtz+LhC3Y=; b=IoP7X6vg5MZP/hKJ8kPg3FECdZ7mZnx6u4WKNSwfH1K9gYQ7P82J7AoN0I3JnDt0819e Jenc+CUui+h0Z+mvzDXrTLrQvGU4vjfPsNo8tskpne+fCg1nrvJNWzXryjlXXcIweR2h TOmMITymAMNfzBr6Q6S7IIVMRAWbYx0vwOhFikB8IplGfUYGlCm7yW9V3ZvXzhIg3tMx W7HcpH1cN+CPj8hzvEktDAWnIasPbZcLytsTuOK1QsMvTtd1cOzn40E4VjgTWJqy9Qqh PZ0R2WyWe8ziArGH/16udVDogyCfHvpTl/Ce5GCivOd/vsQhrXbIy4C2T3eWNpUEUJph aQ== From: Frederic Barrat To: clg@kaod.org, mst@redhat.com, marcel.apfelbaum@gmail.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 1/3] ppc/pnv: Tune the POWER9 PCIe Host bridge model Date: Tue, 16 Nov 2021 18:01:31 +0100 Message-Id: <20211116170133.724751-2-fbarrat@linux.ibm.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211116170133.724751-1-fbarrat@linux.ibm.com> References: <20211116170133.724751-1-fbarrat@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: XF9oviiHWsCIbO_cXWR9ZwxwL0HHEmtf X-Proofpoint-GUID: ChdkTULQdsjnbgplLCUHIhl2vlRLIWEA X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-16_03,2021-11-16_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 mlxlogscore=999 priorityscore=1501 phishscore=0 clxscore=1015 adultscore=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111160084 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=fbarrat@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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 1637082385884100001 Content-Type: text/plain; charset="utf-8" The PHB v4 found on POWER9 doesn't request any LSI, so let's clear the Interrupt Pin register in the config space so that the model matches the hardware. If we don't, then we inherit from the default pcie root bridge, which requests a LSI. And because we don't map it correctly in the device tree, all PHBs allocate the same bogus hw interrupt. We end up with inconsistent interrupt controller (xive) data. The problem goes away if we don't allocate the LSI in the first place. Signed-off-by: Frederic Barrat Reviewed-by: C=C3=A9dric Le Goater --- hw/pci-host/pnv_phb4.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c index 5c375a9f28..1659d55b4f 100644 --- a/hw/pci-host/pnv_phb4.c +++ b/hw/pci-host/pnv_phb4.c @@ -1234,10 +1234,13 @@ static void pnv_phb4_reset(DeviceState *dev) PCIDevice *root_dev =3D PCI_DEVICE(&phb->root); =20 /* - * Configure PCI device id at reset using a property. + * Configure the PCI device at reset: + * - set the Vendor and Device ID to for the root bridge + * - no LSI */ pci_config_set_vendor_id(root_dev->config, PCI_VENDOR_ID_IBM); pci_config_set_device_id(root_dev->config, phb->device_id); + pci_config_set_interrupt_pin(root_dev->config, 0); } =20 static const char *pnv_phb4_root_bus_path(PCIHostState *host_bridge, --=20 2.33.1 From nobody Sun Feb 8 06:55:28 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=1637082381; cv=none; d=zohomail.com; s=zohoarc; b=KArb0tn0hdQn8Z+3QngB429MCEIdIH5l51XXnIcBxLP7jmjYCyEEY/i7O5Ujarkl2uwPa3PPbxMk4u2Jrj72Fju1HMGkQ7MsRBYJDBrbw5w2rn1WdkQv/8ewHtXIaCz4P6DKq/jv5FLw9GhZlr+Ah8dU7tdeZtMuFxurjzQ9m1g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637082381; h=Content-Transfer-Encoding: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=sfAiGh5RWuDu0R0TM3TWHz0YYzWKtxCUrtolU2NOLVs=; b=AdZRuzoJEBcesh6SFUZ2SaJdHkZEUDrdkkO48iFGcCwTVLDYRgnGEI8YqurYxQPQgB1BGtMcsJV8gG9oEy4AXG5AghxD7TZSHbdPJ85BzFguGxpYTCS/xGIaGzlEZeMr3d6CvbgpG5Ld9ToPhfYc6HWC7m72oMTZ/eKfX1pMilQ= 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 1637082381445969.3118141637632; Tue, 16 Nov 2021 09:06:21 -0800 (PST) Received: from localhost ([::1]:35750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mn1uV-0000wV-Ql for importer@patchew.org; Tue, 16 Nov 2021 12:06:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mn1q8-0002OL-C7; Tue, 16 Nov 2021 12:01:49 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:12514) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mn1q5-00018g-Bd; Tue, 16 Nov 2021 12:01:48 -0500 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AGFnrnv009626; Tue, 16 Nov 2021 17:01:40 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3ccfmqhsqa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Nov 2021 17:01:40 +0000 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1AGGmWxv014748; Tue, 16 Nov 2021 17:01:39 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 3ccfmqhsp0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Nov 2021 17:01:39 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1AGGrALk015905; Tue, 16 Nov 2021 17:01:37 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03ams.nl.ibm.com with ESMTP id 3ca50a251g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Nov 2021 17:01:37 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1AGH1YTe12517752 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Nov 2021 17:01:34 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D3254AE061; Tue, 16 Nov 2021 17:01:34 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 90938AE045; Tue, 16 Nov 2021 17:01:34 +0000 (GMT) Received: from localhost.ibm.com (unknown [9.101.4.17]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 16 Nov 2021 17:01:34 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=sfAiGh5RWuDu0R0TM3TWHz0YYzWKtxCUrtolU2NOLVs=; b=HFzKUnC2SbRo/fYCZOQjvgh/m28sxT4/9d93jpsNwzIywetwVhWc25IOdmyk9QOkIKef p8ibd8Y/OI4vB19bg2ADSWHKHmlGvsP2lh5/kCMWt4DKArnuxKzscXqqmimEKVCNOnOP lEypBtipxthupwfxo06ZH/NCN9jBXwScH8yPbKL8kMW5I+P9NMYM/7DtOPKclSYwqVu6 h/QpH9IlUtaOwtmB66K1+Z+X9Sa754q+xDoit0kIAGvzHUmsAm7g8tXY91z5SBTECFJh HaXiUTl/0aG3V5+JuMc60LQgljmxHUbnX2BoN+GbRtG59cV5RKb3Hp3O2SwGSActLIUb Yw== From: Frederic Barrat To: clg@kaod.org, mst@redhat.com, marcel.apfelbaum@gmail.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 2/3] pci: Export the pci_intx() function Date: Tue, 16 Nov 2021 18:01:32 +0100 Message-Id: <20211116170133.724751-3-fbarrat@linux.ibm.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211116170133.724751-1-fbarrat@linux.ibm.com> References: <20211116170133.724751-1-fbarrat@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 60lEgr0wdnrOmqiq2rzGn8jqofmwQVuZ X-Proofpoint-GUID: 1q5uNGtb-2hqTdBpRXpVo4-m6GveS_9r X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-16_03,2021-11-16_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 spamscore=0 priorityscore=1501 mlxscore=0 impostorscore=0 suspectscore=0 mlxlogscore=915 malwarescore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111160084 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.156.1; envelope-from=fbarrat@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 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: 1637082383606100001 Content-Type: text/plain; charset="utf-8" Move the pci_intx() definition to the PCI header file, so that it can be called from other PCI files. It is used by the next patch. Signed-off-by: Frederic Barrat Reviewed-by: C=C3=A9dric Le Goater --- hw/pci/pci.c | 5 ----- include/hw/pci/pci.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index e5993c1ef5..249d7e4cf6 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1497,11 +1497,6 @@ static void pci_irq_handler(void *opaque, int irq_nu= m, int level) pci_change_irq_level(pci_dev, irq_num, change); } =20 -static inline int pci_intx(PCIDevice *pci_dev) -{ - return pci_get_byte(pci_dev->config + PCI_INTERRUPT_PIN) - 1; -} - qemu_irq pci_allocate_irq(PCIDevice *pci_dev) { int intx =3D pci_intx(pci_dev); diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index e7cdf2d5ec..35f8eb67bd 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -735,6 +735,11 @@ void lsi53c8xx_handle_legacy_cmdline(DeviceState *lsi_= dev); qemu_irq pci_allocate_irq(PCIDevice *pci_dev); void pci_set_irq(PCIDevice *pci_dev, int level); =20 +static inline int pci_intx(PCIDevice *pci_dev) +{ + return pci_get_byte(pci_dev->config + PCI_INTERRUPT_PIN) - 1; +} + static inline void pci_irq_assert(PCIDevice *pci_dev) { pci_set_irq(pci_dev, 1); --=20 2.33.1 From nobody Sun Feb 8 06:55:28 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=1637082456; cv=none; d=zohomail.com; s=zohoarc; b=jrBP2wDctsEGfbk4fpQzCDvZG+aFgQu8TRblwbZ2kZwRrBWjUt8JJ+EF/V9i0YqFCRvyarAAgsApNpFZUNas4smQp4dgbqyNRGlugvUNbuZNCn7wPWyIpypfKywpmob2hu0m22oSTtywH56yx05Mjf/LWX7ZgzuO/7qPq34VEu4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637082456; h=Content-Transfer-Encoding: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=QS2k3Wv8Aw71MIEWq6KRvGeTCGVQ6z8Y/5vYgqNoq/Y=; b=f/gx0zjQnqGPOubrPr1bf0bxym98yt7DKZ4Wj66BiDM0gJ6ywFk+XaB0wUj6GqWChv/5ucEIC8Ivw47IRiLfQhBSoApuqahVl+T3hv6eNkcT7ztXEs02q0DaBN2S6o+9tCTTEPEADXechxGpcou8H77lc2MveKtr5qKPiCqOcB4= 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 1637082456486198.72651576130932; Tue, 16 Nov 2021 09:07:36 -0800 (PST) Received: from localhost ([::1]:38928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mn1vj-0003Bo-Gq for importer@patchew.org; Tue, 16 Nov 2021 12:07:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mn1q9-0002Pq-QV; Tue, 16 Nov 2021 12:01:51 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46742 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 1mn1q5-00018e-Mg; Tue, 16 Nov 2021 12:01:49 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AGGHhRV011251; Tue, 16 Nov 2021 17:01:41 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3ccg1rs27g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Nov 2021 17:01:40 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1AGGxfji016052; Tue, 16 Nov 2021 17:01:40 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0b-001b2d01.pphosted.com with ESMTP id 3ccg1rs26w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Nov 2021 17:01:40 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1AGGr0M3006921; Tue, 16 Nov 2021 17:01:38 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma06fra.de.ibm.com with ESMTP id 3ca4mk12jn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Nov 2021 17:01:38 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1AGGsdBN47710472 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Nov 2021 16:54:39 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3B1D5AE063; Tue, 16 Nov 2021 17:01:35 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E3AACAE045; Tue, 16 Nov 2021 17:01:34 +0000 (GMT) Received: from localhost.ibm.com (unknown [9.101.4.17]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 16 Nov 2021 17:01:34 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=QS2k3Wv8Aw71MIEWq6KRvGeTCGVQ6z8Y/5vYgqNoq/Y=; b=PoTCg3cNbUvvsOYF3HPzHvKtTEsClt86WqC4ItnDgeUUpMRqYldwHbtwoIKonwujhfjR AEX+X004eX77Ve9EHgfdT6TKfK0KsmOTjzmLCQxwCHKDTDj+2M1sqPuryAhdrmNcSogm dy6mFouFopdthNnEIJb75IUM2M9pQeXsDDzxh1eHrGiDGDEPPmefsl77NXY7JXOZnl7Z 09YaEPJQT7ihFGdVxYSfgUSrly9uZnyytFPDW+xyp6f+9DBj0Sf482zF1aILDJ6D169n NyCAY1ZuyZWUjrqcr/wW8gpIjbwbwJIa4hT00d1FjCeekzZGSfQ4GnGwgfQz52qWyG8L nw== From: Frederic Barrat To: clg@kaod.org, mst@redhat.com, marcel.apfelbaum@gmail.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 3/3] pcie_aer: Don't trigger a LSI if none are defined Date: Tue, 16 Nov 2021 18:01:33 +0100 Message-Id: <20211116170133.724751-4-fbarrat@linux.ibm.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211116170133.724751-1-fbarrat@linux.ibm.com> References: <20211116170133.724751-1-fbarrat@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: hq6wcUsmk8Z7CZc3jY9S9O2IachMkK6w X-Proofpoint-ORIG-GUID: tF2U1rJKwGmU_uQkPKq2Yq3N2UHE421k X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-16_03,2021-11-16_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 priorityscore=1501 suspectscore=0 impostorscore=0 adultscore=0 clxscore=1015 malwarescore=0 mlxlogscore=999 lowpriorityscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111160084 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=fbarrat@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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 1637082457279100001 Content-Type: text/plain; charset="utf-8" Skip triggering an LSI when the AER root error status is updated if no LSI is defined for the device. We can have a root bridge with no LSI, MSI and MSI-X defined, for example on POWER systems. Signed-off-by: Frederic Barrat Reviewed-by: C=C3=A9dric Le Goater --- hw/pci/pcie_aer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c index 27f9cc56af..e1a8a88c8c 100644 --- a/hw/pci/pcie_aer.c +++ b/hw/pci/pcie_aer.c @@ -774,7 +774,9 @@ void pcie_aer_root_write_config(PCIDevice *dev, uint32_t root_cmd =3D pci_get_long(aer_cap + PCI_ERR_ROOT_COMMAND); /* 6.2.4.1.2 Interrupt Generation */ if (!msix_enabled(dev) && !msi_enabled(dev)) { - pci_set_irq(dev, !!(root_cmd & enabled_cmd)); + if (pci_intx(dev) !=3D -1) { + pci_set_irq(dev, !!(root_cmd & enabled_cmd)); + } return; } =20 --=20 2.33.1