WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH, 4.0] x86: don't crash when a CPU cannot be brought o

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH, 4.0] x86: don't crash when a CPU cannot be brought online
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Tue, 11 Jan 2011 09:48:15 +0000
Delivery-date: Tue, 11 Jan 2011 01:49:10 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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.

An alternative would be to backport -unstable c/s 21436:b127760a4725.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -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());



Attachment: 4.0-x86-AP-boot-fail.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH, 4.0] x86: don't crash when a CPU cannot be brought online, Jan Beulich <=