File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -639,8 +639,12 @@ static void __init mmio_select_mitigation(void)
639
639
}
640
640
641
641
/* 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
+ }
644
648
645
649
if (mmio_mitigation == MMIO_MITIGATION_OFF )
646
650
return ;
@@ -655,7 +659,7 @@ static void __init mmio_select_mitigation(void)
655
659
656
660
static void __init mmio_update_mitigation (void )
657
661
{
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 ))
659
663
return ;
660
664
661
665
if (verw_clear_cpu_buf_mitigation_selected )
@@ -703,7 +707,7 @@ static void __init mmio_apply_mitigation(void)
703
707
if (!(x86_arch_cap_msr & ARCH_CAP_FBSDP_NO ))
704
708
static_branch_enable (& cpu_buf_idle_clear );
705
709
706
- if (mmio_nosmt || cpu_mitigations_auto_nosmt () )
710
+ if (mmio_nosmt || smt_mitigations == SMT_MITIGATIONS_ON )
707
711
cpu_smt_disable (false);
708
712
}
709
713
You can’t perform that action at this time.
0 commit comments