Re: [PATCH 02/49] x86/cpu: Describe hybrid CPUs in cpuinfo_x86

2021-02-08 Thread Borislav Petkov
On Mon, Feb 08, 2021 at 11:10:18AM -0800, Luck, Tony wrote: > > +u32 x86_read_hybrid_type(void) > > +{ > > + if (cpu_feature_enabled(X86_FEATURE_HYBRID_CPU)) > > + return cpuid_eax(0x001a); > > + > > + return 0; > > +} > > Machine check logging will want to include this in "struc

Re: [PATCH 02/49] x86/cpu: Describe hybrid CPUs in cpuinfo_x86

2021-02-08 Thread Luck, Tony
On Mon, Feb 08, 2021 at 02:04:24PM -0500, Liang, Kan wrote: > On 2/8/2021 12:56 PM, Borislav Petkov wrote: > > I think it's good enough for perf, but I'm not sure whether other codes need > the CPU type information. > > Ricardo, do you know? > > Maybe we should implement a generic function as be

Re: [PATCH 02/49] x86/cpu: Describe hybrid CPUs in cpuinfo_x86

2021-02-08 Thread Liang, Kan
On 2/8/2021 12:56 PM, Borislav Petkov wrote: On Mon, Feb 08, 2021 at 07:24:59AM -0800, kan.li...@linux.intel.com wrote: diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index c20a52b..1f25ac9 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/

Re: [PATCH 02/49] x86/cpu: Describe hybrid CPUs in cpuinfo_x86

2021-02-08 Thread Borislav Petkov
On Mon, Feb 08, 2021 at 07:24:59AM -0800, kan.li...@linux.intel.com wrote: > diff --git a/arch/x86/include/asm/processor.h > b/arch/x86/include/asm/processor.h > index c20a52b..1f25ac9 100644 > --- a/arch/x86/include/asm/processor.h > +++ b/arch/x86/include/asm/processor.h > @@ -139,6 +139,16 @@ s

[PATCH 02/49] x86/cpu: Describe hybrid CPUs in cpuinfo_x86

2021-02-08 Thread kan . liang
From: Ricardo Neri On processors with Intel Hybrid Technology (i.e., one having more than one type of CPU in the same package), all CPUs support the same instruction set and enumerate the same features on CPUID. Thus, all software can run on any CPU without restrictions. However, there may be mod