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 18A1FC4332F for ; Fri, 14 Oct 2022 13:59:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NT8bm9FZ8HmWL4R21sB2JPIJ11726UQQPkffu0cWYYM=; b=NjT7nzaLDoq/cU 7SozgCmScHJ4hS+1/79c4PpUnEsL+Kvdx235nmnQpluOMBoHOGnbpL+QlwRraTps0hrva5vbWpG1L scL32hxZk1iq+U/8pBOkZbt3SikOvBabUdzlelXD52ITez5NgWJyWtV8cbcDboz6eBhfbLW2eawva 63Jeryn/8vQA43d3MrCtrVoVdETo3JfZXriIP11AM5p3jzVcwl9s9xSbi1jFZNwoocpqcPUA82cWi TiY56qwQ/9qrOZrMDoruTU74Q4NcHlcQ1wDYDWljDCGs0SNLxlRejl6PWBELnsgHIVdl88pcblbuq 8A6pjfbYdBfwMyAvwJ0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojLCc-00EslY-CG; Fri, 14 Oct 2022 13:58:18 +0000 Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojLCZ-00Esk4-Dg for linux-arm-kernel@lists.infradead.org; Fri, 14 Oct 2022 13:58:17 +0000 Received: by mail-qk1-x736.google.com with SMTP id b25so2464650qkk.7 for ; Fri, 14 Oct 2022 06:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=qcbPZWPJBvSlgI0JaT98JkQa2BdMkjvTQHHNjJDLWR8=; b=cWHaCe+7NiLWV3T+fjLF8EZtlhexGbCg+WEq/dCVkwZlV9OSmlvmQvAf8tHOWxlB15 R1drmhQ65EsQ2EK/mhECj9QEh2CQLLNUzqJ9oqoPSSrkne89KFSq4YWdvfq9IP7Uota4 7XZtiYtVxdCKWb4baqEwWC8JB6Fdyr6kl2BDZy+wPH+ZpnDQcjanaP3WyBwV3Z1PZzGD CZWPDEfUXKdIW6mrakAhQPVrXN8JnsQ5WVKDAxqsL5jcUEWUMlF+wYwCnWrfob8HgcIT Gi3IrihaKlsefDNPRlWX3Hqdb8YfdREQACdRk26hiLm8LTNeDPPdkOwUpLkPKgwwv3Yz 5VcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qcbPZWPJBvSlgI0JaT98JkQa2BdMkjvTQHHNjJDLWR8=; b=EAs3Q4QEPeZRjC80VfTCeMesPP+G73ks/PFJYUVl/tTOHgTWZXSJFgy+D8D7y18Io1 XWmoYIV6qGYdmzT9ixzgPkfm6O6Y5LLoOGYv4dBuv/gB7TK17ntK6xHOOLWd8Kz7f7PC QIPI/vJkjmzylhx6TG/zPXgbR8m/QIg5A185tXt0IPCkHrHRigr/Bx1kTyrO8NLrY+Ml 0EQjLNqqvLbGjIACgApedCT530gGn47OXZxgHzQhicLiAE8fm5chPlUAUQM82xnXHi5/ pnaxxBfyyO3trF1iZ8onIAafMeAED5+Z/NLGRpXFlXzyawDGX+9mjn8VZ0VYONXHln8z o5cQ== X-Gm-Message-State: ACrzQf2V6TzkYIRkeq3s9KC5+006Qn66Cnc3usKECgMRpelUObd/5vJG XTdCqcVW6nmZ2H1Z0RiAqKx19g== X-Google-Smtp-Source: AMsMyM6IwCN+c1z62UhOHVbSClec5ccka72g2QriRCYRsTQFGoKqENCt7u1RwIvsCpE32fxIp3ANJA== X-Received: by 2002:a05:620a:4107:b0:6ee:ce95:1d15 with SMTP id j7-20020a05620a410700b006eece951d15mr1769931qko.266.1665755892583; Fri, 14 Oct 2022 06:58:12 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-47-55-122-23.dhcp-dynamic.fibreop.ns.bellaliant.net. [47.55.122.23]) by smtp.gmail.com with ESMTPSA id k15-20020a05620a414f00b006ce40fbb8f6sm2605722qko.21.2022.10.14.06.58.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Oct 2022 06:58:11 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1ojLCU-0033hQ-T0; Fri, 14 Oct 2022 10:58:10 -0300 Date: Fri, 14 Oct 2022 10:58:10 -0300 From: Jason Gunthorpe To: "Radovanovic, Aleksandar" Cc: "Gupta, Nipun" , Marc Zyngier , Robin Murphy , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "gregkh@linuxfoundation.org" , "rafael@kernel.org" , "eric.auger@redhat.com" , "alex.williamson@redhat.com" , "cohuck@redhat.com" , "Gupta, Puneet (DCG-ENG)" , "song.bao.hua@hisilicon.com" , "mchehab+huawei@kernel.org" , "f.fainelli@gmail.com" , "jeffrey.l.hugo@gmail.com" , "saravanak@google.com" , "Michael.Srba@seznam.cz" , "mani@kernel.org" , "yishaih@nvidia.com" , "will@kernel.org" , "joro@8bytes.org" , "masahiroy@kernel.org" , "ndesaulniers@google.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kbuild@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "kvm@vger.kernel.org" , "okaya@kernel.org" , "Anand, Harpreet" , "Agarwal, Nikhil" , "Simek, Michal" , "git (AMD-Xilinx)" Subject: Re: [RFC PATCH v3 4/7] bus/cdx: add cdx-MSI domain with gic-its domain as parent Message-ID: References: <20220906134801.4079497-5-nipun.gupta@amd.com> <87h71juxuk.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221014_065815_885349_5952318B X-CRM114-Status: GOOD ( 25.98 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 14, 2022 at 11:18:36AM +0000, Radovanovic, Aleksandar wrote: > And that still does not imply lack of ordering or sharing of MSI > target addresses between devices. Either the end point generates the MSI, and maybe the bridge mangles it, or it raises a lot of suspicion that this is not right. If the end point generates the MSI then it raises the question why do we need to tolerate these limits? > This is a highly programmable IP block, at the core of which is an > interconnect interfacing to programmable logic (PL), a number of > PCIe controllers (either endpoint or root-port), DMA engines, > offload engines, the embedded processor subsystem (PSX), etc. DMA > and interrupts can be routed across it in almost any (meaningful) > direction. The datapath 'endpoints' request DMA and interrupts, but > don't concern themselves with the mechanics of delivering that in > the target domain. It is the responsibility of the egress bridges to > the target domains to convert the interconnect interrupt > transactions to whatever the interrupt delivery mechanism for that > domain is. E.g. for PCIe controllers in endpoint mode, that would be > through PCIe MSI-X tables internal to the controller (and managed by > the PCIe host), for PSX that would be the PSX bridge (partially > managed by the PSX OS, mediated through firmware, i.e. through CDX > bus driver) and so on. It is the responsibility of the interconnect > to maintain transaction ordering (including DMA vs. interrupts). It > is the responsibility of the firmware to manage the bridges > according to the implemented use-case, so everything works as > expected. Again, this all just seems wrongly designed. MSI should not be part of an interconnect bridge. We did that already 20 years ago, it was called IOAPICs on x86 and I think everyone is happy to see it gone. If you want to build IOAPICs again, I guess you can, but that is a slightly different SW setup than the MSI you are trying to use here, and even that didn't have the same limitations you are proposing. > So, yes, the hardware that translates interrupt transactions to GIC > AXI writes is shared between endpoints, but what I said above still > applies. And that doesn't necessarily make it weird/wrong, it's just > more complex than you might think. If it doesn't fit the architecture, then I think it must be considered wrong. Mis-using platform architected components like MSI in HW is problematic. You should design the HW properly so you don't have these problems. Involving FW in the MSI setup is also a bad idea, POWER did this and it made a big mess of their arch code :( Jason _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel