File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -639,8 +639,12 @@ static void __init mmio_select_mitigation(void)
639639 }
640640
641641 /* Microcode will be checked in mmio_update_mitigation(). */
642- if (mmio_mitigation == MMIO_MITIGATION_AUTO )
643- mmio_mitigation = MMIO_MITIGATION_VERW ;
642+ if (mmio_mitigation == MMIO_MITIGATION_AUTO ) {
643+ if (should_mitigate_vuln (X86_BUG_MMIO_STALE_DATA ))
644+ mmio_mitigation = MMIO_MITIGATION_VERW ;
645+ else
646+ mmio_mitigation = MMIO_MITIGATION_OFF ;
647+ }
644648
645649 if (mmio_mitigation == MMIO_MITIGATION_OFF )
646650 return ;
@@ -655,7 +659,7 @@ static void __init mmio_select_mitigation(void)
655659
656660static void __init mmio_update_mitigation (void )
657661{
658- if (!boot_cpu_has_bug (X86_BUG_MMIO_STALE_DATA ) || cpu_mitigations_off () )
662+ if (!boot_cpu_has_bug (X86_BUG_MMIO_STALE_DATA ))
659663 return ;
660664
661665 if (verw_clear_cpu_buf_mitigation_selected )
@@ -703,7 +707,7 @@ static void __init mmio_apply_mitigation(void)
703707 if (!(x86_arch_cap_msr & ARCH_CAP_FBSDP_NO ))
704708 static_branch_enable (& cpu_buf_idle_clear );
705709
706- if (mmio_nosmt || cpu_mitigations_auto_nosmt () )
710+ if (mmio_nosmt || smt_mitigations == SMT_MITIGATIONS_ON )
707711 cpu_smt_disable (false);
708712}
709713
You can’t perform that action at this time.
0 commit comments