@@ -70,12 +70,6 @@ static const int amd_erratum_383[] =
70
70
static const int amd_erratum_1054 [] =
71
71
AMD_LEGACY_ERRATUM (AMD_MODEL_RANGE (0x17 , 0 , 0 , 0x2f , 0xf ));
72
72
73
- static const int amd_zenbleed [] =
74
- AMD_LEGACY_ERRATUM (AMD_MODEL_RANGE (0x17 , 0x30 , 0x0 , 0x4f , 0xf ),
75
- AMD_MODEL_RANGE (0x17 , 0x60 , 0x0 , 0x7f , 0xf ),
76
- AMD_MODEL_RANGE (0x17 , 0x90 , 0x0 , 0x91 , 0xf ),
77
- AMD_MODEL_RANGE (0x17 , 0xa0 , 0x0 , 0xaf , 0xf ));
78
-
79
73
static const int amd_div0 [] =
80
74
AMD_LEGACY_ERRATUM (AMD_MODEL_RANGE (0x17 , 0x00 , 0x0 , 0x2f , 0xf ),
81
75
AMD_MODEL_RANGE (0x17 , 0x50 , 0x0 , 0x5f , 0xf ));
@@ -1059,11 +1053,8 @@ static bool cpu_has_zenbleed_microcode(void)
1059
1053
return true;
1060
1054
}
1061
1055
1062
- static void zenbleed_check (struct cpuinfo_x86 * c )
1056
+ static void zen2_zenbleed_check (struct cpuinfo_x86 * c )
1063
1057
{
1064
- if (!cpu_has_amd_erratum (c , amd_zenbleed ))
1065
- return ;
1066
-
1067
1058
if (cpu_has (c , X86_FEATURE_HYPERVISOR ))
1068
1059
return ;
1069
1060
@@ -1084,6 +1075,7 @@ static void init_amd_zen2(struct cpuinfo_x86 *c)
1084
1075
init_amd_zen_common ();
1085
1076
init_spectral_chicken (c );
1086
1077
fix_erratum_1386 (c );
1078
+ zen2_zenbleed_check (c );
1087
1079
}
1088
1080
1089
1081
static void init_amd_zen3 (struct cpuinfo_x86 * c )
@@ -1227,8 +1219,6 @@ static void init_amd(struct cpuinfo_x86 *c)
1227
1219
cpu_has (c , X86_FEATURE_AUTOIBRS ))
1228
1220
WARN_ON_ONCE (msr_set_bit (MSR_EFER , _EFER_AUTOIBRS ));
1229
1221
1230
- zenbleed_check (c );
1231
-
1232
1222
if (cpu_has_amd_erratum (c , amd_div0 )) {
1233
1223
pr_notice_once ("AMD Zen1 DIV0 bug detected. Disable SMT for full protection.\n" );
1234
1224
setup_force_cpu_bug (X86_BUG_DIV0 );
@@ -1393,7 +1383,7 @@ static void zenbleed_check_cpu(void *unused)
1393
1383
{
1394
1384
struct cpuinfo_x86 * c = & cpu_data (smp_processor_id ());
1395
1385
1396
- zenbleed_check (c );
1386
+ zen2_zenbleed_check (c );
1397
1387
}
1398
1388
1399
1389
void amd_check_microcode (void )
0 commit comments