From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v2] x86: correct socket_cpumask allocation Date: Thu, 9 Jul 2015 10:35:54 +0100 Message-ID: <559E407A.3080505@citrix.com> References: <1436430376-31276-1-git-send-email-chao.p.peng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1436430376-31276-1-git-send-email-chao.p.peng@linux.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Chao Peng , xen-devel@lists.xen.org Cc: boris.ostrovsky@oracle.com, keir@xen.org, dario.faggioli@citrix.com, JBeulich@suse.com List-Id: xen-devel@lists.xenproject.org On 09/07/15 09:26, Chao Peng wrote: > For booting cpu, the socket number is not needed to be 0 so > it needs to be computed by cpu number. > > For secondary cpu, phys_proc_id is not valid in CPU_PREPARE > notifier(cpu_smpboot_alloc), so cpu_to_socket(cpu) can't be used. > Instead, pre-allocate secondary_cpu_mask in cpu_smpboot_alloc() > and later consume it in smp_store_cpu_info(). > > This patch also change socket_cpumask type from 'cpumask_var_t *' > to 'cpumask_t **' so that smaller NR_CPUS works. > > Reported-by: Boris Ostrovsky > Signed-off-by: Chao Peng I have thrown this patch into my XenServer upstream testing branch, to get a wide coverage of servers. (So far, on a random sample of 24 servers from our testing pool, not a single one has successfully booted with the original bug present.) ~Andrew