Skip to content

Commit b490d2a

Browse files
committed
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
2 parents 3516cad + f8c7600 commit b490d2a

7 files changed

Lines changed: 13 additions & 55 deletions

File tree

arch/x86/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1817,7 +1817,7 @@ config ARCH_PKEY_BITS
18171817
choice
18181818
prompt "TSX enable mode"
18191819
depends on CPU_SUP_INTEL
1820-
default X86_INTEL_TSX_MODE_OFF
1820+
default X86_INTEL_TSX_MODE_AUTO
18211821
help
18221822
Intel's TSX (Transactional Synchronization Extensions) feature
18231823
allows to optimize locking protocols through lock elision which

arch/x86/Kconfig.cpufeatures

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ config X86_REQUIRED_FEATURE_ALWAYS
3838

3939
config X86_REQUIRED_FEATURE_NOPL
4040
def_bool y
41-
depends on X86_64 || X86_P6_NOP
41+
depends on X86_64
4242

4343
config X86_REQUIRED_FEATURE_CX8
4444
def_bool y

arch/x86/Makefile_32.cpu

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,3 @@ cflags-$(CONFIG_MGEODE_LX) += $(call cc-option,-march=geode,-march=pentium-mmx)
4242
# add at the end to overwrite eventual tuning options from earlier
4343
# cpu entries
4444
cflags-$(CONFIG_X86_GENERIC) += $(call tune,generic,$(call tune,i686))
45-
46-
# Bug fix for binutils: this option is required in order to keep
47-
# binutils from generating NOPL instructions against our will.
48-
ifneq ($(CONFIG_X86_P6_NOP),y)
49-
cflags-y += $(call cc-option,-Wa$(comma)-mtune=generic32,)
50-
endif

arch/x86/kernel/cpu/amd.c

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -873,8 +873,8 @@ static void init_amd_bd(struct cpuinfo_x86 *c)
873873
}
874874

875875
static const struct x86_cpu_id erratum_1386_microcode[] = {
876-
X86_MATCH_VFM_STEPS(VFM_MAKE(X86_VENDOR_AMD, 0x17, 0x01), 0x2, 0x2, 0x0800126e),
877-
X86_MATCH_VFM_STEPS(VFM_MAKE(X86_VENDOR_AMD, 0x17, 0x31), 0x0, 0x0, 0x08301052),
876+
ZEN_MODEL_STEP_UCODE(0x17, 0x01, 0x2, 0x0800126e),
877+
ZEN_MODEL_STEP_UCODE(0x17, 0x31, 0x0, 0x08301052),
878878
{}
879879
};
880880

@@ -951,26 +951,14 @@ static void init_amd_zen1(struct cpuinfo_x86 *c)
951951
}
952952
}
953953

954-
static bool cpu_has_zenbleed_microcode(void)
955-
{
956-
u32 good_rev = 0;
957-
958-
switch (boot_cpu_data.x86_model) {
959-
case 0x30 ... 0x3f: good_rev = 0x0830107b; break;
960-
case 0x60 ... 0x67: good_rev = 0x0860010c; break;
961-
case 0x68 ... 0x6f: good_rev = 0x08608107; break;
962-
case 0x70 ... 0x7f: good_rev = 0x08701033; break;
963-
case 0xa0 ... 0xaf: good_rev = 0x08a00009; break;
964-
965-
default:
966-
return false;
967-
}
968-
969-
if (boot_cpu_data.microcode < good_rev)
970-
return false;
971-
972-
return true;
973-
}
954+
static const struct x86_cpu_id amd_zenbleed_microcode[] = {
955+
ZEN_MODEL_STEP_UCODE(0x17, 0x31, 0x0, 0x0830107b),
956+
ZEN_MODEL_STEP_UCODE(0x17, 0x60, 0x1, 0x0860010c),
957+
ZEN_MODEL_STEP_UCODE(0x17, 0x68, 0x1, 0x08608107),
958+
ZEN_MODEL_STEP_UCODE(0x17, 0x71, 0x0, 0x08701033),
959+
ZEN_MODEL_STEP_UCODE(0x17, 0xa0, 0x0, 0x08a00009),
960+
{}
961+
};
974962

975963
static void zen2_zenbleed_check(struct cpuinfo_x86 *c)
976964
{
@@ -980,7 +968,7 @@ static void zen2_zenbleed_check(struct cpuinfo_x86 *c)
980968
if (!cpu_has(c, X86_FEATURE_AVX))
981969
return;
982970

983-
if (!cpu_has_zenbleed_microcode()) {
971+
if (!x86_match_min_microcode_rev(amd_zenbleed_microcode)) {
984972
pr_notice_once("Zenbleed: please update your microcode for the most optimal fix\n");
985973
msr_set_bit(MSR_AMD64_DE_CFG, MSR_AMD64_DE_CFG_ZEN2_FP_BACKUP_FIX_BIT);
986974
} else {
@@ -1063,12 +1051,6 @@ static void init_amd(struct cpuinfo_x86 *c)
10631051

10641052
early_init_amd(c);
10651053

1066-
/*
1067-
* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
1068-
* 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
1069-
*/
1070-
clear_cpu_cap(c, 0*32+31);
1071-
10721054
if (c->x86 >= 0x10)
10731055
set_cpu_cap(c, X86_FEATURE_REP_GOOD);
10741056

arch/x86/kernel/cpu/centaur.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,6 @@ static void init_centaur(struct cpuinfo_x86 *c)
119119
u32 fcr_clr = 0;
120120
u32 lo, hi, newlo;
121121
u32 aa, bb, cc, dd;
122-
123-
/*
124-
* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
125-
* 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
126-
*/
127-
clear_cpu_cap(c, 0*32+31);
128122
#endif
129123
early_init_centaur(c);
130124
init_intel_cacheinfo(c);

arch/x86/kernel/cpu/cyrix.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,6 @@ static void init_cyrix(struct cpuinfo_x86 *c)
195195
char *buf = c->x86_model_id;
196196
const char *p = NULL;
197197

198-
/*
199-
* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
200-
* 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
201-
*/
202-
clear_cpu_cap(c, 0*32+31);
203-
204198
/* Cyrix used bit 24 in extended (AMD) CPUID for Cyrix MMX extensions */
205199
if (test_cpu_cap(c, 1*32+24)) {
206200
clear_cpu_cap(c, 1*32+24);

arch/x86/kernel/cpu/hygon.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,6 @@ static void init_hygon(struct cpuinfo_x86 *c)
174174

175175
early_init_hygon(c);
176176

177-
/*
178-
* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
179-
* 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
180-
*/
181-
clear_cpu_cap(c, 0*32+31);
182-
183177
set_cpu_cap(c, X86_FEATURE_REP_GOOD);
184178

185179
/*

0 commit comments

Comments
 (0)