[PATCH] KVM: arm64: vgic: Pick EOIcount deactivations from AP-list tail
Valentine Burley
valentine.burley at collabora.com
Sat Mar 7 12:56:11 PST 2026
On Sat, 07 Mar 2026 20:11:51 +0100 Marc Zyngier <maz at kernel.org> wrote
> Valentine reports that their guests fail to boot correctly, losing
> interrupts, and indicates that the wrong interrupt gets deactivated.
>
> What happens here is that if the maintenance interrupt is slow enough
> to kick us out of the guest, extra interrupts can be activated from
> the LRs. We then exit and proceed to handle EOIcount deactivations,
> picking active interrupts from the AP list. But we start from the
> top of the list, potentially deactivating interrupts that were in
> the LRs, while EOIcount only denotes deactivation of interrupts that
> are not present in an LR.
>
> Solve this by tracking the last interrupt that made it in the LRs,
> and start the EOIcount deactivation walk *after* that interrupt.
> Since this only makes sense while the vcpu is loaded, stash this
> in the per-CPU host state.
>
> Huge thanks to Valentine for doing all the detective work and
> providing an initial patch.
>
> Fixes: 3cfd59f81e0f3 ("KVM: arm64: GICv3: Handle LR overflow when EOImode==0")
> Fixes: 281c6c06e2a7b ("KVM: arm64: GICv2: Handle LR overflow when EOImode==0")
> Reported-by: Valentine Burley <valentine.burley at collabora.com>
> Signed-off-by: Marc Zyngier <maz at kernel.org>
> Link: https://lore.kernel.org/r/20260307115955.369455-1-valentine.burley@collabora.com
> Cc: stable at vger.kernel.org
Tested-by: Valentine Burley <valentine.burley at collabora.com>
Thanks a lot again for the quick fix!
Cheers,
Valentine
More information about the linux-arm-kernel
mailing list