lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3bf6f37a386ef8afeefee54202283023c0581f58.camel@surriel.com>
Date: Fri, 10 Jan 2025 15:27:37 -0500
From: Rik van Riel <riel@...riel.com>
To: Tom Lendacky <thomas.lendacky@....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 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?

> 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 :)

-- 
All Rights Reversed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ