mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Elliott, Robert (Servers)" <elliott@hpe.com>
To: "Mateusz Jończyk" <mat.jonczyk@o2.pl>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Johan Hovold <johan@kernel.org>,
	"Maciej W. Rozycki" <macro@orcam.me.uk>,
	Yinghai Lu <yinghai@kernel.org>
Subject: RE: [PATCH v2 02/10] x86/apic: fix panic message when x2APIC is not supported
Date: Thu, 27 Oct 2022 15:08:53 +0000	[thread overview]
Message-ID: <MW5PR84MB1842E5688F1766821635FD6DAB339@MW5PR84MB1842.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20220911084711.13694-3-mat.jonczyk@o2.pl>



> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
...
> @@ -1902,7 +1902,7 @@ static int __init validate_x2apic(void)
>  	/*
>  	 * Checkme: Can we simply turn off x2apic here instead of panic?
>  	 */
> -	panic("BIOS has enabled x2apic but kernel doesn't support x2apic, please disable x2apic in BIOS.\n");
> +	panic("Kernel does not support x2APIC, please recompile with CONFIG_X86_X2APIC or disable x2APIC in BIOS.\n");

With a defconfig build (no CONFIG_X86_X2APIC) on a system with x2apic,
I noticed this triggers before ever getting to that panic() call:

    static void setup_local_APIC(void)
    ...
        /*
         * Double-check whether this APIC is really registered.
         * This is meaningless in clustered apic mode, so we skip it.
         */
        BUG_ON(!apic->apic_id_registered());

That was also reported in 2020:
    https://lkml.org/lkml/2020/2/21/1501

The BUG print is:
[    5.827523] APIC: Switch to symmetric I/O mode setup
[    5.832519] ------------[ cut here ]------------
[    5.837163] kernel BUG at arch/x86/kernel/apic/apic.c:1593!
[    5.842767] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
[    5.848009] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.0.0-rc1-14412-g34ab3d31f076 #1
[    5.855954] Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 03/08/2022
[    5.864508] RIP: 0010:setup_local_APIC+0x3aa/0x3c0
[    5.869317] Code: 02 0f 85 ca fe ff ff 85 d2 7f 26 48 8b 05 be 4d 62 01 be 00 07 01 00 bf 50 03 00 00 48 8b 40 10 e8 ab 51 fb 00 e9 c9 fe ff ff <0f> 0b e8 df 5f cb 00 e9 45 7f c5 00 66 2e 0f 1f 84 00 00 00 00 00
[    5.888156] RSP: 0000:ffffffffa6403e90 EFLAGS: 00010246
[    5.893398] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[    5.900555] RDX: 0000000000000000 RSI: 00000000fffffeff RDI: 0000000000000020
[    5.907712] RBP: ffffa2837ffea180 R08: 00000000ffffdfff R09: 00000000ffffdfff
[    5.914870] R10: ffffffffa6455f20 R11: ffffffffa6455f20 R12: ffffa2837ffea1c9
[    5.922027] R13: 0000000000000000 R14: ffffffffa6414120 R15: 000000009f1597b0
[    5.929185] FS:  0000000000000000(0000) GS:ffffa252c0000000(0000) knlGS:0000000000000000
[    5.937304] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    5.943067] CR2: ffffa2837fdff000 CR3: 00000028d320c001 CR4: 00000000000606f0
[    5.950225] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    5.957385] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[    5.964543] Call Trace:
[    5.966994]  <TASK>
[    5.969097]  ? _printk+0x63/0x7e
[    5.972338]  apic_intr_mode_init+0xde/0xfc
[    5.976448]  x86_late_time_init+0x1b/0x2f
[    5.980471]  start_kernel+0x5db/0x69b
[    5.984143]  secondary_startup_64_no_verify+0xe0/0xeb
[    5.989213]  </TASK>



  reply	other threads:[~2022-10-27 15:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-11  8:47 [PATCH v2 00/10] x86: Kconfig cleanups and help text improvements Mateusz Jończyk
2022-09-11  8:47 ` [PATCH v2 01/10] x86/Kconfig: enable X86_X2APIC by default and improve help text Mateusz Jończyk
2022-10-26 18:38   ` Borislav Petkov
2022-12-01 15:11     ` Thomas Gleixner
2022-10-27 14:45   ` Elliott, Robert (Servers)
2022-10-27 15:07     ` Dave Hansen
2022-11-03 23:41       ` Elliott, Robert (Servers)
2022-11-04 17:29         ` Dave Hansen
2024-02-02 14:08   ` David Heidelberg
2024-02-15 21:10     ` Mateusz Jończyk
2024-02-20 16:26       ` David Heidelberg
2024-07-05 22:28       ` David Heidelberg
2022-09-11  8:47 ` [PATCH v2 02/10] x86/apic: fix panic message when x2APIC is not supported Mateusz Jończyk
2022-10-27 15:08   ` Elliott, Robert (Servers) [this message]
2022-09-11  8:47 ` [PATCH v2 03/10] x86/Kconfig: always enable ARCH_SPARSEMEM_ENABLE Mateusz Jończyk
2022-09-11  8:47 ` [PATCH v2 04/10] x86/Kconfig: drop X86_32_NON_STANDARD Mateusz Jończyk
2022-09-11  8:47 ` [PATCH v2 05/10] x86/Kconfig: move all X86_EXTENDED_PLATFORM options together Mateusz Jończyk
2022-09-11  8:47 ` [PATCH v2 06/10] x86/Kconfig: update lists in X86_EXTENDED_PLATFORM Mateusz Jończyk
2022-09-11  8:47 ` [PATCH v2 07/10] x86/Kconfig: document CONFIG_PCI_MMCONFIG Mateusz Jończyk
2022-09-11  8:47 ` [PATCH v2 08/10] x86/Kconfig: make CONFIG_PCI_CNB20LE_QUIRK depend on X86_32 Mateusz Jończyk
2022-09-13 22:50   ` Bjorn Helgaas
2022-09-11  8:47 ` [PATCH v2 09/10] x86/Kconfig: document release year of glibc 2.3.3 Mateusz Jończyk
2022-09-11  8:47 ` [PATCH v2 10/10] x86/Kconfig: remove CONFIG_ISA_BUS Mateusz Jończyk

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=MW5PR84MB1842E5688F1766821635FD6DAB339@MW5PR84MB1842.NAMPRD84.PROD.OUTLOOK.COM \
    --to=elliott@hpe.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@orcam.me.uk \
    --cc=mat.jonczyk@o2.pl \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yinghai@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®