x86/cpu changes for v7.0:

- amd: Correct the microcode table for Zenbleed
  - amd: Use ZEN_MODEL_STEP_UCODE() for erratum_1386_microcode[]
  - Drop vestigial PBE logic in AMD/Hygon/Centaur/Cyrix
    (Andrew Cooper)
 
  - tsx: Set default TSX mode to auto (Nikolay Borisov)
 
  - Drop unused Kconfig symbol X86_P6_NOP (Randy Dunlap)
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmmJlU0RHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1hVaBAArtXnP3nah0R6UphYGbFew9G5cLHXwhgZ
 bUs9j6NbeJhEZBiXQON0Jfy2ucwePMOB+75+UlIm6VnKMHhE+ayB6H4zihSWirgb
 Q0CzjwlT+mZ9hRxnG9o3QcbwbSmnTAwyCAcQuEpTYYKW5vqiMaKoXt8iMIwbWNcT
 0hX3pLzpfbOjrXgyjGzRk5nj9JZvpL3rdmOi+/7tsDoKgsfbyOKudP/PV5OuZ2mC
 9CyQCW00nAUN5+Lq8zZFBkbJS71mI78wdE3uC3NgUENhOFLccQERxdPUyVdx9K38
 dXyaRfc61OOxG+RDQH5etGSexKgXrbaE22hasMVCypBP0PP66GeLJZFArOS5Pa2s
 39r9NaCALyZZ76gyxceSJ1B1pOsX8MPgC2+WVW2HxZBeOxcUOEcsTRdCthZkb2w9
 kg+Fa9ITMzG01yqCT6WtIfADAPxa8FpVk/q4qBTCG/WkPrq9APSKLsj6NLfHM6MM
 ZesXoBULiSOED3oypglGbItsIPyWHpIumpObWdTR/U3Z1K/xCRY1qAgfjMHkajrm
 8brSnEDYPOdFpvDNCaJnwrnWJwu1YY3qcuVvVvJPzdWNUff0hpIXnn63S+FegVfX
 J5velNq+GlHvvh2yZgV8jUVpeqqckIP4/SS3z0sH+QcXXDoJWgyQqwbhx1M7a61m
 1UDI1V8K0vo=
 =k5rk
 -----END PGP SIGNATURE-----

Merge tag 'x86-cpu-2026-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 cpu updates from Ingo Molnar:

 - CPU model updates (Andrew Cooper):
    - amd: Correct the microcode table for Zenbleed
    - amd: Use ZEN_MODEL_STEP_UCODE() for erratum_1386_microcode[]
    - Drop vestigial PBE logic in AMD/Hygon/Centaur/Cyrix

 - tsx: Set default TSX mode to auto (Nikolay Borisov)

 - Drop unused Kconfig symbol X86_P6_NOP (Randy Dunlap)

* tag 'x86-cpu-2026-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/tsx: Set default TSX mode to auto
  x86/cpu: Drop unused Kconfig symbol X86_P6_NOP
  x86/cpu: Drop vestigial PBE logic in AMD/Hygon/Centaur/Cyrix
  x86/cpu/amd: Use ZEN_MODEL_STEP_UCODE() for erratum_1386_microcode[]
  x86/cpu/amd: Correct the microcode table for Zenbleed
This commit is contained in:
Linus Torvalds 2026-02-10 13:17:58 -08:00
commit b490d2a83f
7 changed files with 13 additions and 55 deletions

View File

@ -1817,7 +1817,7 @@ config ARCH_PKEY_BITS
choice
prompt "TSX enable mode"
depends on CPU_SUP_INTEL
default X86_INTEL_TSX_MODE_OFF
default X86_INTEL_TSX_MODE_AUTO
help
Intel's TSX (Transactional Synchronization Extensions) feature
allows to optimize locking protocols through lock elision which

View File

@ -38,7 +38,7 @@ config X86_REQUIRED_FEATURE_ALWAYS
config X86_REQUIRED_FEATURE_NOPL
def_bool y
depends on X86_64 || X86_P6_NOP
depends on X86_64
config X86_REQUIRED_FEATURE_CX8
def_bool y

View File

@ -42,9 +42,3 @@ cflags-$(CONFIG_MGEODE_LX) += $(call cc-option,-march=geode,-march=pentium-mmx)
# add at the end to overwrite eventual tuning options from earlier
# cpu entries
cflags-$(CONFIG_X86_GENERIC) += $(call tune,generic,$(call tune,i686))
# Bug fix for binutils: this option is required in order to keep
# binutils from generating NOPL instructions against our will.
ifneq ($(CONFIG_X86_P6_NOP),y)
cflags-y += $(call cc-option,-Wa$(comma)-mtune=generic32,)
endif

View File

@ -873,8 +873,8 @@ static void init_amd_bd(struct cpuinfo_x86 *c)
}
static const struct x86_cpu_id erratum_1386_microcode[] = {
X86_MATCH_VFM_STEPS(VFM_MAKE(X86_VENDOR_AMD, 0x17, 0x01), 0x2, 0x2, 0x0800126e),
X86_MATCH_VFM_STEPS(VFM_MAKE(X86_VENDOR_AMD, 0x17, 0x31), 0x0, 0x0, 0x08301052),
ZEN_MODEL_STEP_UCODE(0x17, 0x01, 0x2, 0x0800126e),
ZEN_MODEL_STEP_UCODE(0x17, 0x31, 0x0, 0x08301052),
{}
};
@ -951,26 +951,14 @@ static void init_amd_zen1(struct cpuinfo_x86 *c)
}
}
static bool cpu_has_zenbleed_microcode(void)
{
u32 good_rev = 0;
switch (boot_cpu_data.x86_model) {
case 0x30 ... 0x3f: good_rev = 0x0830107b; break;
case 0x60 ... 0x67: good_rev = 0x0860010c; break;
case 0x68 ... 0x6f: good_rev = 0x08608107; break;
case 0x70 ... 0x7f: good_rev = 0x08701033; break;
case 0xa0 ... 0xaf: good_rev = 0x08a00009; break;
default:
return false;
}
if (boot_cpu_data.microcode < good_rev)
return false;
return true;
}
static const struct x86_cpu_id amd_zenbleed_microcode[] = {
ZEN_MODEL_STEP_UCODE(0x17, 0x31, 0x0, 0x0830107b),
ZEN_MODEL_STEP_UCODE(0x17, 0x60, 0x1, 0x0860010c),
ZEN_MODEL_STEP_UCODE(0x17, 0x68, 0x1, 0x08608107),
ZEN_MODEL_STEP_UCODE(0x17, 0x71, 0x0, 0x08701033),
ZEN_MODEL_STEP_UCODE(0x17, 0xa0, 0x0, 0x08a00009),
{}
};
static void zen2_zenbleed_check(struct cpuinfo_x86 *c)
{
@ -980,7 +968,7 @@ static void zen2_zenbleed_check(struct cpuinfo_x86 *c)
if (!cpu_has(c, X86_FEATURE_AVX))
return;
if (!cpu_has_zenbleed_microcode()) {
if (!x86_match_min_microcode_rev(amd_zenbleed_microcode)) {
pr_notice_once("Zenbleed: please update your microcode for the most optimal fix\n");
msr_set_bit(MSR_AMD64_DE_CFG, MSR_AMD64_DE_CFG_ZEN2_FP_BACKUP_FIX_BIT);
} else {
@ -1063,12 +1051,6 @@ static void init_amd(struct cpuinfo_x86 *c)
early_init_amd(c);
/*
* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
* 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
*/
clear_cpu_cap(c, 0*32+31);
if (c->x86 >= 0x10)
set_cpu_cap(c, X86_FEATURE_REP_GOOD);

View File

@ -119,12 +119,6 @@ static void init_centaur(struct cpuinfo_x86 *c)
u32 fcr_clr = 0;
u32 lo, hi, newlo;
u32 aa, bb, cc, dd;
/*
* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
* 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
*/
clear_cpu_cap(c, 0*32+31);
#endif
early_init_centaur(c);
init_intel_cacheinfo(c);

View File

@ -195,12 +195,6 @@ static void init_cyrix(struct cpuinfo_x86 *c)
char *buf = c->x86_model_id;
const char *p = NULL;
/*
* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
* 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
*/
clear_cpu_cap(c, 0*32+31);
/* Cyrix used bit 24 in extended (AMD) CPUID for Cyrix MMX extensions */
if (test_cpu_cap(c, 1*32+24)) {
clear_cpu_cap(c, 1*32+24);

View File

@ -174,12 +174,6 @@ static void init_hygon(struct cpuinfo_x86 *c)
early_init_hygon(c);
/*
* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
* 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
*/
clear_cpu_cap(c, 0*32+31);
set_cpu_cap(c, X86_FEATURE_REP_GOOD);
/*