Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp5592659rwb; Wed, 7 Sep 2022 05:21:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR7a9q470yuklNzKDmk83c2ZIgARWRqPuUi496NUiS6sqkpcQvtOOooYIq6vnhScpzAjzYc8 X-Received: by 2002:a05:6402:4312:b0:448:6db8:9d8f with SMTP id m18-20020a056402431200b004486db89d8fmr2790555edc.272.1662553270251; Wed, 07 Sep 2022 05:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662553270; cv=none; d=google.com; s=arc-20160816; b=Ti55rp9oORuNp6acdWEguevDqa1Wf6OSl8mO6fYUWHbwQqgsmNkPhe/tSKtej6gAiH Ojq9TvQoV/QNWlATznjHDVy2SgpD2/lH3Su3fkXipB7QBRYnidw+NnNO10ecWJHnJjER fudCxEkTChTNLd7zOGRnd7bTUZk8BYN1KrPaNFr9mbZvPGLbNSTwBrxt594YqIiu8n88 r7wMeswenz4xRQAUo5vT2bZPooh0dGnW+tlUCE9hRBFvAV0wce1G6eeXySuKzM0hrg2v LkMTfTVUJVAGr+2AvvF0ywqTiDf6RE+LyddUsl7uAfzKaLbAGjTRv872r9Dl1P51saqv PXgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=0aMGS6Q6ydxghI+l+1tYYA+2iLlQYvmy+IiKHXNlVRg=; b=XmiE3zxeKGHRawXdH7WAZ+1IfKAeblWfuEa7VBzoO4ucd+bVt0C6OmtBas8pGWl8vu Tf84QTlkfbiKRmqt2v7KfVZ0vGjzSQfh5n9FVtrVBMBwTWIFmFEGylhk/nxgsJ5IH6CL +E09H/Db9gg4CW/6TKb3MXqwn8rPEnQC44ZSdcmtlA3ek9Dfx445NyEhENCn1pqhgBAV x237eIeraL8lZCuSAIaABbQzgvBfAoxxTqkQpinoU8PuU/ya4yXt9FjRmbYaYZs+aDpp gVyGpf0R7hbJFaYpjfYj+QsC6fJXdZWOIax6LtTDdekXMCtbkJ6wyIUJwC1cnis9F7GM nEqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NdB9Shtw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rl15-20020a170907216f00b007416bd58459si11089935ejb.516.2022.09.07.05.20.44; Wed, 07 Sep 2022 05:21:10 -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=@kernel.org header.s=k20201202 header.b=NdB9Shtw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229774AbiIGLRh (ORCPT + 99 others); Wed, 7 Sep 2022 07:17:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229731AbiIGLRf (ORCPT ); Wed, 7 Sep 2022 07:17:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AE4C82751; Wed, 7 Sep 2022 04:17:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C3C8EB81BB9; Wed, 7 Sep 2022 11:17:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80D5AC433C1; Wed, 7 Sep 2022 11:17:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662549451; bh=FDZATRR6hD4/oumv1UZdmL/xvD/IkK/Y0Be7tHMnhk8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NdB9ShtwPJRa+2uOE2L89i6+B+Xb+kZTURs3h1ZIwYfrdOz9ZOSDvy8lINShqXMFg oZBTGTcRvDOkS6h4U3l7aGVjxxqjtBlAdw0Ekz7lPF32Iuz0X5ZZCPekCqUo6bEYzT +mnGjpO0MeyB2q4oS/0skrPAfOWT1dKwLfp44cH1XPqCD1qxqD+Cjie3enm77MYGlg C4mATqYgqPTsjiBrU5HnvM10BFIOHKaZPjSGu/5llFInL9TehF9qyyTsoXyVFU3/Si ooiocizR+Dvt1lgcNHG44qfy1Mgr8jEPPzx+3s8Ah2olCj5mVr5ST+wpEctb/Ri+yY rNyoxQNyqiyoQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.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 1oVt3h-008con-84; Wed, 07 Sep 2022 12:17:29 +0100 Date: Wed, 07 Sep 2022 12:17:28 +0100 Message-ID: <87leqvv3g7.wl-maz@kernel.org> From: Marc Zyngier To: Jason Gunthorpe Cc: Nipun Gupta , 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, puneet.gupta@amd.com, 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, robin.murphy@arm.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, harpreet.anand@amd.com, nikhil.agarwal@amd.com, michal.simek@amd.com, aleksandar.radovanovic@amd.com, git@amd.com Subject: Re: [RFC PATCH v3 4/7] bus/cdx: add cdx-MSI domain with gic-its domain as parent In-Reply-To: References: <20220803122655.100254-1-nipun.gupta@amd.com> <20220906134801.4079497-1-nipun.gupta@amd.com> <20220906134801.4079497-5-nipun.gupta@amd.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/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: jgg@nvidia.com, nipun.gupta@amd.com, 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, puneet.gupta@amd.com, 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, robin.murphy@arm.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, harpreet.anand@amd.com, nikhil.agarwal@amd.com, michal.simek@amd.com, aleksandar.radovanovic@amd.com, git@amd.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Tue, 06 Sep 2022 18:19:06 +0100, Jason Gunthorpe wrote: > > On Tue, Sep 06, 2022 at 07:17:58PM +0530, Nipun Gupta wrote: > > > +static void cdx_msi_write_msg(struct irq_data *irq_data, > > + struct msi_msg *msg) > > +{ > > + /* > > + * Do nothing as CDX devices have these pre-populated > > + * in the hardware itself. > > + */ > > +} > > Huh? > > There is no way it can be pre-populated, the addr/data pair, > especially on ARM, is completely under SW control. There is nothing in the GIC spec that says that. > There is some commonly used IOVA base in Linux for the ITS page, but > no HW should hardwire that. That's not strictly true. It really depends on how this block is integrated, and there is a number of existing blocks that know *in HW* how to signal an LPI. See, as the canonical example, how the mbigen driver doesn't need to know about the address of GITS_TRANSLATER. Yes, this messes with translation (the access is downstream of the SMMU) if you relied on it to have some isolation, and it has a "black hole" effect as nobody can have an IOVA that overlaps with the physical address of the GITS_TRANSLATER register. But is it illegal as per the architecture? No. It's just stupid. M. -- Without deviation from the norm, progress is not possible.