[PATCH] KVM: arm64: GICv3: Keep active LPIs in the LRs
Brad Fitzpatrick
bradfitz at tailscale.com
Tue Dec 1 21:27:40 PST 2026
On Thu, Nov 26, 2026 at 3:15 PM Brad Fitzpatrick <bradfitz at tailscale.com> wrote:
>
> On Thu, Nov 26, 2026 at 12:45 AM Marc Zyngier <maz at kernel.org> wrote:
> >
> > Hi Brad,
> >
> > On Thu, 26 Nov 2026 01:42:04 +0000,
> > Brad Fitzpatrick via B4 Relay <devnull+bradfitz.tailscale.com at kernel.org> wrote:
> > >
> > > From: Brad Fitzpatrick <bradfitz at tailscale.com>
> > >
> > > Since commit 73c9726975af ("KVM: arm64: GICv3: Drop LPI active state
> > > when folding LRs"), the active state of a virtual LPI is discarded on
> > > every exit. If the guest has acknowledged an LPI but not yet EOI'd it
> > > when an exit happens, the LPI is then pruned from the ap_list, and the
> > > guest's subsequent EOI targets an INTID that is not in any LR. KVM then
> > > relies on the virtual CPU interface performing the priority drop
> > > regardless.
> > >
> > > That doesn't hold for Apple's emulated GICv3 interface, as exposed by
> > > macOS Virtualization.framework to a Linux guest running with nested
> > > virtualization (M3 and later, e.g. "tart run --nested"). There, an EOI
> > > of a vLPI that has no LR leaves the corresponding ICH_AP1R0_EL2 bit set.
> > > The running priority of the vCPU stays at the LPI's priority forever,
> > > and since Linux uses the same priority for all of its interrupts,
> > > nothing is ever delivered to that vCPU again. The nested guest's CPU
> > > spins on WFI, with KVM seeing pending interrupts and waking it up over
> > > and over (about 30k WFI exits per second), while the guest itself
> > > reports a hard lockup on that CPU. With a 2-vCPU Debian guest, this
> > > happens within the first minute of boot, every time.
> >
> > [...]
> >
> > This is a known bug on Apple HW running MacOS, which has been reported
> > a number of times to Apple (both directly and through hypervisor
> > vendors), and resulted in a deafening silence.
To close this thread, I heard from contacts at Apple that it's fixed
in macOS 27.2, which I've confirmed (in macOS 27.2.1). The tests in
https://github.com/bradfitz/pve-on-macos-nested-virt-fix now pass. I
now see VM firmware version 2167.0.0.0.0. And Proxmox (Debian) boots
under macOS and started a nested Linux guest as well now.
(with same proxmox versions that failed prior)
Sorry for the distraction!
- Brad
More information about the linux-arm-kernel
mailing list