@@ -2851,6 +2851,7 @@ enum srso_mitigation {
2851
2851
SRSO_MITIGATION_UCODE_NEEDED ,
2852
2852
SRSO_MITIGATION_SAFE_RET_UCODE_NEEDED ,
2853
2853
SRSO_MITIGATION_MICROCODE ,
2854
+ SRSO_MITIGATION_NOSMT ,
2854
2855
SRSO_MITIGATION_SAFE_RET ,
2855
2856
SRSO_MITIGATION_IBPB ,
2856
2857
SRSO_MITIGATION_IBPB_ON_VMEXIT ,
@@ -2862,6 +2863,7 @@ static const char * const srso_strings[] = {
2862
2863
[SRSO_MITIGATION_UCODE_NEEDED ] = "Vulnerable: No microcode" ,
2863
2864
[SRSO_MITIGATION_SAFE_RET_UCODE_NEEDED ] = "Vulnerable: Safe RET, no microcode" ,
2864
2865
[SRSO_MITIGATION_MICROCODE ] = "Vulnerable: Microcode, no safe RET" ,
2866
+ [SRSO_MITIGATION_NOSMT ] = "Mitigation: SMT disabled" ,
2865
2867
[SRSO_MITIGATION_SAFE_RET ] = "Mitigation: Safe RET" ,
2866
2868
[SRSO_MITIGATION_IBPB ] = "Mitigation: IBPB" ,
2867
2869
[SRSO_MITIGATION_IBPB_ON_VMEXIT ] = "Mitigation: IBPB on VMEXIT only" ,
@@ -2914,8 +2916,7 @@ static void __init srso_select_mitigation(void)
2914
2916
* IBPB microcode has been applied.
2915
2917
*/
2916
2918
if (boot_cpu_data .x86 < 0x19 && !cpu_smt_possible ()) {
2917
- setup_force_cpu_cap (X86_FEATURE_SRSO_NO );
2918
- srso_mitigation = SRSO_MITIGATION_NONE ;
2919
+ srso_mitigation = SRSO_MITIGATION_NOSMT ;
2919
2920
return ;
2920
2921
}
2921
2922
} else {
@@ -2968,8 +2969,7 @@ static void __init srso_update_mitigation(void)
2968
2969
srso_mitigation = SRSO_MITIGATION_IBPB ;
2969
2970
2970
2971
if (boot_cpu_has_bug (X86_BUG_SRSO ) &&
2971
- !cpu_mitigations_off () &&
2972
- !boot_cpu_has (X86_FEATURE_SRSO_NO ))
2972
+ !cpu_mitigations_off ())
2973
2973
pr_info ("%s\n" , srso_strings [srso_mitigation ]);
2974
2974
}
2975
2975
@@ -3265,9 +3265,6 @@ static ssize_t retbleed_show_state(char *buf)
3265
3265
3266
3266
static ssize_t srso_show_state (char * buf )
3267
3267
{
3268
- if (boot_cpu_has (X86_FEATURE_SRSO_NO ))
3269
- return sysfs_emit (buf , "Mitigation: SMT disabled\n" );
3270
-
3271
3268
return sysfs_emit (buf , "%s\n" , srso_strings [srso_mitigation ]);
3272
3269
}
3273
3270
0 commit comments