From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a17:505:8ed0:b0:1be9:327d:8ee3 with SMTP id kh16csp141449njc; Thu, 19 Jun 2025 02:31:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVx03/twrNXAqHlvcWPFncsv8oLc+XH4ea9EzdsbcAEylzXREWW9/GMSDLhE5zsbwPAF0pGO8O5s100Cw==@linaro.org X-Google-Smtp-Source: AGHT+IFVaQCzxdQ958HO1GEazExjED7V9VXMUneJZxyOP5ASEpFs8wSBzwpqPf4Tv1CnPWPGe7VR X-Received: by 2002:a05:6214:54ca:b0:6fd:79d:c77b with SMTP id 6a1803df08f44-6fd079dc7d3mr1108016d6.10.1750325519019; Thu, 19 Jun 2025 02:31:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1750325519; cv=none; d=google.com; s=arc-20240605; b=Y6JRCGtuhNmM9LK6ARsd30BoXH108spLReKwCeX3hr5cPzr+g1W5EeeDA/zc9RyHx/ YyDzHiEU7M7h2d/oC4UYwcvJyhQml65NipJiQIUELagKcNKlpB2e+i7X+q0Jy2pqO0ft 1nM47PYy4ZQC14GWrV/yoCZqiY4gFjPu5jkghfRYjf4kJOa5qrqUnwTAi+qf9LDwRZfL FZWRpV81Z4q6JKYnTEiMgiI6+dEMfd7KfvmMGz3inV3c4lWOqZJferoUQEL5SgyGCUNE bV7vZegiwTtG0CKkzowRjSfS6Qk+rZ/vVIzgMzE4OzqmXQ9RpHxCP9aHJTZy9CoCpNf5 GFQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:from:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:date; bh=q7XTY1vg4lowgNYZb6L7ziWrVWdA3519Iscbp01YMW8=; fh=GE2Qfcnmb+jiMDIBn/MB0bQnTdZ0RBdqza4se49ifp8=; b=ShoSA1Hss24McaAokOo9K90J03/73mwTUZHJZY1/ECY5jnuBpwtPT+6Z0QcVTVHYkB 1Xilrdgc5uofyxUJ8+IXQWnKEaiYY2lltNZ0c6vimMTmH1/igq6SwfAN0S6idDfJ7p+h dKkz06GPG9okwWFemHnrdW6+VvFT1BLIowA06s8ZS1IxUGe78QhcT55Uo+fnx6VOXngQ 0mvOuPpDiDz0p5xJkBR8VezpGscmMJf06oJPeOPagH9dCBG4Rjcaf5M1xjbVcy8WCOWl YdxOgeG0uV0NimSYoWFxtdNjxF3dMJfAC6Ev5+Zafhr1Vitwitqf3eCn6SUYpnD+bAb6 eDSw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6fd015e812asi10942236d6.264.2025.06.19.02.31.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Jun 2025 02:31:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nongnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uSBcE-00084A-QZ; Thu, 19 Jun 2025 05:31:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uSBbm-0007u9-2p; Thu, 19 Jun 2025 05:31:01 -0400 Received: from [185.176.79.56] (helo=frasgout.his.huawei.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uSBbe-0002Pv-Hm; Thu, 19 Jun 2025 05:30:57 -0400 Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4bNFgl14Gnz6M56S; Thu, 19 Jun 2025 17:29:55 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id 8F2751404C4; Thu, 19 Jun 2025 17:30:31 +0800 (CST) Received: from localhost (10.203.177.66) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 19 Jun 2025 11:30:30 +0200 Date: Thu, 19 Jun 2025 10:30:28 +0100 To: Shameerali Kolothum Thodi CC: "eric.auger@redhat.com" , Linuxarm , "qemu-arm@nongnu.org" , "qemu-devel@nongnu.org" , "peter.maydell@linaro.org" , "jgg@nvidia.com" , "nicolinc@nvidia.com" , "ddutile@redhat.com" , "berrange@redhat.com" , "imammedo@redhat.com" , "nathanc@nvidia.com" , "mochs@nvidia.com" , "smostafa@google.com" , "Wangzhou (B)" , jiangkunkun , "zhangfei.gao@linaro.org" Subject: Re: [PATCH v4 1/7] hw/arm/smmu-common: Check SMMU has PCIe Root Complex association Message-ID: <20250619103028.00000277@huawei.com> In-Reply-To: <5fd7717fcd7e45d9aaff3e293cf63683@huawei.com> References: <20250613144449.60156-1-shameerali.kolothum.thodi@huawei.com> <20250613144449.60156-2-shameerali.kolothum.thodi@huawei.com> <20250616112019.00003bce@huawei.com> <20250617175247.00007d43@huawei.com> <49d4c4b73e9a44a783332ddfe9a2fbdf@huawei.com> <327b5515-467c-4666-86d6-fb2a99925a8c@redhat.com> <6e180d39-b1eb-4935-98b0-3ac73766e8aa@redhat.com> <5fd7717fcd7e45d9aaff3e293cf63683@huawei.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.203.177.66] X-ClientProxiedBy: lhrpeml100006.china.huawei.com (7.191.160.224) To frapeml500008.china.huawei.com (7.182.85.71) X-Host-Lookup-Failed: Reverse DNS lookup failed for 185.176.79.56 (deferred) Received-SPF: pass client-ip=185.176.79.56; envelope-from=jonathan.cameron@huawei.com; helo=frasgout.his.huawei.com X-Spam_score_int: -33 X-Spam_score: -3.4 X-Spam_bar: --- X-Spam_report: (-3.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RDNS_NONE=0.793, 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: , Reply-to: Jonathan Cameron From: Jonathan Cameron via Errors-To: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: nqQf+AKi1uUA On Thu, 19 Jun 2025 09:05:07 +0100 Shameerali Kolothum Thodi wrote: > > -----Original Message----- > > From: Eric Auger > > Sent: Thursday, June 19, 2025 8:41 AM > > To: Shameerali Kolothum Thodi > > ; Jonathan Cameron > > > > Cc: Linuxarm ; qemu-arm@nongnu.org; qemu- > > devel@nongnu.org; peter.maydell@linaro.org; jgg@nvidia.com; > > nicolinc@nvidia.com; ddutile@redhat.com; berrange@redhat.com; > > imammedo@redhat.com; nathanc@nvidia.com; mochs@nvidia.com; > > smostafa@google.com; Wangzhou (B) ; > > jiangkunkun ; zhangfei.gao@linaro.org > > Subject: Re: [PATCH v4 1/7] hw/arm/smmu-common: Check SMMU has PCIe > > Root Complex association > >=20 > > Hi Shameer, > >=20 > > On 6/19/25 9:24 AM, Shameerali Kolothum Thodi wrote: =20 > > > Hi Eric, > > > =20 > > >> -----Original Message----- > > >> From: Eric Auger > > >> Sent: Wednesday, June 18, 2025 6:00 PM > > >> To: Shameerali Kolothum Thodi > > >> ; Jonathan Cameron > > >> > > >> Cc: Linuxarm ; qemu-arm@nongnu.org; qemu- > > >> devel@nongnu.org; peter.maydell@linaro.org; jgg@nvidia.com; > > >> nicolinc@nvidia.com; ddutile@redhat.com; berrange@redhat.com; > > >> imammedo@redhat.com; nathanc@nvidia.com; mochs@nvidia.com; > > >> smostafa@google.com; Wangzhou (B) ; > > >> jiangkunkun ; zhangfei.gao@linaro.org > > >> Subject: Re: [PATCH v4 1/7] hw/arm/smmu-common: Check SMMU has =20 > > PCIe =20 > > >> Root Complex association > > >> > > >> Hi Shameer, Jonathan, > > >> > > >> On 6/18/25 10:35 AM, Shameerali Kolothum Thodi wrote: =20 > > >>>> -----Original Message----- > > >>>> From: Jonathan Cameron > > >>>> Sent: Tuesday, June 17, 2025 5:53 PM > > >>>> To: Eric Auger > > >>>> Cc: Shameerali Kolothum Thodi > > >>>> ; Linuxarm > > >>>> ; qemu-arm@nongnu.org; qemu- > > >>>> devel@nongnu.org; peter.maydell@linaro.org; jgg@nvidia.com; > > >>>> nicolinc@nvidia.com; ddutile@redhat.com; berrange@redhat.com; > > >>>> imammedo@redhat.com; nathanc@nvidia.com; mochs@nvidia.com; > > >>>> smostafa@google.com; Wangzhou (B) ; > > >>>> jiangkunkun ; zhangfei.gao@linaro.org > > >>>> Subject: Re: [PATCH v4 1/7] hw/arm/smmu-common: Check SMMU has =20 > > >> PCIe =20 > > >>>> Root Complex association > > >>>> > > >>>> On Tue, 17 Jun 2025 09:49:54 +0200 > > >>>> Eric Auger wrote: > > >>>> =20 > > >>>>> On 6/16/25 12:20 PM, Jonathan Cameron wrote: =20 > > >>>>>> On Fri, 13 Jun 2025 15:44:43 +0100 > > >>>>>> Shameer Kolothum =20 > > wrote: =20 > > >>>>>> =20 > > >>>>>>> Although this change does not affect functionality at present, = it is =20 > > >>>>>> Patch title says PCIe. This check is vs PCI host bridge. > > >>>>>> > > >>>>>> No idea which one you wanted, but if it is PCIe needs to be > > >>>>>> TYPC_PCIE_HOST_BRIDGE from pcie_host.h not the pci_host.h one > > >>>>>> I think. =20 > > >>>>> I think we need TYPE_PCI_HOST_BRIDGE as we want to check against = =20 > > >> pxb =20 > > >>>>> pci-bridge/pci_expander_bridge.c:=C2=A0=C2=A0=C2=A0 .parent=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D =20 > > >>>> TYPE_PCI_HOST_BRIDGE, =20 > > >> sorry but I still fail to understand why we can't just check against > > >> > > >> TYPE_PCI_HOST_BRIDGE for making sure the SMMU is attached to PXB or > > >> GPEX. What does it fail to check? Why shall we care about PCI vs PCI= e? =20 > > > I think the concern is getting any other TYPE_PCI_HOST_BRIDGE types = =20 > > attached =20 > > > to SMMUv3 other than pxb-pcie or GPEX. For example you could do, > > > > > > -device pxb-cxl,bus_nr=3D12,bus=3Dpcie.0,id=3Dcxl.1 \ > > > -device arm-smmuv3,primary-bus=3Dcxl.1,id=3Dsmmuv3.1 \ > > > > > > as pxb-cxl is of type TYPE_PCI_HOST_BRIDGE. I don't know if there are= any =20 > > other =20 > > > ones similar to this out there. > > > > > > So the aim is to make the checking more specific to PXB. =20 > >=20 > > thank you for the clarification. Is it invalid to have the SMMU > > protecting RIDs comming from the pxb-cxl hierarchy? =20 >=20 > That=E2=80=99s a good question. I don't know that for sure. It should be fine to support CXL for this but we can work that out later. For now limited use cases as there is no CXL VFIO support and the only thing emulated devices do that the SMMU might influence is MSIX. The one that concerned me is pxb-pci if we only care about pcie. I'm not sure if we need to make that distinction or not. =20 Jonathan > Anyway currently the full support for CXL on virt is in progress here, > https://lore.kernel.org/qemu-devel/20250612134338.1871023-1-Jonathan.Came= ron@huawei.com/ >=20 > Jonathan? >=20 > Thanks, > Shameer >=20 > > =20 >=20