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

[Xen-devel] [PATCH] check whether cpu is online in cpu idle control



We observed a 2.6.18.8 dom0 kernel crash when Xen has maxcpus < num of physical cores (maxcpus=4 for a 12-core system). It appeared that hypervisor doesn't check whether CPU is online or not. This small patch fixed the issue.

Signed-off-by: Uwe Dannowski <uwe.dannowski@xxxxxxx>
Acked-by: Wei Huang <wei.huang2@xxxxxxx>


diff -r 774dfc178c39 xen/arch/x86/acpi/cpuidle_menu.c
--- a/xen/arch/x86/acpi/cpuidle_menu.c  Thu Aug 12 17:06:21 2010 +0100
+++ b/xen/arch/x86/acpi/cpuidle_menu.c  Mon Aug 16 17:33:05 2010 -0500
@@ -272,6 +272,11 @@
 {
     struct menu_device *data = &per_cpu(menu_devices, power->cpu);
 
+    if (!cpu_online(power->cpu))
+    {
+        return -1;
+    }
+
     memset(data, 0, sizeof(struct menu_device));
 
     return 0;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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