Skip to contentSkip to conversation

x86/traps: Identify the vcpu in context when dumping registers

PATCH New Andrew Cooper 1 participant 1 message Mar 30, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/traps: Identify the vcpu in context when dumping registers

CC Keir Fraser <[email protected]>
CC Jan Beulich <[email protected]>
---
 xen/arch/x86/x86_64/traps.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
xen/arch/x86/x86_64/traps.c +4 -2
index f58e3d6..fc35aba 100644
@@ -53,9 +53,11 @@ static void _show_registers(
     printk("\nRFLAGS: %016lx   ", regs->rflags);
     if ( (context == CTXT_pv_guest) && v && v->vcpu_info )
         printk("EM: %d   ", !!vcpu_info(v, evtchn_upcall_mask));
-    printk("CONTEXT: %s\n", context_names[context]);
+    printk("CONTEXT: %s", context_names[context]);
+    if ( v && !is_idle_vcpu(v) )
+        printk(" (%pv)", v);
 
-    printk("rax: %016lx   rbx: %016lx   rcx: %016lx\n",
+    printk("\nrax: %016lx   rbx: %016lx   rcx: %016lx\n",
            regs->rax, regs->rbx, regs->rcx);
     printk("rdx: %016lx   rsi: %016lx   rdi: %016lx\n",
            regs->rdx, regs->rsi, regs->rdi);
Signature · 1 line
1.7.10.4