[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201119143237.GA129558@shbuild999.sh.intel.com>
Date: Thu, 19 Nov 2020 22:32:37 +0800
From: Feng Tang <feng.tang@...el.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H . Peter Anvin" <hpa@...or.com>,
Dave Hansen <dave.hansen@...el.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, nivedita@...m.mit.edu,
thomas.lendacky@....com, yazen.ghannam@....com, wei.huang2@....com
Subject: Re: [RFC PATCH v3] tools/x86: add kcpuid tool to show raw CPU
features
On Thu, Nov 19, 2020 at 03:15:12PM +0100, Borislav Petkov wrote:
> On Thu, Nov 19, 2020 at 09:50:10PM +0800, Feng Tang wrote:
> > That's really odd. I tried on 3 baremetal machines: one Skylake NUC device,
> > one Xeon E5-2699 and one Xeon E5-2680.
>
> Ah, sorry, not virt, virt is 0x4000_0000. Yeah, I remember now. It is
> function 4 which AMD doesn't implement and I'm running this on AMD:
Great! That's the trick :) I will be more careful with these special ranges
from different vendors.
Thanks,
Feng
> $ cpuid -1r
> CPU:
> 0x00000000 0x00: eax=0x0000000d ebx=0x68747541 ecx=0x444d4163 edx=0x69746e65
> 0x00000001 0x00: eax=0x00800f82 ebx=0x0c100800 ecx=0x7ed8320b edx=0x178bfbff
> 0x00000002 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00000000
> 0x00000003 0x00: eax=0x00000000 ebx=0x00000000 ecx=0x00000000 edx=0x00000000
>
> <-- no function 4.
>
> 0x00000005 0x00: eax=0x00000040 ebx=0x00000040 ecx=0x00000003 edx=0x00000011
> ...
>
> That's why. :-)
>
> Btw, there are other funny ranges on Intel:
>
> ./cpuid -1r
> CPU:
> 0x20000000 0x00: eax=0x00000000 ebx=0x00000001 ecx=0x00000001 edx=0x00000000
>
> That one has 2 bits set.
>
> 0x80860000 0x00: eax=0x00000000 ebx=0x00000001 ecx=0x00000001 edx=0x00000000
> 0xc0000000 0x00: eax=0x00000000 ebx=0x00000001 ecx=0x00000001 edx=0x00000000
>
> And those too.
>
> Fun.
>
> --
> Regards/Gruss,
> Boris.
>
> https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists