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

[Xen-devel] [PATCH 1/2] xen: arm: enable 32bit kernel stack trace



Signed-off-by: Bamvor Jian Zhang <bjzhang@xxxxxxxx>
---
 xen/arch/arm/traps.c | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 4c0fc32..70623ee 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -628,13 +628,21 @@ static void show_guest_stack(struct vcpu *v, struct 
cpu_user_regs *regs)
         printk("No stack trace for guest user-mode\n");
         return;
 
-    case PSR_MODE_FIQ:
-    case PSR_MODE_IRQ:
-    case PSR_MODE_SVC:
-    case PSR_MODE_ABT:
-    case PSR_MODE_UND:
-        printk("No stack trace for 32-bit guest kernel-mode\n");
-        return;
+    case PSR_MODE_FIQ: 
+        sp = regs->sp_fiq; 
+        break; 
+    case PSR_MODE_IRQ: 
+        sp = regs->sp_irq; 
+        break; 
+    case PSR_MODE_SVC: 
+        sp = regs->sp_svc; 
+        break; 
+    case PSR_MODE_ABT: 
+        sp = regs->sp_abt; 
+        break; 
+    case PSR_MODE_UND: 
+        sp = regs->sp_und; 
+        break; 
 
 #ifdef CONFIG_ARM_64
     case PSR_MODE_EL1t:
-- 
1.8.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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