Messages in this thread Patch in this message | | | From | Tim Chen <> | Subject | [PATCH v2 7/8] x86: Do not use dynamic IBRS if retpoline is enabled | Date | Fri, 5 Jan 2018 18:12:22 -0800 |
| |
Don't use dynamic IBRS that toggle IBRS on entry/exit to kernel code if retpoline is used.
Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com> --- arch/x86/kernel/cpu/spec_ctrl.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/cpu/spec_ctrl.c b/arch/x86/kernel/cpu/spec_ctrl.c index 28107a2..076c470 100644 --- a/arch/x86/kernel/cpu/spec_ctrl.c +++ b/arch/x86/kernel/cpu/spec_ctrl.c @@ -26,10 +26,12 @@ DEFINE_MUTEX(spec_ctrl_mutex); static inline void set_ibrs_feature(void) { +#if !defined(RETPOLINE) if (!ibrs_admin_disabled) { dynamic_ibrs = 1; ibrs_enabled = IBRS_ENABLED; } +#endif } void scan_spec_ctrl_feature(struct cpuinfo_x86 *c) -- 2.9.4
| |