File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1652,7 +1652,8 @@ static void __init bhi_select_mitigation(void)
1652
1652
return ;
1653
1653
1654
1654
/* Retpoline mitigates against BHI unless the CPU has RRSBA behavior */
1655
- if (cpu_feature_enabled (X86_FEATURE_RETPOLINE )) {
1655
+ if (boot_cpu_has (X86_FEATURE_RETPOLINE ) &&
1656
+ !boot_cpu_has (X86_FEATURE_RETPOLINE_LFENCE )) {
1656
1657
spec_ctrl_disable_kernel_rrsba ();
1657
1658
if (rrsba_disabled )
1658
1659
return ;
@@ -2804,11 +2805,13 @@ static const char *spectre_bhi_state(void)
2804
2805
{
2805
2806
if (!boot_cpu_has_bug (X86_BUG_BHI ))
2806
2807
return "; BHI: Not affected" ;
2807
- else if (boot_cpu_has (X86_FEATURE_CLEAR_BHB_HW ))
2808
+ else if (boot_cpu_has (X86_FEATURE_CLEAR_BHB_HW ))
2808
2809
return "; BHI: BHI_DIS_S" ;
2809
- else if (boot_cpu_has (X86_FEATURE_CLEAR_BHB_LOOP ))
2810
+ else if (boot_cpu_has (X86_FEATURE_CLEAR_BHB_LOOP ))
2810
2811
return "; BHI: SW loop, KVM: SW loop" ;
2811
- else if (boot_cpu_has (X86_FEATURE_RETPOLINE ) && rrsba_disabled )
2812
+ else if (boot_cpu_has (X86_FEATURE_RETPOLINE ) &&
2813
+ !boot_cpu_has (X86_FEATURE_RETPOLINE_LFENCE ) &&
2814
+ rrsba_disabled )
2812
2815
return "; BHI: Retpoline" ;
2813
2816
else if (boot_cpu_has (X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT ))
2814
2817
return "; BHI: Vulnerable, KVM: SW loop" ;
You can’t perform that action at this time.
0 commit comments