x86/topo: Map vendor CPU types to generic Linux such types

Sashiko reported¹ that a confusion could ensue if a vendor-specific CPU
type 0 (performance) gets attempted to be used in a x86_cpu_id match
table. The current logic treats 0 as the wildcard X86_CPU_TYPE_ANY and
such a thing would end up matching the wrong CPUs.

This is all backwards because we started using the vendor-specific CPU
type number instead of using a Linux-defined, generic CPU type which
is agnostic.

Convert the current logic to it before users start appearing.

  ¹https://sashiko.dev/#/patchset/20260629094349.533301-1-Vishal.Badole%40amd.com

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Vishal Badole <Vishal.Badole@amd.com>
Link: https://patch.msgid.link/20260721154514.2506972-2-Vishal.Badole@amd.com
This commit is contained in:
Borislav Petkov (AMD) 2026-07-21 21:15:12 +05:30
commit 598ebce64c
7 changed files with 28 additions and 46 deletions