Re: [PATCH 1/2] x86/topology: Name the AMD core-type values
From: Borislav Petkov
Date: Mon Jul 06 2026 - 20:47:53 EST
On Mon, Jul 06, 2026 at 11:29:07AM -0700, Pawan Gupta wrote:
> > /**
> > * x86_match_cpu - match current CPU against an array of x86_cpu_ids
> > * @match: Pointer to array of x86_cpu_ids. Last entry terminated with
> > @@ -81,7 +53,7 @@ const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match)
> > continue;
> > if (m->feature != X86_FEATURE_ANY && !cpu_has(c, m->feature))
> > continue;
> > - if (!x86_match_vendor_cpu_type(c, m))
> > + if (m->type != X86_CPU_TYPE_ANY && c->topo.cpu_type != m->type)
>
> ... matching a hybrid CPU to any cpu_type.
I don't know what you mean here.
enum x86_topology_cpu_type {
/* X86_CPU_TYPE_ANY */
TOPO_CPU_TYPE_ANY = 0,
TOPO_CPU_TYPE_PERFORMANCE,
TOPO_CPU_TYPE_EFFICIENCY,
TOPO_CPU_TYPE_UNKNOWN,
};
These are the Linux-specific CPU types and all vendor CPU types will be mapped
to them. I hope 255 are enough.
> Also, I think now cpu_vuln_blacklist[] needs TOPO_CPU_TYPE_EFFICIENCY
> instead of ATOM.
>
> VULNBL_INTEL_TYPE(INTEL_ALDERLAKE, ATOM, RFDS | VMSCAPE),
> VULNBL_INTEL_STEPS(INTEL_ALDERLAKE, X86_STEP_MAX, VMSCAPE),
> VULNBL_INTEL_STEPS(INTEL_ALDERLAKE_L, X86_STEP_MAX, RFDS | VMSCAPE),
> VULNBL_INTEL_TYPE(INTEL_RAPTORLAKE, ATOM, RFDS | VMSCAPE),
Ack, right, ATOM == EFFICIENCY in Intel-speak, so I'd need to convert those.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette