[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-4.0-testing] x86: don't crash when a CPU cannot be brought online during boot



# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1294742461 0
# Node ID 7a203c60d588a7a15a28a6fb16c69feafd157e0d
# Parent  64bb7d9904a64cc4561c6d541d857acf46e42180
x86: don't crash when a CPU cannot be brought online during boot

x86_cpu_to_apicid[] gets set to BAD_APICID when bringup of a secondary
CPU fails, yet srat_detect_node() wants to use this as array index.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/setup.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff -r 64bb7d9904a6 -r 7a203c60d588 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Tue Jan 11 10:40:17 2011 +0000
+++ b/xen/arch/x86/setup.c      Tue Jan 11 10:41:01 2011 +0000
@@ -1098,10 +1098,13 @@ void __init __start_xen(unsigned long mb
             __cpu_up(i);
         }
 
-        /* Set up cpu_to_node[]. */
-        srat_detect_node(i);
-        /* Set up node_to_cpumask based on cpu_to_node[]. */
-        numa_add_cpu(i);        
+        if ( cpu_online(i) )
+        {
+            /* Set up cpu_to_node[]. */
+            srat_detect_node(i);
+            /* Set up node_to_cpumask based on cpu_to_node[]. */
+            numa_add_cpu(i);
+        }
     }
 
     printk("Brought up %ld CPUs\n", (long)num_online_cpus());

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.