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

Re: [Xen-devel] Domain 0 crashed when booting OMAP5 uEVM




> (XEN)     size=2 sign=0 write=0 reg=0
> (XEN)     eat=0 cm=0 s1ptw=0 dfsc=7
> (XEN) dom0 IPA 0x000000004ae06704
> (XEN) P2M @ 02fdbf80 mfn:0xfedfc
> (XEN) 1ST[0x1] = 0x00000000fedfe6ff
> (XEN) 2ND[0x57] = 0x00000000ac9796ff
> (XEN) 3RD[0x6] = 0x0000000000000000
> (XEN) ----[ Xen-4.4-unstable  arm32  debug=y  Not tainted ]----
> (XEN) CPU:    0
> (XEN) PC:     c0033410

To help you, you can use "addr2line -e vmlinux address" to find the
faulty line in linux. Where address is your pc.


long time ago, when we faced similar problems, we did a debug patch:

diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index f3f88d4..76ec21c 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -862,6 +862,27 @@ done:
     if (first) unmap_domain_page(first);
 }
 
+#ifdef DEBUG_DOMAIN
+static uint32_t exec_vector_base(void) {
+ if (READ_SYSREG(SCTLR_EL1) & SCTLR_V)
+ return EXC_BASE_ADDR_HI;
+ else if (READ_SYSREG32(ID_PFR1_EL1) & PFR1_SE_MASK)
+ return READ_SYSREG(VBAR_EL1);
+ else
+ return EXC_BASE_ADDR_LO;
+}
+
+static void domain_data_abort(struct cpu_user_regs *regs) {
+ printk("Data abort invokation on the domain side...\n");
+ regs->spsr_abt = regs->cpsr;
+ regs->lr_abt = regs->pc + 8;
+ WRITE_SYSREG(READ_SYSREG(HCR_EL2) | HCR_VA, HCR_EL2);
+ regs->cpsr &= ~(PSR_JAZELLE | PSR_IT_MASK | PSR_MODE_MASK);
+ regs->cpsr |= PSR_MODE_ABT | PSR_IRQ_MASK | PSR_ABT_MASK;
+ regs->pc = exec_vector_base() + DATA_ABORT_OFFSET;
+}
+#endif
+
 static void do_trap_data_abort_guest(struct cpu_user_regs *regs,
                                      struct hsr_dabt dabt)
 {
@@ -917,7 +938,11 @@ bad_data_abort:
     else
         dump_guest_s1_walk(current->domain, info.gva);
     show_execution_state(regs);
+#ifndef DEBUG_DOMAIN
     domain_crash_synchronous();
+#else
+    domain_data_abort(regs);
+#endif
 }
 
 asmlinkage void do_trap_hypervisor(struct cpu_user_regs *regs)
diff --git a/xen/include/asm-arm/arm32/processor.h b/xen/include/asm-arm/arm32/processor.h
index a782d96..4de8431 100644
--- a/xen/include/asm-arm/arm32/processor.h
+++ b/xen/include/asm-arm/arm32/processor.h
@@ -107,6 +107,11 @@ struct cpu_user_regs
 #define READ_SYSREG(R...)       READ_SYSREG32(R)
 #define WRITE_SYSREG(V, R...)   WRITE_SYSREG32(V, R)
 
+#define EXC_BASE_ADDR_HI        0xffff0000
+#define EXC_BASE_ADDR_LO        0x00000000
+
+#define DATA_ABORT_OFFSET       0x10
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* __ASM_ARM_ARM32_PROCESSOR_H */
diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index 3333399..a07a33c 100644
--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -228,6 +228,10 @@ typedef uint64_t xen_callback_t;
 #define PSR_BIG_ENDIAN  (1<<9)        /* Big Endian Mode */
 #define PSR_JAZELLE     (1<<24)       /* Jazelle Mode */
 
+/* If-Then execution state bits mask for the Thumb IT (If-Then) instruction */
+#define PSR_IT_MASK     (0x3F<<10 | 0x3<<25)
+#define PFR1_SE_MASK    (0xF<<4)      /* PFR1 Security Extensions bits mask */
+
 #endif /*  __XEN_PUBLIC_ARCH_ARM_H__ */
 
 /*
-- 
1.7.9.5

The idea was to invoke data abort on domain side, to see call stack. This patch applied to the code we forked near the March this year, I don't know if it would fit current code. It worked for Dom0 only.

Sincerely,
Andrii Anisov.
_______________________________________________
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®.