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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 1 Feb 2024 16:55:28 +0100
From: Borislav Petkov <bp@...en8.de>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
	Tom Lendacky <thomas.lendacky@....com>,
	Andrew Cooper <andrew.cooper3@...rix.com>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	Huang Rui <ray.huang@....com>, Juergen Gross <jgross@...e.com>,
	Dimitri Sivanich <dimitri.sivanich@....com>,
	Sohil Mehta <sohil.mehta@...el.com>,
	K Prateek Nayak <kprateek.nayak@....com>,
	Kan Liang <kan.liang@...ux.intel.com>,
	Zhang Rui <rui.zhang@...el.com>,
	"Paul E. McKenney" <paulmck@...nel.org>,
	Feng Tang <feng.tang@...el.com>,
	Andy Shevchenko <andy@...radead.org>,
	Michael Kelley <mhklinux@...look.com>,
	"Peter Zijlstra (Intel)" <peterz@...radead.org>
Subject: Re: [patch v5 09/19] x86/cpu: Provide an AMD/HYGON specific topology
 parser

On Tue, Jan 23, 2024 at 01:53:43PM +0100, Thomas Gleixner wrote:
> --- a/arch/x86/kernel/cpu/topology.h
> +++ b/arch/x86/kernel/cpu/topology.h
> @@ -9,6 +9,10 @@ struct topo_scan {
>  
>  	// Legacy CPUID[1]:EBX[23:16] number of logical processors

/* comments pls.

>  	unsigned int		ebx1_nproc_shift;
> +
> +	// AMD specific node ID which cannot be mapped into APIC space.
> +	u16			amd_nodes_per_pkg;
> +	u16			amd_node_id;
>  };

..

> +static bool parse_8000_001e(struct topo_scan *tscan, bool has_0xb)
> +{
> +	struct {
> +		// eax
> +		u32	x2apic_id	: 32;

The docs call this ExtendedApicId, not x2apic_id.

> +		// ebx
> +		u32	cuid		:  8,
> +			threads_per_cu	:  8,
> +			__rsvd0		: 16;
> +		// ecx
> +		u32	nodeid		:  8,
> +			nodes_per_pkg	:  3,
> +			__rsvd1		: 21;
> +		// edx
> +		u32	__rsvd2		: 32;
> +	} leaf;
> +
> +	if (!boot_cpu_has(X86_FEATURE_TOPOEXT))

s/boot_cpu_has/cpu_feature_enabled/g

> +		return false;
> +
> +	cpuid_leaf(0x8000001e, &leaf);

..

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ