From: Avi Kivity <avi@redhat.com>
To: "Ingo Molnar" <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
"Török Edwin" <edwintorok@gmail.com>
Cc: kvm@vger.kernel.org, Christoph Lameter <cl@linux.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] x86: fix mwait_play_dead() faulting on mwait-incapable cpus
Date: Mon, 30 May 2011 08:23:57 -0400 [thread overview]
Message-ID: <1306758237-9327-1-git-send-email-avi@redhat.com> (raw)
In-Reply-To: <201105301143.p4UBhco4001230@demeter2.kernel.org>
A logic error in mwait_play_dead() causes the kernel to use mwait
even on cpus which don't support it, such as KVM virtual cpus.
Introduced by 349c004e3d31fd.
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=36222
Reported-by: Török Edwin <edwintorok@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
---
arch/x86/kernel/smpboot.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index eefd967..33a0c11 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1332,7 +1332,7 @@ static inline void mwait_play_dead(void)
void *mwait_ptr;
struct cpuinfo_x86 *c = __this_cpu_ptr(&cpu_info);
- if (!this_cpu_has(X86_FEATURE_MWAIT) && mwait_usable(c))
+ if (!(this_cpu_has(X86_FEATURE_MWAIT) && mwait_usable(c)))
return;
if (!this_cpu_has(X86_FEATURE_CLFLSH))
return;
--
1.7.5.3
next parent reply other threads:[~2011-05-30 12:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201105301143.p4UBhco4001230@demeter2.kernel.org>
2011-05-30 12:23 ` Avi Kivity [this message]
2011-05-30 12:36 ` [PATCH] x86: fix mwait_play_dead() faulting on mwait-incapable cpus Török Edwin
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=1306758237-9327-1-git-send-email-avi@redhat.com \
--to=avi@redhat.com \
--cc=cl@linux.com \
--cc=edwintorok@gmail.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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.