From: Borislav Petkov <bp@alien8.de>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Huaitong Han <huaitong.han@intel.com>,
tglx@linutronix.de, mingo@redhat.com, david.vrabel@citrix.com,
rusty@rustcorp.com.au, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] x86: use enum cpuid_leafs instead of magic numbers
Date: Thu, 21 Jan 2016 22:47:32 +0100 [thread overview]
Message-ID: <20160121214732.GM21930@pd.tnic> (raw)
In-Reply-To: <56A14FA0.6090700@zytor.com>
On Thu, Jan 21, 2016 at 01:37:36PM -0800, H. Peter Anvin wrote:
> No, you still need to be able to find the beginning of the capability
> array, but the point is that right now it is implicit in that code that
> CPUID_1_EDX == 0.
Ah, you wanna be able to do:
---
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index af1112980dd4..143646f0add1 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -441,7 +443,7 @@ enable_paging:
movb %al,X86_MODEL
andb $0x0f,%cl # mask mask revision
movb %cl,X86_MASK
- movl %edx,X86_CAPABILITY
+ movl %edx,X86_CAPABILITY + CPUID_1_EDX*4
is486:
movl $0x50022,%ecx # set AM, WP, NE and MP
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
next prev parent reply other threads:[~2016-01-21 21:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-21 11:02 [PATCH V2] x86: use enum cpuid_leafs instead of magic numbers Huaitong Han
2016-01-21 11:42 ` Borislav Petkov
2016-01-21 21:04 ` H. Peter Anvin
2016-01-21 21:21 ` Borislav Petkov
2016-01-21 21:25 ` H. Peter Anvin
2016-01-21 21:33 ` Borislav Petkov
2016-01-21 21:37 ` H. Peter Anvin
2016-01-21 21:47 ` Borislav Petkov [this message]
2016-01-21 21:52 ` H. Peter Anvin
2016-01-21 21:05 ` H. Peter Anvin
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=20160121214732.GM21930@pd.tnic \
--to=bp@alien8.de \
--cc=david.vrabel@citrix.com \
--cc=hpa@zytor.com \
--cc=huaitong.han@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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