Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Brad Fitzpatrick <bradfitz@tailscale.com>
Cc: Oliver Upton <oupton@kernel.org>,
	Fuad Tabba <fuad.tabba@linux.dev>,
	Joey Gouly <joey.gouly@arm.com>,
	Steffen Eiden <seiden@linux.ibm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	stable@vger.kernel.org
Subject: Re: [PATCH] KVM: arm64: GICv3: Keep active LPIs in the LRs
Date: Wed, 02 Dec 2026 09:03:00 +0000	[thread overview]
Message-ID: <86fqwgxdff.wl-maz@kernel.org> (raw)
In-Reply-To: <CAMkNuKBqUQfxujoOxJ5VEUCmJx8km5YyX1jFVJoDQswr2Gju1g@mail.gmail.com>

On Wed, 02 Dec 2026 05:27:40 +0000,
Brad Fitzpatrick <bradfitz@tailscale.com> wrote:
> 
> On Thu, Nov 26, 2026 at 3:15 PM Brad Fitzpatrick <bradfitz@tailscale.com> wrote:
> >
> > On Thu, Nov 26, 2026 at 12:45 AM Marc Zyngier <maz@kernel.org> wrote:
> > >
> > > Hi Brad,
> > >
> > > On Thu, 26 Nov 2026 01:42:04 +0000,
> > > Brad Fitzpatrick via B4 Relay <devnull+bradfitz.tailscale.com@kernel.org> wrote:
> > > >
> > > > From: Brad Fitzpatrick <bradfitz@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.

Ah, that's excellent news! I'm glad they finally addressed it.

> (with same proxmox versions that failed prior)
> 
> Sorry for the distraction!

Not at all, thank you for letting us know!

	M.

-- 
Without deviation from the norm, progress is not possible.


      reply	other threads:[~2026-12-02  9:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  1:42 [PATCH] KVM: arm64: GICv3: Keep active LPIs in the LRs Brad Fitzpatrick via B4 Relay
2026-11-26  8:45 ` Marc Zyngier
2026-11-26 23:15   ` Brad Fitzpatrick
2026-12-02  5:27     ` Brad Fitzpatrick
2026-12-02  9:03       ` Marc Zyngier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86fqwgxdff.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=bradfitz@tailscale.com \
    --cc=catalin.marinas@arm.com \
    --cc=fuad.tabba@linux.dev \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=oupton@kernel.org \
    --cc=seiden@linux.ibm.com \
    --cc=stable@vger.kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox