提交 082a9fc2 编写于 作者: A Aurelien Jarno

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: NAurelien Jarno <aurelien@aurel32.net>
(cherry picked from commit bc13ad29e6b7484ccd5e7ee0f5d0f966585eb4c9)
上级 36a013c9
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册