diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2010-02-01 20:07:06 +0100 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2010-02-09 21:08:05 +0100 |
commit | 4d1e4ff63ce7c23256b24c3f1722d1abccb26451 (patch) | |
tree | fe30b0a736e6ea994ae0a83c67b662e70cce8e11 | |
parent | target-sh4: MMU: simplify call to tlb_set_page() (diff) | |
download | qemu-kvm-4d1e4ff63ce7c23256b24c3f1722d1abccb26451.tar.gz qemu-kvm-4d1e4ff63ce7c23256b24c3f1722d1abccb26451.tar.bz2 qemu-kvm-4d1e4ff63ce7c23256b24c3f1722d1abccb26451.zip |
target-sh4: MMU: fix ITLB priviledge check
There is an ITLB access violation if SR_MD=0 (user mode) while
the high bit of the protection key is 0 (priviledge mode).
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
-rw-r--r-- | target-sh4/helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target-sh4/helper.c b/target-sh4/helper.c index f9bf5e208..589efe40a 100644 --- a/target-sh4/helper.c +++ b/target-sh4/helper.c @@ -377,7 +377,7 @@ static int get_mmu_address(CPUState * env, target_ulong * physical, n = find_itlb_entry(env, address, use_asid, 1); if (n >= 0) { matching = &env->itlb[n]; - if ((env->sr & SR_MD) & !(matching->pr & 2)) + if (!(env->sr & SR_MD) && !(matching->pr & 2)) n = MMU_ITLB_VIOLATION; else *prot = PAGE_READ; |