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/
Home Products Support Community News


[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 (X11/20100228)
We observed a 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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] check whether cpu is online in cpu idle control, Wei Huang <=