]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/mips: Pass a valid error to raise_mmu_exception for user-only
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 2 May 2019 05:32:31 +0000 (22:32 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Fri, 10 May 2019 18:12:50 +0000 (11:12 -0700)
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>
target/mips/helper.c

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