From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B88441E991B; Tue, 25 Nov 2025 18:01:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764093701; cv=none; b=lAp5hPP8Bl8PDjFZwKRH5e8z9DP+AT634jKMVl40tmn1tiOey9uUHpZUM+VCZ1tQb40gm3GGcZDxW6p4RAFfKIu0vh7NzEgD+5Tu6QRqceN//BcCQCuURDbAmDPSDKYw2oLG2JJy0srG1FIq6xHu4qDPAIWWj5dVHfsjoKz4vdU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764093701; c=relaxed/simple; bh=bj5uo4YFaea0ec4MIEwRCTbZHbCe5TlxVbvsShw1aXY=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=K2eZsTsKtmFnb0AC+d2gC3U3sUynw4sIseXEOn1S60ocNnTCP+59z1SLpYXjn335BOY9x3YYefl9yoAuRrPlqWNYbc4ju117kwxuSISwjZnTA67eDG3gLWT62sgklMrAcm6KlaEjVBnsHjagEy0LbOq3bpGeczdf8RzArtxgeHk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KFS4oVhC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KFS4oVhC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56034C116B1; Tue, 25 Nov 2025 18:01:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764093701; bh=bj5uo4YFaea0ec4MIEwRCTbZHbCe5TlxVbvsShw1aXY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KFS4oVhCB+VXAulzbDF10yRzV5xjqEkoTNr/UE37efRQYxxXRggZ9Kd5TVAnMSCbs ZXj2Bs0yd26/naaJK+S3LS3BgC+9KBIaJdXHh3QgrarfrF1hayBhY1gNzW8I9nmpKw /Z4D8bRawtI0b0UPt/jlfHI6Lcwbl7p3AIloJflYxB9h48EboUoYXyYgO2tSzeCafa WetwUykAhv1Gq1gnzheNgIgsPEtsPaw/H7suS0hy6eLRgVc5aDkzimzbkAkNEgPVqa E4m07tmQ87IKQ+NkJY9B+jTKlmpMnbSZ3xcPDPu/Onrv2wyg/1qGH8+w1eW2bmApPj 99UkVyOQoy56Q== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vNxMA-00000008ExP-3ppO; Tue, 25 Nov 2025 18:01:39 +0000 Date: Tue, 25 Nov 2025 18:01:38 +0000 Message-ID: <86bjkqq9dp.wl-maz@kernel.org> From: Marc Zyngier To: Anirudh Raybharam Cc: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, longli@microsoft.com, catalin.marinas@arm.com, will@kernel.org, tglx@linutronix.de, Arnd Bergmann , akpm@linux-foundation.org, agordeev@linux.ibm.com, guoweikang.kernel@gmail.com, osandov@fb.com, bsz@amazon.de, linux-hyperv@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH 2/3] irqchip/gic-v3: allocate one SGI for MSHV In-Reply-To: <20251125170124.2443340-3-anirudh@anirudhrb.com> References: <20251125170124.2443340-1-anirudh@anirudhrb.com> <20251125170124.2443340-3-anirudh@anirudhrb.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/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-hyperv@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: anirudh@anirudhrb.com, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, longli@microsoft.com, catalin.marinas@arm.com, will@kernel.org, tglx@linutronix.de, arnd@arndb.de, akpm@linux-foundation.org, agordeev@linux.ibm.com, guoweikang.kernel@gmail.com, osandov@fb.com, bsz@amazon.de, linux-hyperv@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Tue, 25 Nov 2025 17:01:23 +0000, Anirudh Raybharam wrote: > > From: Anirudh Rayabharam > > From: Anirudh Rayabharam (Microsoft) > > Currently SGIs are allocated only for the smp subsystem. The MSHV > (Microsoft Hypervisor aka Hyper-V) code also needs an SGI that can be > programmed into the SYNIC to receive intercepts from the hypervisor. The > hypervisor would then assert this SGI whenever there is a guest > VMEXIT. > > Allocate one SGI for MSHV use in addition to the SGIs allocated for > IPIs. When running under MSHV, the full SGI range can be used i.e. no > need to reserve SGIs 8-15 for the secure firmware. > > Since this SGI is needed only when running as a parent partition (i.e. > we can create guest partitions), check for it before allocating an SGI. Sorry, but that's not an acceptable situation. SGIs are for Linux to use, nobody else, and that allocation must be the same irrespective of whether Linux runs virtualised or not. This also won't work with GICv5 (there are no SGIs at all), so this is doomed from the very start, and would immediately create technical debt. If you want to signal an interrupt to Linux, expose a device with an interrupt in a firmware table (i.e. not an SGI), and use that in your driver. Thanks, M. -- Without deviation from the norm, progress is not possible.