summaryrefslogtreecommitdiff
path: root/target-mips/kvm_mips.h
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2015-11-17 17:13:54 +0000
committerLeon Alrae <leon.alrae@imgtec.com>2015-11-24 11:01:03 +0000
commit7871abb94c2f4adc39f2487f6edf5e69ba872a65 (patch)
tree2a3b4aca7c76bc0c9e7bcf905bda3b31ce18181d /target-mips/kvm_mips.h
parent5522a841cab5f15ac0f8d207b320c21755a7a1a5 (diff)
downloadqemu-7871abb94c2f4adc39f2487f6edf5e69ba872a65.tar.gz
target-mips: Fix exceptions while UX=0
Commit 01f728857941 ("target-mips: Status.UX/SX/KX enable 32-bit address wrapping") added a new hflag MIPS_HFLAG_AWRAP, which indicates that 64-bit addressing is disallowed in the current mode, so hflag users don't need to worry about the complexities of working that out, for example checking both MIPS_HFLAG_KSU and MIPS_HFLAG_UX. However when exceptions are taken outside of exception level, mips_cpu_do_interrupt() manipulates the env->hflags directly rather than using compute_hflags() to update them, and this code wasn't updated accordingly. As a result, when UX is cleared, MIPS_HFLAG_AWRAP is set, but it doesn't get cleared on entry back into kernel mode due to an exception. Kernel mode then cannot access the 64-bit segments resulting in a nested exception loop. The same applies to errors and debug exceptions. Fix by updating mips_cpu_do_interrupt() to clear the MIPS_HFLAG_WRAP flag when necessary, according to compute_hflags(). Fixes: 01f728857941 ("target-mips: Status.UX/SX/KX enable 32-bit...") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Leon Alrae <leon.alrae@imgtec.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Leon Alrae <leon.alrae@imgtec.com> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Diffstat (limited to 'target-mips/kvm_mips.h')
0 files changed, 0 insertions, 0 deletions