All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Huang <wei.huang2@amd.com>
To: "'xen-devel@lists.xensource.com'" <xen-devel@lists.xensource.com>
Subject: [PATCH] check whether cpu is online in cpu idle control
Date: Mon, 16 Aug 2010 17:44:33 -0500	[thread overview]
Message-ID: <4C69BF51.5000703@amd.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 326 bytes --]

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@amd.com>
Acked-by: Wei Huang <wei.huang2@amd.com>



[-- Attachment #2: cpuidle_menu_patch.txt --]
[-- Type: text/plain, Size: 425 bytes --]

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;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

                 reply	other threads:[~2010-08-16 22:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C69BF51.5000703@amd.com \
    --to=wei.huang2@amd.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.