[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f00d2bf8-1621-59a1-f163-7ca21232c1d6@amd.com>
Date: Fri, 10 Jan 2025 14:31:42 -0600
From: Tom Lendacky <thomas.lendacky@....com>
To: Rik van Riel <riel@...riel.com>, x86@...nel.org
Cc: linux-kernel@...r.kernel.org, kernel-team@...a.com,
dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com,
akpm@...ux-foundation.org, nadav.amit@...il.com, zhengqi.arch@...edance.com,
linux-mm@...ck.org
Subject: Re: [PATCH 04/12] x86/mm: get INVLPGB count max from CPUID
On 1/10/25 14:27, Rik van Riel wrote:
> On Fri, 2025-01-10 at 12:44 -0600, Tom Lendacky wrote:
>> On 12/30/24 11:53, Rik van Riel wrote:
>>>
>>> +++ b/arch/x86/kernel/cpu/amd.c
>>> @@ -1135,6 +1135,14 @@ static void cpu_detect_tlb_amd(struct
>>> cpuinfo_x86 *c)
>>> tlb_lli_2m[ENTRIES] = eax & mask;
>>>
>>> tlb_lli_4m[ENTRIES] = tlb_lli_2m[ENTRIES] >> 1;
>>> +
>>> + if (c->extended_cpuid_level < 0x80000008)
>>> + return;
>>
>> Can this just be based on cpu_feature_enabled(X86_FEATURE_TLBI), e.g:
>>
>> if (cpu_feature_enabled(X86_FEATURE_TLBI))
>> invlpgb_count_max = (cpuid_edx(0x80000008) & 0xffff)
>> + 1
>>
> I don't see X86_FEATURE_TLBI defined in the tip
> tree. Which CPUID bit does that need to be?
Sorry, I meant X86_FEATURE_INVLPGB.
Thanks,
Tom
>
>> Then you can squash this and the previous patch.
>
> Heh, I already squashed the previous commit into
> what is patch 6 in this series, as requested by
> Borislav :)
>
Powered by blists - more mailing lists