On Thu, Jul 02, 2026 at 02:38:24PM +0200, Mohamed Mediouni wrote:
> > On 2. Jul 2026, at 13:47, Paolo Bonzini <[email protected]> wrote:
> > What is the issue? The interrupt won't be triggered either if you use a 
> > separate field, or if you use the normal one.
> 
> Hi,
> 
> For injecting LINT0, it’s possible on modern WHPX when using the hw irqchip
>  - starting from Server 2022/Windows 11 only - not before that point.
> 
> How it’s done is though cancelling the vCPU execution, wait until the vm exits
> as a result, set an interrupt window, run the vCPU again and then when it 
> exits
> Manually injecting an event…
> 
> That’s unlike non-legacy interrupts where the request interrupts path actually
> works on Hyper-V.
> 
> > 
> > For LINT1, can you not inject an NMI either?
> 
> The request interrupt path works at least to some extent on LINT1/NMIs unlike 
> LINT0
> but didn’t dig deeper to see if it has more issues…
> 
> I’m convinced that an Hyper-V specific structure is the wrong idea for this 
> though...

Thanks for chiming in Mohamed. Indeed, I think the culprit is that
injecting legacy interrupts is currently not working as expected on
MSHV either, so this behaviour is probably related to Microsoft
Hypervisor itself.

When you refer to "cancelling the vCPU exection", I suspect you mean
manipulating the intercept/explicit suspend registers? I understand that
the mshv driver maintainers would prefer not to expose that particular
knob, since the kernel driver maintains some internal suspend state. Thus
the hvcall is blocked from dom0 userspace currently. I'll have to further
clarify that with the mshv team, though.

Mirroring the LINT0/1 fields in a dedicated MsvhApic structure was
motivated by the legacy interrupt injection path not working and thus
breaking the destination on a migration. Assuming we don't have the option
to make it work without a kernel change (in the short term), what
would be your suggestion?

I can image we can short-circuit this chain for mshv, is that
preferable?

pic_irq_request() => apic_accept_pic_intr() => apic_deliver_pic_intr()

best,

magnus

Reply via email to