From: Jiri Olsa <jolsa@redhat.com>
To: Prarit Bhargava <prarit@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Peter Zijlstra <peterz@infradead.org>,
Len Brown <len.brown@intel.com>, Borislav Petkov <bp@suse.de>,
Andi Kleen <ak@linux.intel.com>, Juergen Gross <jgross@suse.com>,
dyoung@redhat.com, Eric Biederman <ebiederm@xmission.com>,
kexec@lists.infradead.org
Subject: Re: [PATCH] arch/x86: Fix kdump on x86 with physically hotadded CPUs
Date: Tue, 4 Oct 2016 00:22:54 +0200 [thread overview]
Message-ID: <20161003222254.GA13651@krava> (raw)
In-Reply-To: <1475514432-27682-1-git-send-email-prarit@redhat.com>
On Mon, Oct 03, 2016 at 01:07:12PM -0400, Prarit Bhargava wrote:
SNIP
>
> This patch adds the missing generic_processor_info() to
> prefill_possible_map() to ensure the initialization of the boot cpu is
> correct. This results in smp_init_package_map() having correct data and
> properly setting the package map for the hotplugged boot cpu, which in
> turn resolves the kdump kernel panic on physically hotplugged cpus.
>
> [1] This can be simulated in a KVM environment by hot adding a CPU and
> using taskset to force the dump on the newly added CPU.
> [2] prefill_possible_map() is called before smp_store_boot_cpu_info().
> The comment beside the call to smp_store_boot_cpu_info() states that the
> completed call results in "Final full version of the data".
>
> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
> Fixes: 1f12e32f4cd5 ("x86/topology: Create logical package id")
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: x86@kernel.org
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Len Brown <len.brown@intel.com>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Andi Kleen <ak@linux.intel.com>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Cc: Juergen Gross <jgross@suse.com>
> Cc: dyoung@redhat.com
> Cc: Eric Biederman <ebiederm@xmission.com>
> Cc: kexec@lists.infradead.org
Reviewed-by: Jiri Olsa <jolsa@redhat.com>
thanks,
jirka
> ---
> arch/x86/kernel/smpboot.c | 15 ++++++++++++---
> 1 file changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index 4296beb8fdd3..d1272febc13b 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -1406,9 +1406,18 @@ __init void prefill_possible_map(void)
> {
> int i, possible;
>
> - /* no processor from mptable or madt */
> - if (!num_processors)
> - num_processors = 1;
> + /* No boot processor was found in mptable or ACPI MADT */
> + if (!num_processors) {
> + /* Make sure boot cpu is enumerated */
> + if (apic->cpu_present_to_apicid(0) == BAD_APICID &&
> + apic->apic_id_valid(boot_cpu_physical_apicid))
> + generic_processor_info(boot_cpu_physical_apicid,
> + apic_version[boot_cpu_physical_apicid]);
> + if (!num_processors) {
> + pr_warn("CPU 0 not enumerated in mptable or ACPI MADT\n");
> + num_processors = 1;
> + }
> + }
>
> i = setup_max_cpus ?: 1;
> if (setup_possible_cpus == -1) {
> --
> 1.7.9.3
>
next prev parent reply other threads:[~2016-10-03 22:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-03 17:07 [PATCH] arch/x86: Fix kdump on x86 with physically hotadded CPUs Prarit Bhargava
2016-10-03 22:22 ` Jiri Olsa [this message]
2016-10-04 10:58 ` Thomas Gleixner
2016-10-04 12:09 ` Prarit Bhargava
2016-10-04 14:38 ` Thomas Gleixner
2016-10-04 16:01 ` Prarit Bhargava
2016-10-05 16:14 ` Jiri Olsa
2016-10-06 15:25 ` Prarit Bhargava
2016-10-07 6:49 ` Jiri Olsa
2016-10-07 8:02 ` Thomas Gleixner
2016-10-04 12:27 ` Jiri Olsa
2016-10-04 14:19 ` Thomas Gleixner
2016-10-07 13:28 ` [tip:x86/urgent] arch/x86: Handle non enumerated CPU after physical hotplug tip-bot for Prarit Bhargava
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=20161003222254.GA13651@krava \
--to=jolsa@redhat.com \
--cc=ak@linux.intel.com \
--cc=bp@suse.de \
--cc=dyoung@redhat.com \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=kexec@lists.infradead.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=prarit@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