[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/traps: Record last extable faulting address
commit fe06795e82922f8d8c8910da545ef1215cbb1b8c Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Fri Oct 4 12:57:43 2013 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Oct 4 12:57:43 2013 +0200 x86/traps: Record last extable faulting address ... so the following patch can identify the location of faults leading to a decision to crash a domain. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Keir Fraser <keir@xxxxxxx> --- xen/arch/x86/traps.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index 72e8566..771e59a 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -89,6 +89,7 @@ static char __read_mostly opt_nmi[10] = "fatal"; string_param("nmi", opt_nmi); DEFINE_PER_CPU(u64, efer); +static DEFINE_PER_CPU(unsigned long, last_extable_addr); DEFINE_PER_CPU_READ_MOSTLY(u32, ler_msr); @@ -550,6 +551,7 @@ static inline void do_trap( { dprintk(XENLOG_ERR, "Trap %d: %p -> %p\n", trapnr, _p(regs->eip), _p(fixup)); + this_cpu(last_extable_addr) = regs->eip; regs->eip = fixup; return; } @@ -1038,6 +1040,7 @@ void do_invalid_op(struct cpu_user_regs *regs) die: if ( (fixup = search_exception_table(regs->eip)) != 0 ) { + this_cpu(last_extable_addr) = regs->eip; regs->eip = fixup; return; } @@ -1370,6 +1373,7 @@ void do_page_fault(struct cpu_user_regs *regs) perfc_incr(copy_user_faults); if ( unlikely(regs->error_code & PFEC_reserved_bit) ) reserved_bit_page_fault(addr, regs); + this_cpu(last_extable_addr) = regs->eip; regs->eip = fixup; return; } @@ -3062,6 +3066,7 @@ void do_general_protection(struct cpu_user_regs *regs) { dprintk(XENLOG_INFO, "GPF (%04x): %p -> %p\n", regs->error_code, _p(regs->eip), _p(fixup)); + this_cpu(last_extable_addr) = regs->eip; regs->eip = fixup; return; } -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |