target/mips: Pass a valid error to raise_mmu_exception for user-only

At present we give ret = 0, or TLBRET_MATCH.  This gets matched
by the default case, which falls through to TLBRET_BADADDR.
However, it makes more sense to use a proper value.  All of the
tlb-related exceptions are handled identically in cpu_loop.c,
so TLBRET_BADADDR is as good as any other.  Retain it.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2019-05-01 22:32:31 -07:00
parent f429d607c7
commit 995ffde962

View File

@ -884,7 +884,7 @@ int mips_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int size, int rw,
int prot; int prot;
int access_type; int access_type;
#endif #endif
int ret = 0; int ret = TLBRET_BADADDR;
#if 0 #if 0
log_cpu_state(cs, 0); log_cpu_state(cs, 0);