lkml.org 
[lkml]   [2018]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 7/8] x86: Do not use dynamic IBRS if retpoline is enabled
Date
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
\
 
 \ /
  Last update: 2018-01-06 03:34    [W:0.404 / U:1.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site