]> git.proxmox.com Git - qemu.git/commitdiff
target-openrisc: Remove executable flag for every page
authorSebastian Macke <sebastian@macke.de>
Tue, 22 Oct 2013 00:12:39 +0000 (02:12 +0200)
committerJia Liu <proljc@gmail.com>
Wed, 20 Nov 2013 13:44:43 +0000 (21:44 +0800)
Pages should be flagged executable only if the tlb executable flag is
set or the mmu is off.

Signed-off-by: Sebastian Macke <sebastian@macke.de>
Reviewed-by: Jia Liu <proljc@gmail.com>
Signed-off-by: Jia Liu <proljc@gmail.com>
target-openrisc/mmu.c

index 22d7cbec1881356b29abc94dc435e227eecc4fdd..dd487bd0d10be737c25573e4ff1a21e53fd0e5ea 100644 (file)
@@ -32,7 +32,7 @@ int cpu_openrisc_get_phys_nommu(OpenRISCCPU *cpu,
                                 int *prot, target_ulong address, int rw)
 {
     *physical = address;
-    *prot = PAGE_READ | PAGE_WRITE;
+    *prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
     return TLBRET_MATCH;
 }
 
@@ -187,7 +187,7 @@ int cpu_openrisc_handle_mmu_fault(CPUOpenRISCState *env,
 
     if (ret == TLBRET_MATCH) {
         tlb_set_page(env, address & TARGET_PAGE_MASK,
-                     physical & TARGET_PAGE_MASK, prot | PAGE_EXEC,
+                     physical & TARGET_PAGE_MASK, prot,
                      mmu_idx, TARGET_PAGE_SIZE);
         ret = 0;
     } else if (ret < 0) {