Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2260577pxy; Tue, 3 Aug 2021 01:39:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdJblQ6N+DNCIYmZU+5ES3ulg/kMDpLhDKDWr4UWK6DZEG347j3irL+6uxpGuSn2hw+ae0 X-Received: by 2002:a17:906:fc0b:: with SMTP id ov11mr15921023ejb.238.1627979945521; Tue, 03 Aug 2021 01:39:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627979945; cv=none; d=google.com; s=arc-20160816; b=NZIQg+c6nm1tuAKwXYvG6zpEAqgoKEwKOnFa72QNAKmjbVRPCxpPNsRT6kvWC3DfW5 EnqRqRwJtGhmMvm0GZ5OqKy1N6Q8Lk2sqwIPw9iq04E+ps18kqgeVYkqe20lGoajv5b0 81QvfDEX1E1cOfk4GDuYBxWXS1zo1QDpQkg+ze0Wjzey636idyqytf71ia5xNbANwWPL uC6RPYUoK+neMVSGkVih2PEP9vEfxSZQO9nIc3GHRPXVhVh7WJzcZ5xwQRfoCuWvOF0z gJ9h+31lFT+DzkwDcVMopdUjU4Ko5Fa90B4JBDKF/By2/XDXFOm2Zj4kO/Sl+a1XfvHc 50xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=Fpciwk2UUSXNZWIXwN5StDX68uEFLa2EyDH0uUR0g1M=; b=bylWeYUe3FjMj17a1d6EYXpl120qceGQntNWkRWtwQoXk3+PglnzmpUAM7m9qOo0VC iWIA98mPduks0rZX1D2lsik1w/izTXDeWDPwUO9UFLLKCXRPtv3Z6rQqUqwj33rPm7Rp 19/zRyH+LfWk+WRPExNN+ARR8Hfu2u1W6ky28IBUTx/Zzc2k8INh8Zoh0Bvuw9f+BYCZ DrU69FKZbkvFi97Ok06JBd7NtltiVsW8SsL9xQhN4FVvF8q4Dn3vWIMBsn4m+rqrsLcw 6Q6IePmBXg7RQQhkwf3RXde9Bn1gPfdK0YNvXlBL2hwPFUi3MngBsIA832xhGLhp0kao 9/OQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q15si12938091edr.241.2021.08.03.01.38.42; Tue, 03 Aug 2021 01:39:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234477AbhHCIfb (ORCPT + 99 others); Tue, 3 Aug 2021 04:35:31 -0400 Received: from foss.arm.com ([217.140.110.172]:44728 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234423AbhHCIfb (ORCPT ); Tue, 3 Aug 2021 04:35:31 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 376B1D6E; Tue, 3 Aug 2021 01:35:20 -0700 (PDT) Received: from [10.57.36.146] (unknown [10.57.36.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 785AE3F70D; Tue, 3 Aug 2021 01:35:18 -0700 (PDT) Subject: Re: [EXTERNAL] Re: [RFC 1/1] irqchip/gic-v3-its: Add irq domain and chip for Direct LPI without ITS To: Sunil Muthuswamy , Marc Zyngier Cc: Thomas Gleixner , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "catalin.marinas@arm.com" , "will@kernel.org" , Michael Kelley , Boqun Feng , KY Srinivasan , Arnd Bergmann References: <87a6mt2jke.wl-maz@kernel.org> <87tuka24kj.wl-maz@kernel.org> From: Robin Murphy Message-ID: Date: Tue, 3 Aug 2021 09:35:12 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-08-03 03:11, Sunil Muthuswamy wrote: > On Saturday, July 31, 2021 2:52 AM, > Marc Zyngier wrote: >> >> [...] >> >>>> I also want to understand *how* you are going to plumb this into both >>>> ACPI and DT, given that neither understand how to link a PCI endpoint >>>> to a set of RDs. >>>> >>>> M. >>> >>> One way to do this for NUMA-aware systems would be to use the NUMA >>> related information that is available with PCI endpoints or root complex, to >>> pick a Redistributor/CPU that is in the NUMA node, as specified by the PCI >>> endpoint/root complex. In DT PCI devices can specify this using >>> 'numa-node-id' and in ACPI using the '_PXM (Proximity)'. For systems that >>> are not NUMA-aware, we can go with *any* Redistributor/CPU. >> >> This makes zero sense. From the point of view of a device, all the RDs >> should be reachable, and firmware has no say in it. Dealing with >> interrupt affinity is the responsibility of the endpoint driver, and >> NUMA affinity is only a performance optimisation. >> >>> Is there any additional information we would be able to gather from ACPI >>> or DT that's not there currently, that would be useful here? >> >> You will need some firmware information describing that a given set of >> devices must use the RDs for their MSIs. Just like we currently >> describe it in IORT for the ITS. You cannot /assume/ things. At the >> moment, there is nothing at all, because no-one (including Microsoft) >> thought it would be a good idea not to have an ITS, which is also why >> ACPI doesn't describe MBIs as a potential MSI provider. >> > I am a little bit confused by your above comment. Maybe you can help me > understand the ask. You indicate that from the point of the view of the > device, all the RDs should be reachable. But, then if we define a mapping > between PCI endpoint and RD in the firmware, we would be doing exactly > the opposite. i.e. restricting the RDs that are reachable by the device. Can > you please clarify? > > Is your concern that the device should be able to only DMA to a subset of > GIC Redistributor, for the MSIs? If so, in the IORT, there is "memory address > size limit" for both device and root complex nodes. In the implementation, > we can enforce that the GICR is within that range. And, if a device deviates > further than that (ex: by having accessibility gaps within the GICR range), > then that is out of scope for support. No, please don't try to abuse the Memory Address Size Limit - that has far more chance of adversely affecting normal DMA operation than of being any use here. I believe the point Marc was trying to make is that firmware should not associate a device with any one *specific* redistributor, however ACPI currently has no way to describe that MSIs can target redistributors *at all*, only ITS groups - there is no such concept as a "redistributor group". Robin.