x86/entry/xen: Route #DB correctly on Xen PV
On Xen PV, #DB doesn't use IST. It still needs to be correctly routed depending on whether it came from user or kernel mode. Get rid of DECLARE/DEFINE_IDTENTRY_XEN -- it was too hard to follow the logic. Instead, route #DB and NMI through DECLARE/DEFINE_IDTENTRY_RAW on Xen, and do the right thing for #DB. Also add more warnings to the exc_debug* handlers to make this type of failure more obvious. This fixes various forms of corruption that happen when usermode triggers #DB on Xen PV. Fixes: 4c0dcd83 ("x86/entry: Implement user mode C entry points for #DB and #MCE") Signed-off-by:Andy Lutomirski <luto@kernel.org> Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/4163e733cce0b41658e252c6c6b3464f33fdff17.1593795633.git.luto@kernel.org
Showing
- arch/x86/include/asm/idtentry.h 6 additions, 18 deletionsarch/x86/include/asm/idtentry.h
- arch/x86/kernel/traps.c 12 additions, 0 deletionsarch/x86/kernel/traps.c
- arch/x86/xen/enlighten_pv.c 24 additions, 4 deletionsarch/x86/xen/enlighten_pv.c
- arch/x86/xen/xen-asm_64.S 2 additions, 3 deletionsarch/x86/xen/xen-asm_64.S
Loading
Please register or sign in to comment