On 10/12/18 7:42 AM, Peter Maydell wrote: > For AArch32, exception return happens through certain kinds > of CPSR write. We don't currently have any CPU_LOG_INT logging > of these events (unlike AArch64, where we log in the ERET > instruction). Add some suitable logging. > > This will log exception returns like this: > Exception return from AArch32 hyp to usr PC 0x80100374 > > paralleling the existing logging in the exception_return > helper for AArch64 exception returns: > Exception return from AArch64 EL2 to AArch64 EL0 PC 0x8003045c > Exception return from AArch64 EL2 to AArch32 EL0 PC 0x8003045c > > (Note that an AArch32 exception return can only be > AArch32->AArch32, never to AArch64.) > > Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> > ---
Reviewed-by: Richard Henderson <richard.hender...@linaro.org> > + static const char * const cpu_mode_names[16] = { > + "usr", "fiq", "irq", "svc", "???", "???", "mon", "abt", > + "???", "???", "hyp", "und", "???", "???", "???", "sys" > + }; Nit: Better as static const char cpu_mode_names[16][4]. For tiny strings like this, the pointer to a separate string is larger than the string itself. r~