]> git.proxmox.com Git - qemu.git/commitdiff
cris: Fix TLB exec bit protection
authorEdgar E. Iglesias <edgar.iglesias@gmail.com>
Sat, 18 Sep 2010 10:34:59 +0000 (12:34 +0200)
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>
Sat, 18 Sep 2010 10:34:59 +0000 (12:34 +0200)
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
target-cris/helper.c
target-cris/mmu.c

index 83b25c14da9ef10c03d11b7f39bc47e2a71e82ae..2a4403b847f0e7f5b4bb255059ac64a222c5e86d 100644 (file)
@@ -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)
index 3f290ba9e0c1df17a71686a6930f6d2efe15ae03..1243745598e6f6914529ae0af07a42b9d4ae0457 100644 (file)
@@ -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