From: Chao Peng <chao.p.peng@linux.intel.com>
To: Ed Swierk <eswierk@skyportsystems.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Jan Beulich <JBeulich@suse.com>,
xen-devel@lists.xen.org
Subject: Re: Crash in set_cpu_sibling_map() booting Xen 4.6.0 on Fusion
Date: Mon, 23 Nov 2015 13:39:02 +0800 [thread overview]
Message-ID: <20151123053902.GB9174@pengc-linux.bj.intel.com> (raw)
In-Reply-To: <20151123011008.GA9174@pengc-linux.bj.intel.com>
On Mon, Nov 23, 2015 at 09:10:08AM +0800, Chao Peng wrote:
> On Fri, Nov 20, 2015 at 05:21:11PM -0800, Ed Swierk wrote:
> > The problem is that the index of the socket_cpumask array is derived via
> > cpu_to_socket() from the APIC ID of the processor in a given socket, but
> > the size of the array is computed based on nr_sockets, which is not
> > necessarily equal to the maximum APIC ID.
> >
> > Sizing the socket_cpumask to MAX_APICS rather than nr_sockets seems safer,
> > though a bit wasteful. I verified that this change fixes the boot crash
> > with 4 or 8 CPUs on VMware Fusion.
> >
> > --- a/xen/arch/x86/smpboot.c
> > +++ b/xen/arch/x86/smpboot.c
> > @@ -819,7 +819,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
> >
> > set_nr_sockets();
> >
> > - socket_cpumask = xzalloc_array(cpumask_t *, nr_sockets);
> > + socket_cpumask = xzalloc_array(cpumask_t *, MAX_APICS);
>
> Just replacing nr_sockets with MAX_APICS can not really solve problem.
> socket_cpumask should always be synchronized with nr_sockets, otherwise
> at least some function will be missing, if not cause panic in another
> place.
>
> If possible, I'd suggest you can debug set_nr_sockets(), especially you
> can inspect the following two values for panic case:
> boot_cpu_data.x86_max_cores
> boot_cpu_data.x86_num_siblings
After carefully checked the log, it looks nr_sockets is computed
correctly for your case, instead phys_proc_id is not right. It could be
again caused by bad CPUID information. Therefor you need debug the CPU
detection code which set phys_proc_id.
Thanks,
Chao
next prev parent reply other threads:[~2015-11-23 5:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-20 1:22 Crash in set_cpu_sibling_map() booting Xen 4.6.0 on Fusion Ed Swierk
2015-11-20 10:25 ` Jan Beulich
2015-11-20 10:37 ` Andrew Cooper
2015-11-20 18:53 ` Ed Swierk
2015-11-21 1:21 ` Ed Swierk
2015-11-23 1:10 ` Chao Peng
2015-11-23 5:39 ` Chao Peng [this message]
2015-11-23 10:18 ` Jan Beulich
2015-11-23 16:36 ` Ed Swierk
2015-11-24 10:34 ` Jan Beulich
2015-11-24 14:13 ` Ed Swierk
2015-11-24 15:20 ` Jan Beulich
2015-11-24 20:28 ` Ed Swierk
2015-11-25 9:11 ` Jan Beulich
2015-12-02 13:48 ` Jan Beulich
2015-12-02 15:39 ` Ed Swierk
2015-11-25 7:48 ` Chao Peng
2015-11-25 9:04 ` Jan Beulich
2015-11-25 23:27 ` Ed Swierk
2015-11-26 7:49 ` Jan Beulich
2015-11-27 2:11 ` Chao Peng
2015-12-02 2:55 ` Nakajima, Jun
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=20151123053902.GB9174@pengc-linux.bj.intel.com \
--to=chao.p.peng@linux.intel.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=eswierk@skyportsystems.com \
--cc=xen-devel@lists.xen.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;
as well as URLs for NNTP newsgroup(s).