File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -870,13 +870,19 @@ void update_srbds_msr(void)
870
870
871
871
static void __init srbds_select_mitigation (void )
872
872
{
873
- if (!boot_cpu_has_bug (X86_BUG_SRBDS ) || cpu_mitigations_off () ) {
873
+ if (!boot_cpu_has_bug (X86_BUG_SRBDS )) {
874
874
srbds_mitigation = SRBDS_MITIGATION_OFF ;
875
875
return ;
876
876
}
877
877
878
- if (srbds_mitigation == SRBDS_MITIGATION_AUTO )
879
- srbds_mitigation = SRBDS_MITIGATION_FULL ;
878
+ if (srbds_mitigation == SRBDS_MITIGATION_AUTO ) {
879
+ if (should_mitigate_vuln (X86_BUG_SRBDS ))
880
+ srbds_mitigation = SRBDS_MITIGATION_FULL ;
881
+ else {
882
+ srbds_mitigation = SRBDS_MITIGATION_OFF ;
883
+ return ;
884
+ }
885
+ }
880
886
881
887
/*
882
888
* Check to see if this is one of the MDS_NO systems supporting TSX that
You can’t perform that action at this time.
0 commit comments