]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
x86/traps: Dump the instruction stream even for double faults
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 24 May 2018 14:06:16 +0000 (15:06 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 28 May 2018 14:03:38 +0000 (15:03 +0100)
This helps debug #DF's which occur in alternative patches

Reported-by: George Dunlap <george.dunlap@eu.citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/arch/x86/traps.c
xen/arch/x86/x86_64/traps.c
xen/include/asm-x86/processor.h

index 824647ddce9222e2cf16d2b5ae104d18ef9c0cca..8a99174b67964ed981fb3506393b4e71faf972b9 100644 (file)
@@ -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;
index 4f85c32f92fe563d730bcf6f3bae1263036e5ac6..f7f6928d7045d8d143321e790bbfe7ab2e7378f4 100644 (file)
@@ -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");
index 0c69a5281b188fc7c9e916eceaa6f0792691f52d..9924cdf1f320b89f29fcb61e196f3563b5a909ef 100644 (file)
@@ -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);