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>
This commit is contained in:
parent
0f3f1ec787
commit
4d1e4ff63c
@ -377,7 +377,7 @@ static int get_mmu_address(CPUState * env, target_ulong * physical,
|
|||||||
n = find_itlb_entry(env, address, use_asid, 1);
|
n = find_itlb_entry(env, address, use_asid, 1);
|
||||||
if (n >= 0) {
|
if (n >= 0) {
|
||||||
matching = &env->itlb[n];
|
matching = &env->itlb[n];
|
||||||
if ((env->sr & SR_MD) & !(matching->pr & 2))
|
if (!(env->sr & SR_MD) && !(matching->pr & 2))
|
||||||
n = MMU_ITLB_VIOLATION;
|
n = MMU_ITLB_VIOLATION;
|
||||||
else
|
else
|
||||||
*prot = PAGE_READ;
|
*prot = PAGE_READ;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user