qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] target-openrisc: Remove executable flag for every page
@ 2013-10-19  1:53 Sebastian Macke
  0 siblings, 0 replies; only message in thread
From: Sebastian Macke @ 2013-10-19  1:53 UTC (permalink / raw)
  To: qemu-devel, Jia Liu; +Cc: openrisc, openrisc@lists.opencores.org

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>
---
  target-openrisc/mmu.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target-openrisc/mmu.c b/target-openrisc/mmu.c
index 22d7cbe..dd487bd 100644
--- a/target-openrisc/mmu.c
+++ b/target-openrisc/mmu.c
@@ -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) {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-10-19  1:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-19  1:53 [Qemu-devel] [PATCH 1/2] target-openrisc: Remove executable flag for every page Sebastian Macke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).