From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Huang Subject: [PATCH] check whether cpu is online in cpu idle control Date: Mon, 16 Aug 2010 17:44:33 -0500 Message-ID: <4C69BF51.5000703@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090505050409010608020506" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "'xen-devel@lists.xensource.com'" List-Id: xen-devel@lists.xenproject.org --------------090505050409010608020506 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit 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 Acked-by: Wei Huang --------------090505050409010608020506 Content-Type: text/plain; name="cpuidle_menu_patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cpuidle_menu_patch.txt" 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; --------------090505050409010608020506 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------090505050409010608020506--