From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXLjP-0008Jw-Lh for qemu-devel@nongnu.org; Fri, 18 Oct 2013 21:53:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXLjJ-00088L-GN for qemu-devel@nongnu.org; Fri, 18 Oct 2013 21:53:31 -0400 Received: from www11.your-server.de ([213.133.104.11]:55989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXLjJ-00088H-AE for qemu-devel@nongnu.org; Fri, 18 Oct 2013 21:53:25 -0400 Message-ID: <5261E613.2020900@macke.de> Date: Fri, 18 Oct 2013 18:53:23 -0700 From: Sebastian Macke MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 1/2] target-openrisc: Remove executable flag for every page List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, 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 --- 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