From: "H. Peter Anvin" <hpa@zytor.com>
To: Valdis.Kletnieks@vt.edu
Cc: Suresh Siddha <suresh.b.siddha@intel.com>,
Avuton Olrich <avuton@gmail.com>,
LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>
Subject: Re: Fail to early boot with v2.6.27-rc2 to at least v2.6.29-rc2 due to dc1e35c
Date: Mon, 19 Jan 2009 22:36:21 -0800 [thread overview]
Message-ID: <497570E5.2090702@zytor.com> (raw)
In-Reply-To: <85492.1232422525@turing-police.cc.vt.edu>
[-- Attachment #1: Type: text/plain, Size: 930 bytes --]
Valdis.Kletnieks@vt.edu wrote:
> On Mon, 19 Jan 2009 13:57:36 PST, Suresh Siddha said:
>
>> Though the bios is the culprit and this option will severely limit
>> the cpu capabilities that OS can take advantage of, OS should fallback
>> to a safer mode. I will have a patch for it.
>>
>> Also, I wonder, if we should complain/scream during boot if we find only
>> fewer cpuid levels on modern generation cpu's.
>
> I think a KERN_INFO "Core2 E9700 expected 6 cpuid levels, got 4"
> would possibly be a good idea.
>
> Might be a good idea to check what happens under VMWare and similar though, it
> looks like the type of thing a hypervisor is likely to do something odd to us...
I think a much better idea is to just clear the MSR bit. Attached is a
patch to do exactly that, which I will commit after testing.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
[-- Attachment #2: cpuid.diff --]
[-- Type: text/x-patch, Size: 666 bytes --]
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index 8ea6929..1107015 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -29,6 +29,16 @@
static void __cpuinit early_init_intel(struct cpuinfo_x86 *c)
{
+ u64 misc_enable;
+
+ /* If MSR_IA32_MISC_ENABLE exists, unmask CPUID levels if masked */
+ if (!rdmsrl_safe(MSR_IA32_MISC_ENABLE, &misc_enable)) {
+ if (misc_enable & (1 << 22)) {
+ misc_enable &= ~(1 << 22);
+ wrmsrl(MSR_IA32_MISC_ENABLE, misc_enable);
+ }
+ }
+
if ((c->x86 == 0xf && c->x86_model >= 0x03) ||
(c->x86 == 0x6 && c->x86_model >= 0x0e))
set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
next prev parent reply other threads:[~2009-01-20 6:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-19 14:04 Fail to early boot with v2.6.27-rc2 to at least v2.6.29-rc2 due to dc1e35c Avuton Olrich
2009-01-19 14:28 ` Avuton Olrich
2009-01-19 18:55 ` H. Peter Anvin
2009-01-19 19:31 ` Avuton Olrich
2009-01-19 20:07 ` H. Peter Anvin
2009-01-19 20:11 ` Suresh Siddha
2009-01-19 21:46 ` Avuton Olrich
2009-01-19 21:57 ` Suresh Siddha
2009-01-19 22:07 ` H. Peter Anvin
2009-01-19 22:14 ` Suresh Siddha
2009-01-19 22:24 ` H. Peter Anvin
2009-01-21 5:20 ` Andi Kleen
2009-01-22 22:22 ` Suresh Siddha
2009-01-22 22:40 ` H. Peter Anvin
2009-01-22 22:56 ` Suresh Siddha
2009-01-20 3:35 ` Valdis.Kletnieks
2009-01-20 6:36 ` H. Peter Anvin [this message]
2009-01-22 0:38 ` H. Peter Anvin
2009-01-22 2:26 ` Avuton Olrich
2009-01-22 8:28 ` Ingo Molnar
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=497570E5.2090702@zytor.com \
--to=hpa@zytor.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=avuton@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=suresh.b.siddha@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox