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: <20241023035829.pq6uurkajiv3vpfv@desk>
Date: Tue, 22 Oct 2024 20:58:56 -0700
From: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
To: Mario Limonciello <mario.limonciello@....com>
Cc: Dave Hansen <dave.hansen@...el.com>, Borislav Petkov <bp@...en8.de>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
	"H . Peter Anvin" <hpa@...or.com>,
	"Rafael J . Wysocki" <rafael@...nel.org>,
	"Gautham R . Shenoy" <gautham.shenoy@....com>,
	Perry Yuan <perry.yuan@....com>,
	Brijesh Singh <brijesh.singh@....com>,
	Peter Zijlstra <peterz@...radead.org>,
	Li RongQing <lirongqing@...du.com>,
	"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <linux-kernel@...r.kernel.org>,
	"open list:ACPI" <linux-acpi@...r.kernel.org>,
	"open list:AMD PSTATE DRIVER" <linux-pm@...r.kernel.org>
Subject: Re: [PATCH v2 4/5] x86/cpu: Add CPU type to struct cpuinfo_topology

On Tue, Oct 22, 2024 at 11:13:00AM -0500, Mario Limonciello wrote:
> > This makes me feel a _bit_ uneasy.  0x20 here really does mean "Atom
> > microarchitecture" and 0x40 means "Core microarchitecture".
> > 
> > We want to encourage folks to use this new ABI when they want to find
> > the fastest core to run on.  But we don't want them to use it to bind to
> > a CPU and then deploy Atom-specific optimizations.
> > 
> > We *also* don't want the in-kernel code to do be doing things like:
> > 
> > 	if (get_intel_cpu_type() == TOPO_CPU_TYPE_EFFICIENCY)
> > 		setup_force_cpu_bug(FOO);
> > 
> > That would fall over if Intel ever mixed fast and slow core types with
> > the same microarchitecture, which is what AMD is doing today.
> > 
> > Having:
> > 
> > 	TOPO_CPU_TYPE_EFFICIENCY, and
> > 	TOPO_CPU_TYPE_PERFORMANCE
> > 
> > is totally fine in generic code.  But we also need to preserve the:
> > 
> > 	TOPO_HW_CPU_TYPE_INTEL_ATOM
> > 	TOPO_HW_CPU_TYPE_INTEL_CORE
> > 
> > values also for use in vendor-specific code.
> 
> What you're suggesting is to keep an enum in the intel.c code and any code
> that needs to match atom vs core can directly use
> 
> c->topo.intel_type == TOPO_HW_CPU_TYPE_INTEL_ATOM

To be able to match ATOM and CORE in the affected processor table, the
enums need to be defined in a way that they can be used in the common code.
Specially for !CONFIG_CPU_SUP_INTEL case.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ