[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-7.2 16/21] accel/tcg: Raise PROT_EXEC exception early
From: |
Richard Henderson |
Subject: |
[PATCH for-7.2 16/21] accel/tcg: Raise PROT_EXEC exception early |
Date: |
Fri, 12 Aug 2022 11:08:01 -0700 |
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.henderson@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
- Re: [PATCH for-7.2 14/21] accel/tcg: Hoist get_page_addr_code out of tb_lookup, (continued)
- Re: [PATCH for-7.2 14/21] accel/tcg: Hoist get_page_addr_code out of tb_lookup, Ilya Leoshkevich, 2022/08/16
- Re: [PATCH for-7.2 14/21] accel/tcg: Hoist get_page_addr_code out of tb_lookup, Richard Henderson, 2022/08/16
- Re: [PATCH for-7.2 14/21] accel/tcg: Hoist get_page_addr_code out of tb_lookup, Ilya Leoshkevich, 2022/08/17
- Re: [PATCH for-7.2 14/21] accel/tcg: Hoist get_page_addr_code out of tb_lookup, Richard Henderson, 2022/08/17
- Re: [PATCH for-7.2 14/21] accel/tcg: Hoist get_page_addr_code out of tb_lookup, Ilya Leoshkevich, 2022/08/17
- Re: [PATCH for-7.2 14/21] accel/tcg: Hoist get_page_addr_code out of tb_lookup, Richard Henderson, 2022/08/17
- Re: [PATCH for-7.2 14/21] accel/tcg: Hoist get_page_addr_code out of tb_lookup, Ilya Leoshkevich, 2022/08/17
- Re: [PATCH for-7.2 14/21] accel/tcg: Hoist get_page_addr_code out of tb_lookup, Richard Henderson, 2022/08/17
- Re: [PATCH for-7.2 14/21] accel/tcg: Hoist get_page_addr_code out of tb_lookup, Richard Henderson, 2022/08/17
[PATCH for-7.2 12/21] accel/tcg: Add nofault parameter to get_page_addr_code_hostp, Richard Henderson, 2022/08/12
[PATCH for-7.2 16/21] accel/tcg: Raise PROT_EXEC exception early,
Richard Henderson <=
[PATCH for-7.2 15/21] accel/tcg: Hoist get_page_addr_code out of tb_gen_code, Richard Henderson, 2022/08/12
[PATCH for-7.2 17/21] accel/tcg: Introduce is_same_page(), Richard Henderson, 2022/08/12
[PATCH for-7.2 18/21] accel/tcg: Remove translator_ldsw, Richard Henderson, 2022/08/12
[PATCH for-7.2 20/21] accel/tcg: Add fast path for translator_ld*, Richard Henderson, 2022/08/12
[PATCH for-7.2 19/21] accel/tcg: Add pc and host_pc params to gen_intermediate_code, Richard Henderson, 2022/08/12
[PATCH for-7.2 21/21] accel/tcg: Use DisasContextBase in plugin_gen_tb_start, Richard Henderson, 2022/08/12
Re: [PATCH for-7.2 00/21] accel/tcg: minimize tlb lookups during translate + user-only PROT_EXEC fixes, Ilya Leoshkevich, 2022/08/16