From: Sebastian Macke Date: Tue, 22 Oct 2013 00:12:39 +0000 (+0200) Subject: target-openrisc: Remove executable flag for every page X-Git-Tag: v1.7.0-rc1~14^2~4 X-Git-Url: https://git.proxmox.com/?p=qemu.git;a=commitdiff_plain;h=04359e6bb7f2841031aae645a770583f9c5df3cd target-openrisc: Remove executable flag for every page Pages should be flagged executable only if the tlb executable flag is set or the mmu is off. Signed-off-by: Sebastian Macke Reviewed-by: Jia Liu Signed-off-by: Jia Liu --- diff --git a/target-openrisc/mmu.c b/target-openrisc/mmu.c index 22d7cbec1..dd487bd0d 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) {