File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -538,20 +538,21 @@ static void __init taa_select_mitigation(void)
538
538
return ;
539
539
}
540
540
541
- if (cpu_mitigations_off ())
542
- taa_mitigation = TAA_MITIGATION_OFF ;
543
-
544
541
/* Microcode will be checked in taa_update_mitigation(). */
545
- if (taa_mitigation == TAA_MITIGATION_AUTO )
546
- taa_mitigation = TAA_MITIGATION_VERW ;
542
+ if (taa_mitigation == TAA_MITIGATION_AUTO ) {
543
+ if (should_mitigate_vuln (X86_BUG_TAA ))
544
+ taa_mitigation = TAA_MITIGATION_VERW ;
545
+ else
546
+ taa_mitigation = TAA_MITIGATION_OFF ;
547
+ }
547
548
548
549
if (taa_mitigation != TAA_MITIGATION_OFF )
549
550
verw_clear_cpu_buf_mitigation_selected = true;
550
551
}
551
552
552
553
static void __init taa_update_mitigation (void )
553
554
{
554
- if (!taa_vulnerable () || cpu_mitigations_off () )
555
+ if (!taa_vulnerable ())
555
556
return ;
556
557
557
558
if (verw_clear_cpu_buf_mitigation_selected )
@@ -592,7 +593,7 @@ static void __init taa_apply_mitigation(void)
592
593
*/
593
594
setup_force_cpu_cap (X86_FEATURE_CLEAR_CPU_BUF );
594
595
595
- if (taa_nosmt || cpu_mitigations_auto_nosmt () )
596
+ if (taa_nosmt || smt_mitigations == SMT_MITIGATIONS_ON )
596
597
cpu_smt_disable (false);
597
598
}
598
599
}
You can’t perform that action at this time.
0 commit comments