]> xenbits.xensource.com Git - people/tklengyel/xen.git/commitdiff
x86/traps: Make nmi_show_execution_state() more useful
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 12 Aug 2022 17:25:55 +0000 (18:25 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 17 Aug 2022 11:50:48 +0000 (12:50 +0100)
 * Always emit current.  It's critically important.
 * Do not render (0000000000000000) for the symbol in guest context.  It's
   just line-noise.  Instead, explicitly identify which Xen vs guest context.
 * Try to tabulate the data, because there is often lots of it.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/traps.c

index b713ef7e77ce4441facc226c05ea98b36a9946db..7207390118e8110868c8376a3ccc6fbbc387b9f7 100644 (file)
@@ -767,9 +767,13 @@ static int cf_check nmi_show_execution_state(
 
     if ( opt_show_all )
         show_execution_state(regs);
+    else if ( guest_mode(regs) )
+        printk(XENLOG_ERR "CPU%d\t%pv\t%04x:%p in guest\n",
+               cpu, current, regs->cs, _p(regs->rip));
     else
-        printk(XENLOG_ERR "CPU%d @ %04x:%08lx (%pS)\n", cpu, regs->cs,
-               regs->rip, guest_mode(regs) ? NULL : _p(regs->rip));
+        printk(XENLOG_ERR "CPU%d\t%pv\t%04x:%p in Xen: %pS\n",
+               cpu, current, regs->cs, _p(regs->rip), _p(regs->rip));
+
     cpumask_clear_cpu(cpu, &show_state_mask);
 
     return 1;