Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
{
BUG_ON( !guest_mode(regs) );
+#ifdef CONFIG_ARM_32
/*
* We rely heavily on the layout of cpu_user_regs to avoid having
* to handle all of the registers individually. Use BUILD_BUG_ON to
BUG();
}
#undef REGOFFS
+#else
+ /* In 64 bit the syndrome register contains the AArch64 register
+ * number even if the trap was from AArch32 mode. Except that
+ * AArch32 R15 (PC) is encoded as 0b11111.
+ */
+ if ( reg == 0x1f /* && is aarch32 guest */)
+ return ®s->pc;
+ return ®s->x0 + reg;
+#endif
}
static const char *decode_fsc(uint32_t fsc, int *level)