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-changelog

[Xen-changelog] [xen-unstable] x86 cpuidle: check whether cpu is online

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86 cpuidle: check whether cpu is online in cpu idle control
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 18 Aug 2010 07:01:26 -0700
Delivery-date: Wed, 18 Aug 2010 07:08:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1282069957 -3600
# Node ID 5218db847b58a151d8f320b7141efc984f759b35
# Parent  542e8cd16a6cf036e89b597ba6343245fcaafa25
x86 cpuidle: 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=3D4 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>
---
 xen/arch/x86/acpi/cpuidle_menu.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff -r 542e8cd16a6c -r 5218db847b58 xen/arch/x86/acpi/cpuidle_menu.c
--- a/xen/arch/x86/acpi/cpuidle_menu.c  Tue Aug 17 19:30:35 2010 +0100
+++ b/xen/arch/x86/acpi/cpuidle_menu.c  Tue Aug 17 19:32:37 2010 +0100
@@ -270,9 +270,10 @@ static void menu_reflect(struct acpi_pro
 
 static int menu_enable_device(struct acpi_processor_power *power)
 {
-    struct menu_device *data = &per_cpu(menu_devices, power->cpu);
-
-    memset(data, 0, sizeof(struct menu_device));
+    if (!cpu_online(power->cpu))
+        return -1;
+
+    memset(&per_cpu(menu_devices, power->cpu), 0, sizeof(struct menu_device));
 
     return 0;
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86 cpuidle: check whether cpu is online in cpu idle control, Xen patchbot-unstable <=