Received: from eggs.gnu.org ([2001:4830:134:3::10]:51115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYPbH-000175-GM for qemu-devel@nongnu.org; Mon, 21 Oct 2013 20:13:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VYPb7-0002h5-7e for qemu-devel@nongnu.org; Mon, 21 Oct 2013 20:13:31 -0400 Received: from www11.your-server.de ([213.133.104.11]:55675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYPb7-0002h0-1l for qemu-devel@nongnu.org; Mon, 21 Oct 2013 20:13:21 -0400 From: Sebastian Macke Date: Tue, 22 Oct 2013 02:12:39 +0200 Message-Id: <1382400765-26377-4-git-send-email-sebastian@macke.de> In-Reply-To: <1382400765-26377-1-git-send-email-sebastian@macke.de> References: <1382400765-26377-1-git-send-email-sebastian@macke.de> Subject: [Qemu-devel] [PATCH_v2 3/9] 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, proljc@gmail.com Cc: sebastian@macke.de, openrisc@lists.openrisc.net, 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.8.4.1