Re: [PATCH 2/3] irqchip/gic-v3: allocate one SGI for MSHV

Marc Zyngier
2025-11-25T18:01:41Z

On Tue, 25 Nov 2025 17:01:23 +0000,
Anirudh Raybharam <anirudh@anirudhrb.com> wrote:
>
> From: Anirudh Rayabharam <anirudh@anirudhrb.com>
>
> From: Anirudh Rayabharam (Microsoft) <anirudh@anirudhrb.com>
>
> 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.