[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ecc18541-f3c3-b887-0c4d-b9d404b0246b@zhaoxin.com>
Date: Sat, 18 Jan 2020 10:18:29 +0800
From: Tony W Wang-oc <TonyWWang-oc@...oxin.com>
To: Borislav Petkov <bp@...en8.de>
CC: <tglx@...utronix.de>, <mingo@...hat.com>, <hpa@...or.com>,
<x86@...nel.org>, <linux-kernel@...r.kernel.org>,
<DavidWang@...oxin.com>, <CooperYan@...oxin.com>,
<QiyuanWang@...oxin.com>, <HerryYang@...oxin.com>
Subject: Re: [PATCH] x86/cpu: remove redundant cpu_detect_cache_sizes
On 18/01/2020 02:47, Borislav Petkov wrote:
> On Wed, Jan 15, 2020 at 04:00:57PM +0800, Tony W Wang-oc wrote:
>> Before call cpu_detect_cache_sizes get l2size from CPUID.80000006,
>> these CPUs have called init_intel_cacheinfo get l2size/l3size from
>> CPUID.4.
>
> Questions:
>
> * Does CPUID(4) give the same result as CPUID(80000006) on those CPUs?
Yes.
On these CPUs, CPUID(80000006).EBX for x86_tlbsize is reserved,
CPUID(80000006).ECX for l2size has the same result as CPUID(4).
>
> * cpu_detect_cache_sizes() sets c->x86_tlbsize while
> init_intel_cacheinfo() would set it only when it calls the former
> function - cpu_detect_cache_sizes() - at the end:
>
> if (!l2)
> cpu_detect_cache_sizes(c);
>
> Does that happen on those CPUs?
No.
On these CPUs, will not call the function cpu_detect_cache_sizes(c).
l2size will get from CPUID(4) and c->x86_tlbsize remain its default
value of 0.
Sincerely
TonyWWang-oc
Powered by blists - more mailing lists