diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2020-02-25 23:33:24 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-06-11 15:14:57 +0200 |
commit | 9cce81cff748ef0e79b41c6e37d7137267f1212f (patch) | |
tree | b197c1d733489b240efdc79f30cd9708d19ff00d /arch | |
parent | aedbdeab00dcfcc6d751f9fb1b4896b01911d494 (diff) | |
download | linux-9cce81cff748ef0e79b41c6e37d7137267f1212f.tar.bz2 |
x86/idtentry: Provide IDTENTRY_XEN for XEN/PV
XEN/PV has special wrappers for NMI and DB exceptions. They redirect these
exceptions through regular IDTENTRY points. Provide the necessary IDTENTRY
macros to make this work
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Andy Lutomirski <luto@kernel.org>
Link: https://lkml.kernel.org/r/20200505135314.518622698@linutronix.de
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/idtentry.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/include/asm/idtentry.h b/arch/x86/include/asm/idtentry.h index 36fe964c0d53..2315eecf04fd 100644 --- a/arch/x86/include/asm/idtentry.h +++ b/arch/x86/include/asm/idtentry.h @@ -168,6 +168,18 @@ __visible noinstr void func(struct pt_regs *regs) #define DECLARE_IDTENTRY_DEBUG DECLARE_IDTENTRY_IST #define DEFINE_IDTENTRY_DEBUG DEFINE_IDTENTRY_IST +/** + * DECLARE_IDTENTRY_XEN - Declare functions for XEN redirect IDT entry points + * @vector: Vector number (ignored for C) + * @func: Function name of the entry point + * + * Used for xennmi and xendebug redirections. No DEFINE as this is all ASM + * indirection magic. + */ +#define DECLARE_IDTENTRY_XEN(vector, func) \ + asmlinkage void xen_asm_exc_xen##func(void); \ + asmlinkage void asm_exc_xen##func(void) + #else /* !__ASSEMBLY__ */ /* @@ -203,6 +215,10 @@ __visible noinstr void func(struct pt_regs *regs) /* No ASM code emitted for NMI */ #define DECLARE_IDTENTRY_NMI(vector, func) +/* XEN NMI and DB wrapper */ +#define DECLARE_IDTENTRY_XEN(vector, func) \ + idtentry vector asm_exc_xen##func exc_##func has_error_code=0 sane=1 + #endif /* __ASSEMBLY__ */ /* |