Skip to contentSkip to conversation

xen/arm: traps: Print a message in debug build when a guest dabt is not handled

PATCH In review Julien Grall 2 participants 3 messages May 28, 2015 – Jun 3, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/arm: traps: Print a message in debug build when a guest dabt is not handled

This is useful for debugging low level kernel before the guest as setup the vector table.

Note that the value of the IPA is only here for reference and may not always be valid if the error came from a stage 1 table translation walk.

---

Rather than having a check only for UART, a more generic message would be more useful in debug build.

---
 xen/arch/arm/traps.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
xen/arch/arm/traps.c +2 -1
index 47d6cef..1dcc31f 100644
@@ -2355,7 +2355,6 @@ static void do_trap_data_abort_guest(struct cpu_user_regs *regs,
 #else
     info.gva = READ_SYSREG64(FAR_EL2);
 #endif
-
     if ( dabt.s1ptw )
         info.gpa = READ_SYSREG(HPFAR_EL2);
     else
@@ -2413,6 +2412,8 @@ static void do_trap_data_abort_guest(struct cpu_user_regs *regs,
     }
 
 bad_data_abort:
+    gdprintk(XENLOG_DEBUG, "HSR=0x%x pc=%#"PRIregister" gva=%#"PRIvaddr
+             " gpa=%#"PRIpaddr"\n", hsr.bits, regs->pc, info.gva, info.gpa);
     inject_dabt_exception(regs, info.gva, hsr.len);
 }
 
Signature · 1 line
2.1.4
#1 lore raw
Quoted 7 lines · Julien Grall

This is useful for debugging low level kernel before the guest as setup the vector table.

Note that the value of the IPA is only here for reference and may not always be valid if the error came from a stage 1 table translation walk.

Acked + applied, but dropping the spurious whitespace change, since it didn't look deliberate.

#2 lore raw
Quoted 11 lines · Ian Campbell
Quoted 7 lines · Julien Grall

This is useful for debugging low level kernel before the guest as setup the vector table.

Note that the value of the IPA is only here for reference and may not always be valid if the error came from a stage 1 table translation walk.

Acked + applied, but dropping the spurious whitespace change, since it didn't look deliberate.

Right, I did some debugging to check the validity of this patch but forgot to remove all the lines.

Thank you,

Signature · 1 line
Julien Grall