Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2514973pxt; Mon, 9 Aug 2021 02:16:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxauAXChPZxjU5mn7+RYC0wF6R/qRZsHCT7gOGJW2Q9GQeyrDcmJs1B5B7YUGhvtQ9E5N8I X-Received: by 2002:a92:d103:: with SMTP id a3mr1162288ilb.0.1628500590837; Mon, 09 Aug 2021 02:16:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628500590; cv=none; d=google.com; s=arc-20160816; b=RyLNJDBD2MoX0Z7neDgj+BcLGf1RW0PdimHwUryZLDqoNqTEBLDiNfkmO17dGwt81/ BVi/KnZ0DAlyCvgV0ZgGoJFouUsxZHhlX4wtO74IEOG43IpdOOyD9b1AhWcWqs6qyZmy m/gYlcnuj/m3E/419uIk7XJSAh551Pi7TOpQhwR/OEu3ZgbYMuMlgcXdzh5bSeHkfNz0 uxCjQiCIs1koBDeJxpHR+nUwS6rzl2yVswiSzPymWqS8IU9ciLbndx8GpFM2DEgIPdaZ 6BV8njcIFtP+Q+8CeV0QZRPRPdMdloHRfakVGRwY9/yuX7+DfLWc/B9ekmfmjbLFWznC hhRw== 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=aDSaQh1mFfc8Moq5YSE6Txmr8P9/Ldz4Efn4O1Qz18w=; b=jrQ6KbO2sEkam9LaJO9JAUk2aUlSawNRXX7wB5E3qYk0RAwjaYYDxAbEyEBgrJQBDw lT6kUfb6u0GHkF2wX1CEcJH2sQzLcQMUVluCCE1PPRm4wYNf0i+6E0ix3vd2mPiAyM6p YDllws7CJxua+BFBAiVDleP0Y6YT80yqrXF3dCOIqaa5OZkaqxEBtYmRLQ5XZn9Gx9I9 G4XoHag3W9tqPWUk2r6mItiAjBL4JypFoUO0aq3BOfB/XWxE0gmtiPwKjt/hQYgLPxK5 Rzu0h9YVQ3MlSs9XAWlUemAYsHKigmNDWjAyLNgbUEE0hO/NUEndIdDwdkmzfn5WB6jI xxKQ== 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 g11si3301419ilq.74.2021.08.09.02.16.18; Mon, 09 Aug 2021 02:16:30 -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 S234235AbhHIJPi (ORCPT + 99 others); Mon, 9 Aug 2021 05:15:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:33334 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234157AbhHIJPi (ORCPT ); Mon, 9 Aug 2021 05:15:38 -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 322D560F02; Mon, 9 Aug 2021 09:15:18 +0000 (UTC) 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.94.2) (envelope-from ) id 1mD1NM-003mK7-0J; Mon, 09 Aug 2021 10:15:16 +0100 Date: Mon, 09 Aug 2021 10:15:15 +0100 Message-ID: <87pmunasik.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> <87o8a81boi.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 Mon, 09 Aug 2021 03:35:05 +0100, Sunil Muthuswamy wrote: > > Sunday, August 8, 2021 3:19 AM, > Marc Zyngier wrote: > > > > [+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). > > > That sounds reasonable. The DT extension here alone wont suffice for > Hyper-V and we would need the ACPI IORT extension here as well. Our > general experience with ACPI extension is that they can take time. But, > I am curious to hear from Lorenzo on his thoughts here and if just an > IORT extension means anything else in terms of timelines. > > > 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). > > > Appreciate your inputs. Since we are discussing options, there is one more > option to enable Hyper-V virtual PCI for ARM64 that I do would like to > discuss. That option is to implement the IRQ chip completely within the > Hyper-V module itself. That IRQ chip will take care of allocating LPI vectors, > enabling the interrupt (unmask, mask etc..). It won't be a Direct LPI based, > but based on custom Hyper-V methods. That chip will parent itself to the > GIC v3 IRQ domain. The only extra thing needed for this is for the Hyper-V > IRQ chip to be able to discover the GIC v3 IRQ domain, for which it > cannot use the 'irq_find_matching_fwnode' method as Hyper-V virtual > PCI bus/devices are not firmware enumerated. I am not sure if there is any > other way to discover the GIC (DOMAIN_BUS_WIRED) domain. > > What are your thoughts/feedback on the above? This will allow us to > enable the scenario for the business timelines we are targeting for, while > we wait for firmware spec updates. Long term we also want to use > architectural methods here as that helps the Hypervisor as well, and I > would be glad to pursue the firmware spec updates in parallel. This feels like yet another layer of PV ugliness that has the side effect of fragmenting the architectural support. If you plug directly into the GICv3 layer, I'd rather you inject SPIs, just like any other non-architectural MSI controller. You can directly interface with the ACPI GSI layer for that, without any need to mess with the GICv3 internals. The SPI space isn't very large, but still much larger than the equivalent x86 space (close to 1000). If time is of the essence, I suggest you go the SPI way. For anything involving LPIs, I really want to see a firmware spec that works for everyone as opposed to a localised Hyper-V hack. Thanks, M. -- Without deviation from the norm, progress is not possible.