Skip to contentSkip to conversation

xen/arm: Don't dump stack when the VCPU is offline

PATCH In review Julien Grall 2 participants 2 messages Sep 25, 2013 – Sep 26, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/arm: Don't dump stack when the VCPU is offline

When a VCPU is not yet online, the registers contain garbagge. This will result to call randomly BUG() in show_guest_stack.

---
 xen/arch/arm/traps.c |    6 ++++++
 1 file changed, 6 insertions(+)
xen/arch/arm/traps.c +6 -0
index 02c7e28..36fd411 100644
@@ -614,6 +614,12 @@ static void show_guest_stack(struct vcpu *v, struct cpu_user_regs *regs)
     void *mapped;
     unsigned long *stack, addr;
 
+    if ( test_bit(_VPF_down, &v->pause_flags) )
+    {
+        printk("No stack trace, VCPU offline\n");
+        return;
+    }
+
     switch ( regs->cpsr & PSR_MODE_MASK )
     {
     case PSR_MODE_USR:
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 4 lines · Julien Grall

When a VCPU is not yet online, the registers contain garbagge. This will result to call randomly BUG() in show_guest_stack.

Acked + applied, thanks.

Quoted 21 lines
---
 xen/arch/arm/traps.c |    6 ++++++
 1 file changed, 6 insertions(+)
xen/arch/arm/traps.c +6 -0
index 02c7e28..36fd411 100644
@@ -614,6 +614,12 @@ static void show_guest_stack(struct vcpu *v, struct cpu_user_regs *regs)
     void *mapped;
     unsigned long *stack, addr;
 
+    if ( test_bit(_VPF_down, &v->pause_flags) )
+    {
+        printk("No stack trace, VCPU offline\n");
+        return;
+    }
+
     switch ( regs->cpsr & PSR_MODE_MASK )
     {
     case PSR_MODE_USR: