Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp1839635pxt; Sun, 8 Aug 2021 03:20:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+tePLSPEbUkJCu9T2CMi6H/ozegfDLuePj9LcyMcANlKklLiLv9HLysSpM397/nyN8Maw X-Received: by 2002:a05:6e02:1cab:: with SMTP id x11mr34212ill.235.1628418035834; Sun, 08 Aug 2021 03:20:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628418035; cv=none; d=google.com; s=arc-20160816; b=gQftyd3MYIg9jMPpCDvFRoRD7O5viZc41TYuqZhmmq2kOMqFqBMshO0Rb1b7N0efsX fCY1kMjG5xYXSA3mf1i85DhHDuFm91WA/i7qGS0mpyMc5Y2WBVK83jKHjwVnPpvx4Y/S YS86PaapzzUaPR8W0/qqi/ZgXJ86/QQhExOdrCCOuq63Op2Y7HnpWnWuJIrBc9SYp5CT 6Ibnfht58/wT3bHKRV0RqNs4DLXSTGxETrQQzTEg1NPpOUI7pU25PrHXYXQcqgXMUQ8f 3nd/FdOuijr1kea2isiUVrwA1jqQ5yzgtJeZ1+mu9GrUNZZut60xo1cKIcv92DHP9Gpy sYCw== 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; bh=/vVk6D/pHPevv99Vq24HK+/jx/jb2/alXCYPaC/CalI=; b=CfJm/ASHBDsI4nT9mRMMcyckCQC+sU7HZlVDNE1Sfiwol5nGdBBwjsaZlYaI/aDEYY In2U8lE72EXPDfa/C6PYTHihF7C2zyORWCQhOEcucKvsW8bEChzYP35v8vaTpYD4XduG XhBQOMFj1iWiVVhPzq0Ka8vJ2/uw4bS6joCPflmHQcii0AvqJIrh1/t7ePt9wPA/m5rA bfH/WA6zDcybg3/bZT5X/oQSmwwHHtW7S+wo9TYtO/W4D+25CzkMUubDpjH1dZlfwcSv RLMFYnBbciHULPg4dV/m2X/ZDiR/+RVeCRAknefGm67R2rkFWyJbDUqOL4q4Rp+Qm23u 5JjA== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x12si14572786ilm.5.2021.08.08.03.20.24; Sun, 08 Aug 2021 03:20:35 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229977AbhHHKTb (ORCPT + 99 others); Sun, 8 Aug 2021 06:19:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:42042 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229613AbhHHKTa (ORCPT ); Sun, 8 Aug 2021 06:19:30 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2576361004; Sun, 8 Aug 2021 10:19:12 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mCfte-003cJ1-5e; Sun, 08 Aug 2021 11:19:10 +0100 Date: Sun, 08 Aug 2021 11:19:09 +0100 Message-ID: <87o8a81boi.wl-maz@kernel.org> From: Marc Zyngier To: Sunil Muthuswamy Cc: Robin Murphy , 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 , Lorenzo Pieralisi Subject: Re: [EXTERNAL] Re: [RFC 1/1] irqchip/gic-v3-its: Add irq domain and chip for Direct LPI without ITS In-Reply-To: References: <87a6mt2jke.wl-maz@kernel.org> <87tuka24kj.wl-maz@kernel.org> <87r1f9wooc.wl-maz@kernel.org> <87wnp0b86y.wl-maz@kernel.org> 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: sunilmut@microsoft.com, robin.murphy@arm.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, mikelley@microsoft.com, Boqun.Feng@microsoft.com, kys@microsoft.com, arnd@arndb.de, lorenzo.pieralisi@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 06 Aug 2021 20:14:13 +0100, Sunil Muthuswamy wrote: > > On Thursday, August 5, 2021 1:35 AM, > Marc Zyngier wrote: > [...] > > > Hey Mark > > > > I assume this is for me? > > > Yes, sorry. > > > > would you be willing to consider a scoped down implementation of GIC > > > Direct LPI with just an IRQ chip implementation and no Direct LPI > > > PCI-MSI IRQ chip. > > > > Could you please clarify? If you are not implementing MSIs, how can a > > device signal LPIs? At the end of the day, something has to write into > > the RD, and it isn't going to happen by sheer magic. > > > > > This will allow a MSI provider (such as Hyper-V vPCI) to provide a > > > PCI-MSI IRQ chip on top of the Direct LPI IRQ chip and enable > > > PCI-MSI scenarios, and avoid building in assumptions in other cases > > > (like PCI) where firmware specification is not available. > > > > I really don't get what you are suggesting. Could you please describe > > what you have in mind? > > > The suggestion was to *not* implement the PCI-MSI IRQ chip in the > Direct LPI GIC implementation, but let the endpoint/specific > implementation provide for the MSI IRQ chip. > > For example, the Hyper-V vPCI module does implement a PCI-MSI IRQ > chip (refer to 'hv_pcie_init_irq_domain'). Microsoft Hypervisor > provides/virtualizes the MSI address to be used for Hyper-V vPCI. The > Hypervisor might be using the ITS in the background, but it expects > the device to be programmed with the MSI address that it provides. > And, the Hypervisor takes care of routing the interrupt to the guest. > This is done by the Hyper-V vPCI MSI IRQ chip (refer to > hv_msi_irq_chip) compose MSI message. > > Today, for X64, Hyper-V vPCI PCI-MSI irq chip parents itself to the > architectural 'x86_vector_domain'. The suggestion here was to see > if we can support a similar setup for ARM, where the Hyper-V vPCI > PCI-MSI irq chip can parent itself to the 'Direct LPI arch IRQ chip' > (to be implemented). > > The arch Direct LPI arch IRQ chip is needed to enable LPIs, invalidate > the LPI configuration (GICR_INVLPIR et. al. ) and allocate LPI IRQs from > the LPI interrupt namespace (i.e. 8192-). > > Happy to expand on this further, if the above is not clear. [+Lorenzo, as he deals with both PCI and ACPI] I think it is clear enough, but I don't see what this buys us other than turning DirectLPI into something that is essentially private to Hyper-V, just for the sake of sidestepping a firmware description. Furthermore, the Hyper-V "single MSI address" model doesn't match the way DirectLPI works (after all, this is one of the many reasons why we have the ITS). The architecture already gives you everything you need to make things work in Hyper-V. You can easily implement the DirectLPI support (you definitely need most of it anyway), and the PCI-MSI layer is *free*. All you need is a firmware description. Which I don't believe is the end of the world, given that DT is freely hackable and that IORT is an ARM-private extension to ACPI. I'm sure you know who to reach out to in order to start a draft (and if you don't, I can give you names offline). I am not interested in expanding the GICv3 architecture support if it cannot be generally used in a way that is *compliant with the architecture*. If you think DirectLPIs can make the hypervisor simpler, I'm fine with it. But let's fully embrace the concept instead of hiding it behind a layer of PV muck. It will even have a chance of working on bare metal (such as on the machine that is humming behind me, or even the Fast Model). Thanks, M. -- Without deviation from the norm, progress is not possible.