e293be
diff -up ./arch/x86/kernel/cpu/common.c.dist ./arch/x86/kernel/cpu/common.c
e293be
--- ./arch/x86/kernel/cpu/common.c.dist	2017-12-29 03:59:43.000000000 +0900
e293be
+++ ./arch/x86/kernel/cpu/common.c	2018-01-10 15:37:06.848478838 +0900
e293be
@@ -1349,6 +1349,9 @@ DEFINE_PER_CPU(struct task_struct *, fpu
e293be
 DEFINE_PER_CPU_ALIGNED(struct stack_canary, stack_canary);
e293be
 #endif
e293be
 
e293be
+DEFINE_PER_CPU_USER_MAPPED(struct kernel_ibrs_spec_ctrl, spec_ctrl_pcp);
e293be
+EXPORT_PER_CPU_SYMBOL_GPL(spec_ctrl_pcp);
e293be
+
e293be
 #endif	/* CONFIG_X86_64 */
e293be
 
e293be
 /*
e293be
diff -up ./arch/x86/include/asm/spec_ctrl.h.dist ./arch/x86/include/asm/spec_ctrl.h
e293be
--- ./arch/x86/include/asm/spec_ctrl.h.dist    2018-06-15 13:57:32.000000000 -0700
e293be
+++ ./arch/x86/include/asm/spec_ctrl.h 2018-06-26 10:42:53.981000000 -0700
e293be
@@ -191,6 +191,8 @@ extern void spec_ctrl_cpu_init(void);
e293be
 extern void ssb_select_mitigation(void);
e293be
 extern void ssb_print_mitigation(void);
e293be
 
e293be
+DECLARE_PER_CPU_USER_MAPPED(struct kernel_ibrs_spec_ctrl, spec_ctrl_pcp);
e293be
+
e293be
 bool spec_ctrl_force_enable_ibrs(void);
e293be
 bool spec_ctrl_cond_enable_ibrs(bool full_retpoline);
e293be
 bool spec_ctrl_enable_ibrs_always(void);
e293be
diff -up ./arch/x86/kernel/reboot.c.dist ./arch/x86/kernel/reboot.c
e293be
--- ./arch/x86/kernel/reboot.c.dist	2017-12-29 03:59:43.000000000 +0900
e293be
+++ ./arch/x86/kernel/reboot.c	2018-01-10 15:43:36.819240224 +0900
e293be
@@ -23,6 +23,7 @@
e293be
 #include <asm/cpu.h>
e293be
 #include <asm/nmi.h>
e293be
 #include <asm/smp.h>
e293be
+#include <asm/mmu_context.h>
e293be
 
e293be
 #include <linux/ctype.h>
e293be
 #include <linux/mc146818rtc.h>
e293be
diff -up ./arch/x86/kernel/smpboot.c.dist ./arch/x86/kernel/smpboot.c
e293be
--- ./arch/x86/kernel/smpboot.c.dist	2018-01-10 14:53:15.251175037 +0900
e293be
+++ ./arch/x86/kernel/smpboot.c	2018-01-10 15:45:14.219976320 +0900
e293be
@@ -72,6 +72,7 @@
e293be
 #include <asm/fpu-internal.h>
e293be
 #include <asm/setup.h>
e293be
 #include <asm/uv/uv.h>
e293be
+#include <asm/mmu_context.h>
e293be
 #include <linux/mc146818rtc.h>
e293be
 
e293be
 #include <asm/smpboot_hooks.h>
e293be
diff -up ./arch/x86/platform/efi/efi_32.c.dist ./arch/x86/platform/efi/efi_32.c
e293be
--- ./arch/x86/platform/efi/efi_32.c.dist	2017-12-29 03:59:43.000000000 +0900
e293be
+++ ./arch/x86/platform/efi/efi_32.c	2018-01-10 15:45:56.356433372 +0900
e293be
@@ -30,6 +30,7 @@
e293be
 #include <asm/pgtable.h>
e293be
 #include <asm/tlbflush.h>
e293be
 #include <asm/efi.h>
e293be
+#include <asm/mmu_context.h>
e293be
 
e293be
 /*
e293be
  * To make EFI call EFI runtime service in physical addressing mode we need
e293be