summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/cpu_entry_area.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-04-14 17:59:49 +0200
committerBorislav Petkov <bp@suse.de>2019-04-17 13:00:22 +0200
commit7623f37e411156e6e09b95cf5c76e509c5fda640 (patch)
tree4453bae0400beefac913febe3d0d75112ab5224f /arch/x86/include/asm/cpu_entry_area.h
parenta4af767ae59cc579569bbfe49513a0037d5989ee (diff)
downloadlinux-stable-7623f37e411156e6e09b95cf5c76e509c5fda640.tar.gz
linux-stable-7623f37e411156e6e09b95cf5c76e509c5fda640.tar.bz2
linux-stable-7623f37e411156e6e09b95cf5c76e509c5fda640.zip
x86/cpu_entry_area: Provide exception stack accessor
Store a pointer to the per cpu entry area exception stack mappings to allow fast retrieval. Required for converting various places from using the shadow IST array to directly doing address calculations on the actual mapping address. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sean Christopherson <sean.j.christopherson@intel.com> Cc: x86-ml <x86@kernel.org> Link: https://lkml.kernel.org/r/20190414160144.680960459@linutronix.de
Diffstat (limited to 'arch/x86/include/asm/cpu_entry_area.h')
-rw-r--r--arch/x86/include/asm/cpu_entry_area.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/include/asm/cpu_entry_area.h b/arch/x86/include/asm/cpu_entry_area.h
index af8c312673de..9b406f067ecf 100644
--- a/arch/x86/include/asm/cpu_entry_area.h
+++ b/arch/x86/include/asm/cpu_entry_area.h
@@ -99,6 +99,7 @@ struct cpu_entry_area {
#define CPU_ENTRY_AREA_TOT_SIZE (CPU_ENTRY_AREA_SIZE * NR_CPUS)
DECLARE_PER_CPU(struct cpu_entry_area *, cpu_entry_area);
+DECLARE_PER_CPU(struct cea_exception_stacks *, cea_exception_stacks);
extern void setup_cpu_entry_areas(void);
extern void cea_set_pte(void *cea_vaddr, phys_addr_t pa, pgprot_t flags);
@@ -118,4 +119,7 @@ static inline struct entry_stack *cpu_entry_stack(int cpu)
return &get_cpu_entry_area(cpu)->entry_stack_page.stack;
}
+#define __this_cpu_ist_top_va(name) \
+ CEA_ESTACK_TOP(__this_cpu_read(cea_exception_stacks), name)
+
#endif