We currently ignore PROT_EXEC on the initial lookup, and defer raising the exception until cpu_ld*_code(). It makes more sense to raise the exception early.
Signed-off-by: Richard Henderson <richard.hender...@linaro.org> --- accel/tcg/cpu-exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 5278d1837b..6a3ca8224f 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -376,7 +376,7 @@ const void *HELPER(lookup_tb_ptr)(CPUArchState *env) cpu_loop_exit(cpu); } - phys_pc = get_page_addr_code(env, pc); + phys_pc = get_page_addr_code_hostp(env, pc, false, NULL); if (phys_pc == -1) { return tcg_code_gen_epilogue; } @@ -509,7 +509,7 @@ void cpu_exec_step_atomic(CPUState *cpu) */ mmap_lock(); - phys_pc = get_page_addr_code_hostp(env, pc, true, &host_pc); + phys_pc = get_page_addr_code_hostp(env, pc, false, &host_pc); if (phys_pc == -1) { tb = NULL; } else { @@ -983,7 +983,7 @@ int cpu_exec(CPUState *cpu) mmap_lock(); phys_pc = get_page_addr_code_hostp(cpu->env_ptr, pc, - true, &host_pc); + false, &host_pc); if (phys_pc == -1) { tb = NULL; } else { -- 2.34.1