Skip to contentSkip to conversation

check whether cpu is online in cpu idle control

PATCH New Wei Huang 1 participant 1 message Aug 16, 2010

lore
Share & tools
lore

Wei Huang

author
#0 lore raw

PATCH 1/1 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.

xen/arch/x86/acpi/cpuidle_menu.c +5 -0
diff -r 774dfc178c39 xen/arch/x86/acpi/cpuidle_menu.c
@@ -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
[email protected]
http://lists.xensource.com/xen-devel