Message ID | 20220812192448.43016-10-julien@xen.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | xen/arm: More clean-ups and improvement | expand |
Hi all, Please ignore this patch. This is a duplication of patch #7. Cheers, On 12/08/2022 20:24, Julien Grall wrote: > From: Julien Grall <jgrall@amazon.com> > > Unlike arm64, on arm32 there are no extra information dumped (e.g. > page table walk) for hypervisor data abort. > > For data abort, the HSR will be set properly and so replace the call > to do_unexpected_trap() with do_trap_hyp_sync() to dispatch the error. > > Signed-off-by: Julien Grall <jgrall@amazon.com> > --- > xen/arch/arm/arm32/traps.c | 2 +- > xen/arch/arm/include/asm/traps.h | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/xen/arch/arm/arm32/traps.c b/xen/arch/arm/arm32/traps.c > index a4ce2b92d904..a2fc1c22cbc9 100644 > --- a/xen/arch/arm/arm32/traps.c > +++ b/xen/arch/arm/arm32/traps.c > @@ -81,7 +81,7 @@ void do_trap_data_abort(struct cpu_user_regs *regs) > if ( VABORT_GEN_BY_GUEST(regs) ) > do_trap_guest_serror(regs); > else > - do_unexpected_trap("Data Abort", regs); > + do_trap_hyp_sync(regs); > } > > void finalize_instr_emulation(const struct instr_details *instr) > diff --git a/xen/arch/arm/include/asm/traps.h b/xen/arch/arm/include/asm/traps.h > index 08bc0b484c75..883dae368eac 100644 > --- a/xen/arch/arm/include/asm/traps.h > +++ b/xen/arch/arm/include/asm/traps.h > @@ -73,6 +73,7 @@ int do_bug_frame(const struct cpu_user_regs *regs, vaddr_t pc); > > void noreturn do_unexpected_trap(const char *msg, > const struct cpu_user_regs *regs); > +void do_trap_hyp_sync(struct cpu_user_regs *regs); > > /* Functions for pending virtual abort checking window. */ > void abort_guest_exit_start(void);
diff --git a/xen/arch/arm/arm32/traps.c b/xen/arch/arm/arm32/traps.c index a4ce2b92d904..a2fc1c22cbc9 100644 --- a/xen/arch/arm/arm32/traps.c +++ b/xen/arch/arm/arm32/traps.c @@ -81,7 +81,7 @@ void do_trap_data_abort(struct cpu_user_regs *regs) if ( VABORT_GEN_BY_GUEST(regs) ) do_trap_guest_serror(regs); else - do_unexpected_trap("Data Abort", regs); + do_trap_hyp_sync(regs); } void finalize_instr_emulation(const struct instr_details *instr) diff --git a/xen/arch/arm/include/asm/traps.h b/xen/arch/arm/include/asm/traps.h index 08bc0b484c75..883dae368eac 100644 --- a/xen/arch/arm/include/asm/traps.h +++ b/xen/arch/arm/include/asm/traps.h @@ -73,6 +73,7 @@ int do_bug_frame(const struct cpu_user_regs *regs, vaddr_t pc); void noreturn do_unexpected_trap(const char *msg, const struct cpu_user_regs *regs); +void do_trap_hyp_sync(struct cpu_user_regs *regs); /* Functions for pending virtual abort checking window. */ void abort_guest_exit_start(void);