From: Igor Mammedov <imammedo@redhat.com>
To: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org, Peter Xu <peterx@redhat.com>
Subject: Re: [kvm-unit-tests PATCH] x86/cstart: Delete "local" version of save_id() to fix x2APIC SMP bug
Date: Fri, 19 Dec 2025 09:47:26 +0100 [thread overview]
Message-ID: <20251219094726.5f970468@imammedo> (raw)
In-Reply-To: <20251218232618.2504147-1-seanjc@google.com>
On Thu, 18 Dec 2025 15:26:18 -0800
Sean Christopherson <seanjc@google.com> wrote:
> Delete cstart.S's version of save_id() to play nice with 32-bit SMP tests
> on CPUs that support x2APIC. The local version assumes xAPIC mode and so
> depending on the underlying "hardware" (e.g. AVIC vs. APICv vs. emulated,
> and with or without KVM_X86_QUIRK_LAPIC_MMIO_HOLE), may mark the wrong CPU
> as being online.
>
> Fixes: 0991c0ea ("x86: fix APs with APIC ID more that 255 not showing in id_map")
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: Peter Xu <peterx@redhat.com>
> Signed-off-by: Sean Christopherson <seanjc@google.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
> ---
> x86/cstart.S | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/x86/cstart.S b/x86/cstart.S
> index dafb330d..49ba4818 100644
> --- a/x86/cstart.S
> +++ b/x86/cstart.S
> @@ -84,13 +84,6 @@ prepare_32:
>
> smp_stacktop: .long stacktop - per_cpu_size
>
> -save_id:
> - movl $(APIC_DEFAULT_PHYS_BASE + APIC_ID), %eax
> - movl (%eax), %eax
> - shrl $24, %eax
> - lock btsl %eax, online_cpus
> - retl
> -
> ap_start32:
> setup_segments
> mov $-per_cpu_size, %esp
>
> base-commit: 31d91f5c9b7546471b729491664b05c933d64a7a
next prev parent reply other threads:[~2025-12-19 8:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 23:26 [kvm-unit-tests PATCH] x86/cstart: Delete "local" version of save_id() to fix x2APIC SMP bug Sean Christopherson
2025-12-19 8:47 ` Igor Mammedov [this message]
2026-05-19 0:40 ` Sean Christopherson
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=20251219094726.5f970468@imammedo \
--to=imammedo@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=seanjc@google.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;
as well as URLs for NNTP newsgroup(s).