[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Crash in set_cpu_sibling_map() booting Xen 4.6.0 on Fusion
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); Â Â Âif ( socket_cpumask == NULL || Â Â Â Â Â (socket_cpumask[cpu_to_socket(0)] = xzalloc(cpumask_t)) == NULL ) Â Â Â Â Âpanic("No memory for socket CPU siblings map"); On Fri, Nov 20, 2015 at 10:53 AM, Ed Swierk <eswierk@xxxxxxxxxxxxxxxxxx> wrote:
_______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |