Commit 6912979
x86/bugs: Fix BHI retpoline check
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: ec9404e ("x86/bhi: Add BHI mitigation knob")
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/ad3807424a3953f0323c011a643405619f2a4927.1712944776.git.jpoimboe@kernel.org1 parent 7211274 commit 6912979
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1652 | 1652 | | |
1653 | 1653 | | |
1654 | 1654 | | |
1655 | | - | |
| 1655 | + | |
| 1656 | + | |
1656 | 1657 | | |
1657 | 1658 | | |
1658 | 1659 | | |
| |||
2804 | 2805 | | |
2805 | 2806 | | |
2806 | 2807 | | |
2807 | | - | |
| 2808 | + | |
2808 | 2809 | | |
2809 | | - | |
| 2810 | + | |
2810 | 2811 | | |
2811 | | - | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
2812 | 2815 | | |
2813 | 2816 | | |
2814 | 2817 | | |
| |||
0 commit comments