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>] [day] [month] [year] [list]
Message-ID: <20250825112201.39487-1-TonyWWang-oc@zhaoxin.com>
Date: Mon, 25 Aug 2025 19:22:01 +0800
From: Tony W Wang-oc <TonyWWang-oc@...oxin.com>
To: <tglx@...utronix.de>, <mingo@...hat.com>, <bp@...en8.de>,
	<dave.hansen@...ux.intel.com>, <x86@...nel.org>, <hpa@...or.com>,
	<mario.limonciello@....com>, <gautham.shenoy@....com>,
	<peterz@...radead.org>, <rui.zhang@...el.com>, <TonyWWang-oc@...oxin.com>,
	<pawan.kumar.gupta@...ux.intel.com>, <kprateek.nayak@....com>,
	<linux-kernel@...r.kernel.org>
CC: <CobeChen@...oxin.com>, <TimGuo@...oxin.com>, <LeoLiu-oc@...oxin.com>,
	<LyleLi@...oxin.com>
Subject: [PATCH] x86/cpu: detect extended topology for Zhaoxin CPUs

Zhaoxin CPUs support extended topology enumeration CPUID leaf
0xb/0x1f. Zhaoxin's new product, the KH-50000, features a single
socket with 96 cores and support 2/4 sockets interconnects.
Additionally, the Zhaoxin KH-50000 requires the use of extended
CPUID leaf 0xb/0x1f to retrieve cputopo information.

Right now the kernel uses the legacy CPUID leaf 0x1/0x4 for
topology detection for Zhaoxin CPUs. So add extended topology
detection support for Zhaoxin CPUs.

Signed-off-by: Tony W Wang-oc <TonyWWang-oc@...oxin.com>
---
 arch/x86/kernel/cpu/topology_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/topology_common.c b/arch/x86/kernel/cpu/topology_common.c
index b5a5e1411469..913dbf43389a 100644
--- a/arch/x86/kernel/cpu/topology_common.c
+++ b/arch/x86/kernel/cpu/topology_common.c
@@ -159,7 +159,8 @@ static void parse_topology(struct topo_scan *tscan, bool early)
 		break;
 	case X86_VENDOR_CENTAUR:
 	case X86_VENDOR_ZHAOXIN:
-		parse_legacy(tscan);
+		if (!cpu_parse_topology_ext(tscan))
+			parse_legacy(tscan);
 		break;
 	case X86_VENDOR_INTEL:
 		if (!IS_ENABLED(CONFIG_CPU_SUP_INTEL) || !cpu_parse_topology_ext(tscan))
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ