summaryrefslogtreecommitdiffstats
path: root/target-cris
authorEdgar E. Iglesias <[email protected]>2010-09-18 10:34:59 (GMT)
committer Edgar E. Iglesias <[email protected]>2010-09-18 10:34:59 (GMT)
commit58aebb946acff82c62383f350cab593e55cc13dc (patch) (side-by-side diff)
tree6634ff780f7fa279c996e55f8e274f8a5d34374c /target-cris
parent0b65b9e105ce5bc29d9412e0df476fd0cef3b8e2 (diff)
downloadqemu-kvm-58aebb946acff82c62383f350cab593e55cc13dc.zip
qemu-kvm-58aebb946acff82c62383f350cab593e55cc13dc.tar.gz
qemu-kvm-58aebb946acff82c62383f350cab593e55cc13dc.tar.bz2
cris: Fix TLB exec bit protection
Signed-off-by: Edgar E. Iglesias <[email protected]>
Diffstat (limited to 'target-cris') (more/less context) (ignore whitespace changes)
-rw-r--r--target-cris/helper.c2
-rw-r--r--target-cris/mmu.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/target-cris/helper.c b/target-cris/helper.c
index 83b25c1..2a4403b 100644
--- a/target-cris/helper.c
+++ b/target-cris/helper.c
@@ -101,7 +101,7 @@ int cpu_cris_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
phy = res.phy & ~0x80000000;
prot = res.prot;
tlb_set_page(env, address & TARGET_PAGE_MASK, phy,
- prot | PAGE_EXEC, mmu_idx, TARGET_PAGE_SIZE);
+ prot, mmu_idx, TARGET_PAGE_SIZE);
r = 0;
}
if (r > 0)
diff --git a/target-cris/mmu.c b/target-cris/mmu.c
index 3f290ba..1243745 100644
--- a/target-cris/mmu.c
+++ b/target-cris/mmu.c
@@ -251,7 +251,7 @@ static int cris_mmu_translate_page(struct cris_mmu_result *res,
res->prot |= PAGE_READ;
if (tlb_w)
res->prot |= PAGE_WRITE;
- if (tlb_x)
+ if (mmu == 0 && (cfg_x || tlb_x))
res->prot |= PAGE_EXEC;
}
else