[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210208191018.GA86425@agluck-desk2.amr.corp.intel.com>
Date: Mon, 8 Feb 2021 11:10:18 -0800
From: "Luck, Tony" <tony.luck@...el.com>
To: "Liang, Kan" <kan.liang@...ux.intel.com>
Cc: Borislav Petkov <bp@...en8.de>, peterz@...radead.org,
acme@...nel.org, mingo@...nel.org, linux-kernel@...r.kernel.org,
tglx@...utronix.de, namhyung@...nel.org, jolsa@...hat.com,
ak@...ux.intel.com, yao.jin@...ux.intel.com,
alexander.shishkin@...ux.intel.com, adrian.hunter@...el.com,
Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Dave Hansen <dave.hansen@...el.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
"Ravi V. Shankar" <ravi.v.shankar@...el.com>,
Sean Christopherson <sean.j.christopherson@...el.com>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Len Brown <len.brown@...el.com>
Subject: Re: [PATCH 02/49] x86/cpu: Describe hybrid CPUs in cpuinfo_x86
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 below for this?
> (Not test. Just use as an example.)
>
> diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
> index a66c1fd..679f5fe 100644
> --- a/arch/x86/kernel/cpu/common.c
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -2056,3 +2056,11 @@ void arch_smt_update(void)
> /* Check whether IPI broadcasting can be enabled */
> apic_smt_update();
> }
> +
> +u32 x86_read_hybrid_type(void)
> +{
> + if (cpu_feature_enabled(X86_FEATURE_HYBRID_CPU))
> + return cpuid_eax(0x0000001a);
> +
> + return 0;
> +}
Machine check logging will want to include this in "struct mce".
But ok to pick it up with a function like you describe above.
-Tony
Powered by blists - more mailing lists