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] check whether cpu is online in cpu idle control

To: "'xen-devel@xxxxxxxxxxxxxxxxxxx'" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] check whether cpu is online in cpu idle control
From: Wei Huang <wei.huang2@xxxxxxx>
Date: Mon, 16 Aug 2010 17:44:33 -0500
Delivery-date: Mon, 16 Aug 2010 15:51:31 -0700
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
User-agent: Thunderbird 2.0.0.24 (X11/20100228)
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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] check whether cpu is online in cpu idle control, Wei Huang <=