From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EE88CE77184 for ; Thu, 19 Dec 2024 10:54:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Subject:Cc:To:From: Message-ID:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YX2boY8rrml6fgM6RWKd/u7pgEuMrl1kiYRJNautHpE=; b=GVSdV+EwGrl64kgpa1ELJtlFSD RvuL41KaEx+awfteVe6Af6IDPJrKuzcBIMvsQgpRSqhVWDCBB1fKIDesvov/GZ4PpnEd25CfWIj+D f3EwF5m0wCY7Zz6FbuNSJ3dYvkmDUeCUTdEqJ95Fzqo9sNWmfJamtPKaIOIJL2JF2xnLwQkGhSg3h D1rulvTlmGizy4fX31Manv05yUJtPTsBV+lxoeRMDPxz/H8gdtKGAiRxrF6hPl2lWlpU6RTya9h/R GqS2u3iPsA0dvmHII6/pAWBZdXIMQW2dIPcDxkh9V74POLucDFpDBwT1eGXX2C68cUcVxQR1/MNc1 22JLEYlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tOEAa-00000001aTM-2KIV; Thu, 19 Dec 2024 10:54:16 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tOE8x-00000001aBA-2E2X for linux-arm-kernel@lists.infradead.org; Thu, 19 Dec 2024 10:52:36 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 29EE9A42073; Thu, 19 Dec 2024 10:50:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56BDFC4CECE; Thu, 19 Dec 2024 10:52:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734605554; bh=vW13L2zwHZ3hPtsWWe7muVvrgkpQiIKqYaJQXfMjg2A=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NgO1FvQD7/sFmTiuv1faa8PAkx1blRdl3ATIlf4H+k/GeG0ulKNYLmaxbUWNKO7r1 s9EPm9MfLp9jQ/NBdYAMXNwdBsw0NZi//ME/W0jTPpBBYYYQBcJgxXdZL7WmtkYNZr ZygM4PibVRaVacKU/WYa21wFcNjenc5ulAlvmVEUp+VC/OC2u9QIlrnjqdbx2+OF9/ Ou2WHLt/36NnV3MnOB3fDgkqNGk186Rs33q9t7/+pC3OXErJ9BdsxQfxS5r3RA+nrE TIn9dfF3bErr15lDUkew2vkuMajHOuiGKp7+ZCEEosukS3Vs53rkzlM0b8g5Gqkrqe xjCLVdsWf7AQw== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tOE8s-005F37-Q2; Thu, 19 Dec 2024 10:52:30 +0000 Date: Thu, 19 Dec 2024 10:52:30 +0000 Message-ID: <868qscq70x.wl-maz@kernel.org> From: Marc Zyngier To: Frank Li Cc: Manivannan Sadhasivam , Krzysztof =?UTF-8?B?V2lsY3p5xYRza2k=?= , Kishon Vijay Abraham I , Bjorn Helgaas , Arnd Bergmann , Greg Kroah-Hartman , "Rafael J. Wysocki" , Thomas Gleixner , Anup Patel , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, imx@lists.linux.dev, Niklas Cassel , dlemoal@kernel.org, jdmason@kudzu.us, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v13 4/9] irqchip/gic-v3-its: Add DOMAIN_BUS_DEVICE_PCI_EP_MSI support In-Reply-To: <20241218-ep-msi-v13-4-646e2192dc24@nxp.com> References: <20241218-ep-msi-v13-0-646e2192dc24@nxp.com> <20241218-ep-msi-v13-4-646e2192dc24@nxp.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: Frank.Li@nxp.com, manivannan.sadhasivam@linaro.org, kw@linux.com, kishon@kernel.org, bhelgaas@google.com, arnd@arndb.de, gregkh@linuxfoundation.org, rafael@kernel.org, tglx@linutronix.de, apatel@ventanamicro.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, imx@lists.linux.dev, cassel@kernel.org, dlemoal@kernel.org, jdmason@kudzu.us, linux-arm-kernel@lists.infradead.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241219_025235_694767_9D9800DD X-CRM114-Status: GOOD ( 26.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 18 Dec 2024 23:08:39 +0000, Frank Li wrote: >=20 > =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=90 > =E2=94=82 =E2=94=82 > =E2=94=82 PCI Endpoint Controller =E2=94=82 > =E2=94=82 =E2=94=82 > =E2=94=82 =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=90 =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=90 =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=90 = =E2=94=82 > PCI Bus =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 =E2=94=82 =E2=94=82 > =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=96=BA =E2=94=82 =E2=94=82Func1=E2=94=82 =E2=94=82Func2=E2= =94=82 ... =E2=94=82Func =E2=94=82 =E2=94=82 > Doorbell =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 =E2=94=82 =E2=94=82 > =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 =E2=94=82 =E2=94=82 > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80=E2=94=AC=E2=94=80=E2= =94=80=E2=94=98 =E2=94=94=E2=94=80=E2=94=80=E2=94=AC=E2=94=80=E2=94=80=E2= =94=98 =E2=94=94=E2=94=80=E2=94=80=E2=94=AC=E2=94=80=E2=94=80=E2=94=98 = =E2=94=82 > =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 = =E2=94=82 > =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=BC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=BC=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=BC=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=98 > =E2=94=82 =E2=94=82 =E2=94=82 > =E2=96=BC =E2=96=BC =E2=96=BC > =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=90 > =E2=94=82 MSI Controller =E2=94=82 > =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=98 >=20 > Add domain DOMAIN_BUS_DEVICE_PCI_EP_MSI to allocate MSI domain for Endpoi= nt > function in PCI Endpoint (EP) controller, So PCI Root Complex (RC) can > write MSI message to MSI controller to trigger doorbell IRQ for difference > EP functions. >=20 > Signed-off-by: Frank Li > --- > change from v12 to v13 > - new patch This might be v13, but after all this time, I have no idea what you are trying to do. You keep pasting this non-ASCII drawing in commit messages, but I still have no idea what this PCI Bus Doorbell represents. I appreciate the knowledge shortage is on my end, but it would definitely help if someone would take the time to explain what this is all about. =46rom what I gather, the ITS is actually on an end-point, and get writes from the host, but that doesn't answer much. > --- > drivers/irqchip/irq-gic-v3-its-msi-parent.c | 19 ++++++++++++++++++- > 1 file changed, 18 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/irqchip/irq-gic-v3-its-msi-parent.c b/drivers/irqchi= p/irq-gic-v3-its-msi-parent.c > index b2a4b67545b82..16e7d53f0b133 100644 > --- a/drivers/irqchip/irq-gic-v3-its-msi-parent.c > +++ b/drivers/irqchip/irq-gic-v3-its-msi-parent.c > @@ -5,6 +5,7 @@ > // Copyright (C) 2022 Intel > =20 > #include > +#include > #include > =20 > #include "irq-gic-common.h" > @@ -173,6 +174,19 @@ static int its_pmsi_prepare(struct irq_domain *domai= n, struct device *dev, > return its_pmsi_prepare_devid(domain, dev, nvec, info, dev_id); > } > =20 > +static int its_pci_ep_msi_prepare(struct irq_domain *domain, struct devi= ce *dev, > + int nvec, msi_alloc_info_t *info) > +{ > + u32 dev_id; > + int ret; > + > + ret =3D pci_epf_msi_domain_get_msi_rid(dev, &dev_id); What this doesn't express is *how* are the writes conveyed to the ITS. Specifically, the DevID is normally sampled as sideband information at during the write transaction. Obviously, you can't do that over PCI. So there is a lot of undisclosed assumption about how the ITS is integrated, and how it samples the DevID. My conclusion is that this is not as generic as it seems to be. It is definitely tied to implementation-specific behaviours, none of which are explained. Thanks, M. --=20 Without deviation from the norm, progress is not possible.