From: "Denis V. Lunev" <den@virtuozzo.com>
To: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>,
"Denis V. Lunev" <den@openvz.org>,
svt-core@virtuozzo.com
Subject: Re: [PATCH 0/2] UefiCpuPkg/MpInitLib: recover from a lost Start-up IPI #VSTOR-146639
Date: Wed, 23 Sep 2026 15:30:48 +0200 [thread overview]
Message-ID: <e4f76e8d-ce0f-4910-8bef-faf2c29cd339@virtuozzo.com> (raw)
In-Reply-To: <8e426e1c-fd47-441f-9afc-1d849d8144a7@virtuozzo.com>
On 9/23/26 15:30, Andrey Drobyshev wrote:
> On 9/21/26 6:44 PM, Denis V. Lunev wrote:
>> WaitApWakeup() spins until an AP clears its wakeup signal, with no timeout
>> and no way out. A hypervisor can lose the Start-up IPI: KVM latches INIT
>> while the target vCPU is in SMM but discards the SIPI outright. The AP is
>> left in wait-for-SIPI, the BSP spins forever, and the guest never boots.
>>
>> Analysis of the live hung guest is in the bug.
>>
>> Patch 1 exports SendStartupIpi() from LocalApicLib, so one AP can be poked
>> without an INIT that would reset an AP already running the procedure.
>> Patch 2 makes WaitApWakeup() resend rather than spin.
>>
>> Verified by dropping Start-up IPIs in KVM with a kprobe on
>> kvm_apic_send_ipi(); both firmware binaries are unmodified. Killing one
>> INIT-SIPI-SIPI sequence hangs the current firmware at all 8 drop points
>> tried, leaving the APs at CR0=0x00000010. The patched firmware boots at
>> all 8, issuing exactly one directed Start-up IPI per stranded AP. Without
>> injection, 80 boots patched against stock show no regression.
>>
>> Submitted upstream as https://github.com/tianocore/edk2/pull/13164
>>
>> Denis V. Lunev (2):
>> UefiCpuPkg: add SendStartupIpi to LocalApicLib #VSTOR-146639
>> UefiCpuPkg/MpInitLib: resend the Start-up IPI when an AP misses it
>> #VSTOR-146639
>>
>> UefiCpuPkg/Include/Library/LocalApicLib.h | 19 +++++
>> .../Library/BaseXApicLib/BaseXApicLib.c | 32 +++++--
>> .../BaseXApicX2ApicLib/BaseXApicX2ApicLib.c | 32 +++++--
>> UefiCpuPkg/Library/MpInitLib/MpLib.c | 85 +++++++++++++++++--
>> UefiCpuPkg/Library/MpInitLib/MpLib.h | 2 +
>> 5 files changed, 153 insertions(+), 17 deletions(-)
>
> Please put the component name in the subject, we have multiple
> components in development in svt-core@. Same for the branch name. We
> have FC for hci-8.0 now - should this series go into 8.0, or 8.1, or both?
>
> Andrey
both
prev parent reply other threads:[~2026-09-23 13:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 15:44 Denis V. Lunev
2026-09-21 15:44 ` [PATCH 1/2] UefiCpuPkg: add SendStartupIpi to LocalApicLib #VSTOR-146639 Denis V. Lunev
2026-09-23 13:30 ` Andrey Drobyshev
2026-09-21 15:44 ` [PATCH 2/2] UefiCpuPkg/MpInitLib: resend the Start-up IPI when an AP misses it #VSTOR-146639 Denis V. Lunev
2026-09-23 13:30 ` Andrey Drobyshev
2026-09-23 13:30 ` [PATCH 0/2] UefiCpuPkg/MpInitLib: recover from a lost Start-up IPI #VSTOR-146639 Andrey Drobyshev
2026-09-23 13:30 ` Denis V. Lunev [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=e4f76e8d-ce0f-4910-8bef-faf2c29cd339@virtuozzo.com \
--to=den@virtuozzo.com \
--cc=andrey.drobyshev@virtuozzo.com \
--cc=den@openvz.org \
--cc=svt-core@virtuozzo.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