Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp678690rwi; Fri, 14 Oct 2022 07:19:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6YQ4bl33Woe0EfEnd/CR1BmhjpbIpmq3cfJnb7B0Z992d7glw0r7h2Rl/vaI/3gjnGIesT X-Received: by 2002:a05:6402:d6c:b0:458:ef3d:5926 with SMTP id ec44-20020a0564020d6c00b00458ef3d5926mr4567398edb.54.1665757141601; Fri, 14 Oct 2022 07:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665757141; cv=none; d=google.com; s=arc-20160816; b=sJErEqvo3DRdixkJ0RuqS9xxhw3TA7Jj8aSmnG3zDBD6mfBuY4c8Q3BVdtJQado02d 8hEtpYnkekq+2v3hEu5zefaLCq72xXkdc4w5y/JNAlBFU7anD/O0zEPFv+7Wohf8W3Lj Sf6ybdEAMoRtBG036jsOzuIRGfP4l6zDHKy6UNZFkOUuiGokB/Qf1wiPmOVSBYPMJHR8 IfjMLBGq5GojxUh4XW2ONNC4w0WQaNATvrVbTYrUYS4zw+SWUX71uZKfwQbRd7LRJf1Q SJs9t8/6r3LPv78auErq/9g+HQts9ZypXAGyTOckzSZDtJhGJbilHwfPx/1E7iwbj1aW WlXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qcbPZWPJBvSlgI0JaT98JkQa2BdMkjvTQHHNjJDLWR8=; b=kfcACKjKmXNg91HUMPlC77T8QrW3BrSlSHTxIyl1Jeq3UC9p6kJ6I578ndSDQL8tND IyzsBXLfvHfmDbFp7erWNP6BUDz7cFTyvYBTds5xCVAUFs6Uxblba8pM0U3wYe38kMyg o4nWQMWZlZHp6aEEHFmYi2eQLF4RhkxGC6TO87BoXqk+61qayiCHh+oIPQ7gvfQdmoFu SPAfSagxJfQKU/oS/Cyafvbe9+2OzmpyFaJ7+jFUi/3GuGcflB/uE5HfkvJE8YMyxEIO eM1dLIC7qU1w3J0PZsDMGqpSFrGebCr0WsdjpYhC4XINrVD8qEWllnZqPpdnBFOQLnu4 E2/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=cWHaCe+7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020a05640226c500b0044f288e02edsi2497299edd.15.2022.10.14.07.18.35; Fri, 14 Oct 2022 07:19:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=cWHaCe+7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230079AbiJNOAh (ORCPT + 99 others); Fri, 14 Oct 2022 10:00:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229907AbiJNOAH (ORCPT ); Fri, 14 Oct 2022 10:00:07 -0400 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADE323A155 for ; Fri, 14 Oct 2022 06:59:57 -0700 (PDT) Received: by mail-qk1-x72e.google.com with SMTP id f8so2477735qkg.3 for ; Fri, 14 Oct 2022 06:59:56 -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=Gy6aj8CoGSJgphP0jn4Q/RFMqs9chTY5v0R7alSoIS1W4BZR8qE703a0u3jI7hgEbX FtvTpYtS9JBhfR9aGjQ045n6AWwF5GzxVMyryIvtZ9I6t3Z6+UbiIhutU2mqZtvSsiKt NAMse6XfhNzche8bljOA/Gc2ZeXCWgFW+ULuIsmwoJpfTnRPkQjUAJSYpI9wx+lmoyLH M7lmU/MIwkPaE0b9ljFW3jbfGy6qMHxcBI7Q7CTedAfRujzLBoLy/iVn0/N27whtm7Vs Ew/gstNc2UL+cBkWi2IXDzSWuocCoOEe2FEfrhpgdDd/eRGKnkdNCLaOSmFSm6eMM3mG TdoQ== X-Gm-Message-State: ACrzQf0CRg9ctqyMcBsDrdUWe00AobtSW1CFhjzaxqz6oddxmCzF7O6s ui8UGzjUKLJiWCSb4sfakG4fgA== 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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