x86/traps: Dump the instruction stream even for double faults
PATCH 1/1 x86/traps: Dump the instruction stream even for double faults
This helps debug #DF's which occur in alternative patches
Reported-by George Dunlap <[email protected]>
Signed-off-by Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Juergen Gross <[email protected]>
--- xen/arch/x86/traps.c | 2 +- xen/arch/x86/x86_64/traps.c | 1 + xen/include/asm-x86/processor.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-)
xen/arch/x86/traps.c +1 -1
@@ -148,7 +148,7 @@ void (* const exception_table[TRAP_nr])(struct cpu_user_regs *regs) = { (ARRAY_SIZE(exception_table) - 1)] = do_reserved_trap, }; -static void show_code (const struct cpu_user_regs *regs) +void show_code (const struct cpu_user_regs *regs) {unsigned char insns_before[8 ] = {}, insns_after[16 ] = {};unsigned int i, tmp, missing_before, missing_after;
xen/arch/x86/x86_64/traps.c +1 -0
@@ -255,6 +255,7 @@ void do_double_fault(struct cpu_user_regs *regs)printk ("CPU: %d\n" , cpu);_show_registers (regs, crs, CTXT_hypervisor,NULL ); +show_code (regs);show_stack_overflow (cpu, regs);panic ("DOUBLE FAULT -- system shutdown" );
xen/include/asm-x86/processor.h +1 -0
@@ -468,6 +468,7 @@ static always_inline void rep_nop(void)#define cpu_relax () rep_nop() +void show_code (const struct cpu_user_regs *regs);void show_stack (const struct cpu_user_regs *regs);void show_stack_overflow (unsigned int cpu,const struct cpu_user_regs *regs);void show_registers (const struct cpu_user_regs *regs);
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 24.05.18 at 16:07, <[email protected]> wrote:
This helps debug #DF's which occur in alternative patches
Reported-by George Dunlap <[email protected]>Signed-off-by Andrew Cooper <[email protected]>
Reviewed-by Jan Beulich <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 4 lines · Andrew Cooper
This helps debug #DF's which occur in alternative patches
Reported-by George Dunlap <[email protected]>Signed-off-by Andrew Cooper <[email protected]>
Release-acked-by Juergen Gross <[email protected]>
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel