Step three of removing arch_handle_exit(). There's *no* way the default case can ever occur: The exit reason is a hard-coded constant value inside the interrupt vector that will never have an value outside its limited range. No need for special treatment of the default handler, we can safely remove the arch_dump_exit() call.
With this, arch_dump_exit() only has one single caller left, so fold all constant arguments inside the function itself, and refactor its name to arch_el2_abt(). However, leave the panic_park() inside the default handler for now. Signed-off-by: Ralf Ramsauer <ralf.ramsa...@oth-regensburg.de> --- hypervisor/arch/arm64/traps.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hypervisor/arch/arm64/traps.c b/hypervisor/arch/arm64/traps.c index ccb86954..71f6da6f 100644 --- a/hypervisor/arch/arm64/traps.c +++ b/hypervisor/arch/arm64/traps.c @@ -182,14 +182,16 @@ static void arch_handle_trap(union registers *guest_regs) } } -static void arch_dump_exit(union registers *regs, const char *reason) +static void arch_el2_abt(union registers *regs) { struct trap_context ctx; fill_trap_context(&ctx, regs); - panic_printk("\nFATAL: Unhandled HYP exception: %s\n", reason); + panic_printk("\nFATAL: Unhandled HYP exception: " + "synchronous abort from EL2\n"); dump_regs(&ctx); dump_hyp_stack(&ctx); + panic_stop(); } union registers *arch_handle_exit(union registers *regs) @@ -204,12 +206,10 @@ union registers *arch_handle_exit(union registers *regs) break; case EXIT_REASON_EL2_ABORT: - arch_dump_exit(regs, "synchronous abort from EL2"); - panic_stop(); + arch_el2_abt(regs); break; default: - arch_dump_exit(regs, "unexpected"); panic_stop(); } -- 2.19.1 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to jailhouse-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.