qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 4/8] target-sh4: MMU: fix ITLB priviledge check


From: Aurelien Jarno
Subject: [Qemu-devel] [PATCH 4/8] target-sh4: MMU: fix ITLB priviledge check
Date: Sat, 6 Feb 2010 17:43:39 +0100

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 <address@hidden>
---
 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 f9bf5e2..589efe4 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;
-- 
1.6.6.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]