From: Thomas Gleixner <tglx@linutronix.de>
To: Chris Lindee <chris.lindee@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>,
regressions@lists.linux.dev, Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "Peter Zijlstra (Intel)" <peterz@infradead.org>,
Ashok Raj <ashok.raj@intel.com>,
David Woodhouse <dwmw@amazon.co.uk>
Subject: Re: [REGRESSION] x86/smpboot/64: System will not boot on v6.5, v6.7-rc4
Date: Thu, 14 Dec 2023 08:04:13 +0100 [thread overview]
Message-ID: <87ttolnu36.ffs@tglx> (raw)
In-Reply-To: <CA+2tU5-18YQSpFzgUKyeZdJXe0Rs0GxtYY2s5QjznzTucJKCiQ@mail.gmail.com>
On Wed, Dec 13 2023 at 23:04, Chris Lindee wrote:
> On Wed, Dec 13, 2023 at 7:35 PM Chris Lindee <chris.lindee@gmail.com> wrote:
>
>> The following are the processor options made available by the BIOS, with
>> the currently selected value. If there are any interesting combinations
>> that you'd like tested, I can try a handful of them.
>>
>
>> x2APIC Mode: Enabled (requires Virtualization Technology to enable)
>>
>
> I disabled x2APIC and the system would boot, both without "cpuhp.parallel"
> and with "cpuhp.parallel=1" on the command line.
I would have expected that.
With the completely untested patch below it should also boot in X2APIC
mode even with the broken AP configuration in the BIOS.
Thanks,
tglx
---
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -255,6 +255,22 @@ SYM_INNER_LABEL(secondary_startup_64_no_
testl $X2APIC_ENABLE, %eax
jnz .Lread_apicid_msr
+#ifdef CONFIG_X86_X2APIC
+ /*
+ * If system is in X2APIC mode then MMIO base mignt not be
+ * mapped causing the MMIO read below to fault. Faults can't
+ * be handled at that point.
+ */
+ cmpl $0, x2apic_mode(%rip)
+ jz .Lread_apicid_mmio
+
+ /* Force the AP into X2APIC mode. */
+ orl $X2APIC_ENABLE, %eax
+ wrmsr
+ jmp .Lread_apicid_msr
+#endif
+
+.Lread_apicid_mmio:
/* Read the APIC ID from the fix-mapped MMIO space. */
movq apic_mmio_base(%rip), %rcx
addq $APIC_ID, %rcx
next prev parent reply other threads:[~2023-12-14 7:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CA+2tU59853R49EaU_tyvOZuOTDdcU0RshGyydccp9R1NX9bEeQ@mail.gmail.com>
2023-12-10 11:05 ` [REGRESSION] x86/smpboot/64: System will not boot on v6.5, v6.7-rc4 Borislav Petkov
[not found] ` <CA+2tU585yW2z37NtYqjVe+ZMw+oU_vbS4X=Q=sAxME8GrPFDpg@mail.gmail.com>
2023-12-12 14:34 ` Thomas Gleixner
[not found] ` <CA+2tU5_TzDQO2U8SGDYhsVPR8iYh8Q8vTqv9+HUc7LN3cV=2Sg@mail.gmail.com>
2023-12-13 14:34 ` Thomas Gleixner
2023-12-13 21:08 ` Thomas Gleixner
[not found] ` <CA+2tU5-RoR8qCGRdsMH0wo5n8v4fV8A_H5yT+mZadsF7E+QkWg@mail.gmail.com>
[not found] ` <CA+2tU5-18YQSpFzgUKyeZdJXe0Rs0GxtYY2s5QjznzTucJKCiQ@mail.gmail.com>
2023-12-14 7:04 ` Thomas Gleixner [this message]
[not found] ` <CA+2tU596G+auWJ2MzYFJ3bv=Y4zP2NSrdtak7SdF9SH6Ht_dzg@mail.gmail.com>
2023-12-15 8:58 ` [PATCH] x86/smpboot/64: Handle X2APIC BIOS inconsistency gracefully Thomas Gleixner
2023-12-15 15:41 ` Ashok Raj
[not found] ` <CA+2tU5_hD-atkp9UcCJnL6TMneSOBxL87=ppvrQ1ugUn_0-7NA@mail.gmail.com>
2023-12-15 18:35 ` Borislav Petkov
2023-12-12 15:32 ` [REGRESSION] x86/smpboot/64: System will not boot on v6.5, v6.7-rc4 Linux regression tracking #adding (Thorsten Leemhuis)
2024-03-11 19:47 ` Guenter Roeck
2024-03-12 9:13 ` Thorsten Leemhuis
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=87ttolnu36.ffs@tglx \
--to=tglx@linutronix.de \
--cc=ashok.raj@intel.com \
--cc=bp@alien8.de \
--cc=chris.lindee@gmail.com \
--cc=dave.hansen@linux.intel.com \
--cc=dwmw@amazon.co.uk \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=regressions@lists.linux.dev \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.