File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -2995,17 +2995,23 @@ static void override_cache_bits(struct cpuinfo_x86 *c)
2995
2995
2996
2996
static void __init l1tf_select_mitigation (void )
2997
2997
{
2998
- if (!boot_cpu_has_bug (X86_BUG_L1TF ) || cpu_mitigations_off () ) {
2998
+ if (!boot_cpu_has_bug (X86_BUG_L1TF )) {
2999
2999
l1tf_mitigation = L1TF_MITIGATION_OFF ;
3000
3000
return ;
3001
3001
}
3002
3002
3003
- if (l1tf_mitigation == L1TF_MITIGATION_AUTO ) {
3004
- if (cpu_mitigations_auto_nosmt ())
3005
- l1tf_mitigation = L1TF_MITIGATION_FLUSH_NOSMT ;
3006
- else
3007
- l1tf_mitigation = L1TF_MITIGATION_FLUSH ;
3003
+ if (l1tf_mitigation != L1TF_MITIGATION_AUTO )
3004
+ return ;
3005
+
3006
+ if (!should_mitigate_vuln (X86_BUG_L1TF )) {
3007
+ l1tf_mitigation = L1TF_MITIGATION_OFF ;
3008
+ return ;
3008
3009
}
3010
+
3011
+ if (smt_mitigations == SMT_MITIGATIONS_ON )
3012
+ l1tf_mitigation = L1TF_MITIGATION_FLUSH_NOSMT ;
3013
+ else
3014
+ l1tf_mitigation = L1TF_MITIGATION_FLUSH ;
3009
3015
}
3010
3016
3011
3017
static void __init l1tf_apply_mitigation (void )
You can’t perform that action at this time.
0 commit comments