Re: [PATCH 2/3] x86/bugs: Fix BHI retpoline check

From: Pawan Gupta
Date: Fri Apr 12 2024 - 19:18:38 EST


On Fri, Apr 12, 2024 at 11:10:33AM -0700, Josh Poimboeuf wrote:
> Confusingly, X86_FEATURE_RETPOLINE doesn't mean retpolines are enabled,
> as it also includes the original "AMD retpoline" which isn't a retpoline
> at all.
>
> Also replace cpu_feature_enabled() with boot_cpu_has() because this is
> before alternatives are patched and cpu_feature_enabled()'s fallback
> path is slower than plain old boot_cpu_has().
>
> Fixes: ec9404e40e8f ("x86/bhi: Add BHI mitigation knob")
> Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>

Reviewed-by: Pawan Gupta <pawan.kumar.gupta@xxxxxxxxxxxxxxx>