From: Kairui Song <ryncsn@gmail.com>
To: linux-kernel@vger.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>,
Eric Biederman <ebiederm@xmission.com>,
x86@kernel.org, kexec@lists.infradead.org,
Kairui Song <kasong@tencent.com>
Subject: [PATCH 0/2] x86/mpparse, kexec: Fix kdump/kexec kernel panic with MPTABLE and x2apic
Date: Wed, 8 Jun 2022 14:43:46 +0800 [thread overview]
Message-ID: <20220608064348.66402-1-ryncsn@gmail.com> (raw)
From: Kairui Song <kasong@tencent.com>
Following kernel panic is observed when doing kdump/kexec on
qemu-kvm VMs that uses MPTABLE, not ACPI MADT, and supports x2apic:
Intel MultiProcessor Specification v1.4
MPTABLE: OEM ID: BOCHSCPU
MPTABLE: Product ID: 0.1
MPTABLE: APIC at: 0xFEE00000
BUG: unable to handle page fault for address: ffffffffff5fc020
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 25e15067 P4D 25e15067 PUD 25e17067 PMD 25e18067 PTE 0
Oops: 0000 [#1] SMP NOPTI
CPU: 0 PID: 0 Comm: swapper Not tainted 5.14.10-300.fc35.x86_64 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1.fc35 04/01/2014
RIP: 0010:native_apic_mem_read+0x2/0x10
Code: 14 25 20 cd e3 82 c3 90 bf 30 08 00 00 ff 14 25 18 cd e3 82 c3 cc cc cc 89 ff 89 b7 00 c0 5f ff c3 0f 1f 80 00 00 00 00 89 ff <8b> 87 00 c0 5f ff c3 0f 1f 80 00 00 00 0
RSP: 0000:ffffffff82e03e18 EFLAGS: 00010046
RAX: ffffffff81064840 RBX: ffffffffff240b6c RCX: ffffffff82f17428
RDX: c0000000ffffdfff RSI: 00000000ffffdfff RDI: 0000000000000020
RBP: ffff888023200000 R08: 0000000000000000 R09: ffffffff82e03c50
R10: ffffffff82e03c48 R11: ffffffff82f47468 R12: ffffffffff240b40
R13: ffffffffff200b30 R14: 0000000000000000 R15: 00000000000000d4
FS: 0000000000000000(0000) GS:ffffffff8365b000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffff5fc020 CR3: 0000000025e10000 CR4: 00000000000006b0
Call Trace:
? read_apic_id+0x15/0x30
? register_lapic_address+0x76/0x97
? default_get_smp_config+0x28b/0x42d
? dmi_check_system+0x1c/0x60
? acpi_boot_init+0x1d/0x4c3
? setup_arch+0xb37/0xc2a
? slab_is_available+0x5/0x10
? start_kernel+0x61/0x980
? load_ucode_bsp+0x4c/0xcd
? secondary_startup_64_no_verify+0xc2/0xcb
Modules linked in:
CR2: ffffffffff5fc020
random: get_random_bytes called from oops_exit+0x35/0x60 with crng_init=0
---[ end trace c9e569df3bdbefd3 ]---
It turns out MPTABLE doesn't play well with pre-enabled x2apic mode,
this series extend the apic driver interface and let MPTABLE parse
probe the driver properly.
This can be easily reproduced with qemu-kvm, use -no-acpi and enable
x2apic, so x2apic with MPTABLE will be in use, then trigger kdump/kexec.
Kairui Song (2):
x86, apic: add a more generic early_probe
x86/mpparse, kexec: probe apic driver early for x2apic
arch/x86/include/asm/apic.h | 6 ++++++
arch/x86/kernel/apic/probe_64.c | 16 ++++++++++++++++
arch/x86/kernel/apic/x2apic_cluster.c | 8 +++++++-
arch/x86/kernel/apic/x2apic_phys.c | 8 +++++++-
arch/x86/kernel/mpparse.c | 4 +++-
5 files changed, 39 insertions(+), 3 deletions(-)
--
2.35.2
next reply other threads:[~2022-06-08 7:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 6:43 Kairui Song [this message]
2022-06-08 6:43 ` [PATCH 1/2] x86/apic: add a more generic early_probe Kairui Song
2022-06-08 6:43 ` [PATCH 2/2] x86/mpparse, kexec: probe apic driver early for x2apic Kairui Song
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=20220608064348.66402-1-ryncsn@gmail.com \
--to=ryncsn@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=ebiederm@xmission.com \
--cc=kasong@tencent.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox