@@ -70,10 +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_div0 [] =
74
- AMD_LEGACY_ERRATUM (AMD_MODEL_RANGE (0x17 , 0x00 , 0x0 , 0x2f , 0xf ),
75
- AMD_MODEL_RANGE (0x17 , 0x50 , 0x0 , 0x5f , 0xf ));
76
-
77
73
static const int amd_erratum_1485 [] =
78
74
AMD_LEGACY_ERRATUM (AMD_MODEL_RANGE (0x19 , 0x10 , 0x0 , 0x1f , 0xf ),
79
75
AMD_MODEL_RANGE (0x19 , 0x60 , 0x0 , 0xaf , 0xf ));
@@ -1030,6 +1026,9 @@ static void init_amd_zen(struct cpuinfo_x86 *c)
1030
1026
if (!cpu_has (c , X86_FEATURE_CPB ))
1031
1027
set_cpu_cap (c , X86_FEATURE_CPB );
1032
1028
}
1029
+
1030
+ pr_notice_once ("AMD Zen1 DIV0 bug detected. Disable SMT for full protection.\n" );
1031
+ setup_force_cpu_bug (X86_BUG_DIV0 );
1033
1032
}
1034
1033
1035
1034
static bool cpu_has_zenbleed_microcode (void )
@@ -1067,7 +1066,6 @@ static void zen2_zenbleed_check(struct cpuinfo_x86 *c)
1067
1066
} else {
1068
1067
msr_clear_bit (MSR_AMD64_DE_CFG , MSR_AMD64_DE_CFG_ZEN2_FP_BACKUP_FIX_BIT );
1069
1068
}
1070
-
1071
1069
}
1072
1070
1073
1071
static void init_amd_zen2 (struct cpuinfo_x86 * c )
@@ -1219,11 +1217,6 @@ static void init_amd(struct cpuinfo_x86 *c)
1219
1217
cpu_has (c , X86_FEATURE_AUTOIBRS ))
1220
1218
WARN_ON_ONCE (msr_set_bit (MSR_EFER , _EFER_AUTOIBRS ));
1221
1219
1222
- if (cpu_has_amd_erratum (c , amd_div0 )) {
1223
- pr_notice_once ("AMD Zen1 DIV0 bug detected. Disable SMT for full protection.\n" );
1224
- setup_force_cpu_bug (X86_BUG_DIV0 );
1225
- }
1226
-
1227
1220
if (!cpu_has (c , X86_FEATURE_HYPERVISOR ) &&
1228
1221
cpu_has_amd_erratum (c , amd_erratum_1485 ))
1229
1222
msr_set_bit (MSR_ZEN4_BP_CFG , MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT );
0 commit comments