[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] x86/traps: Dump the instruction stream even for double faults



commit 4712c0a231f010253a5471531e335a5a13dcec76
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Thu May 24 15:06:16 2018 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Mon May 28 15:03:38 2018 +0100

    x86/traps: Dump the instruction stream even for double faults
    
    This helps debug #DF's which occur in alternative patches
    
    Reported-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Release-acked-by: Juergen Gross <jgross@xxxxxxxx>
---
 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(-)

diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 824647ddce..8a99174b67 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -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;
diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c
index 4f85c32f92..f7f6928d70 100644
--- a/xen/arch/x86/x86_64/traps.c
+++ b/xen/arch/x86/x86_64/traps.c
@@ -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");
diff --git a/xen/include/asm-x86/processor.h b/xen/include/asm-x86/processor.h
index 0c69a5281b..9924cdf1f3 100644
--- a/xen/include/asm-x86/processor.h
+++ b/xen/include/asm-x86/processor.h
@@ -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);
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.