[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 14/21] accel/tcg: Raise PROT_EXEC exception early
From: |
Richard Henderson |
Subject: |
[PATCH v6 14/21] accel/tcg: Raise PROT_EXEC exception early |
Date: |
Thu, 18 Aug 2022 20:26:08 -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 | 2 +-
accel/tcg/translate-all.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 7887af6f45..7b8977a0a4 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -222,7 +222,7 @@ static TranslationBlock *tb_htable_lookup(CPUState *cpu,
target_ulong pc,
desc.cflags = cflags;
desc.trace_vcpu_dstate = *cpu->trace_dstate;
desc.pc = pc;
- phys_pc = get_page_addr_code(desc.env, pc);
+ phys_pc = get_page_addr_code_hostp(desc.env, pc, false, NULL);
if (phys_pc == -1) {
return NULL;
}
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index b83161a081..069ed67bac 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -1396,7 +1396,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
assert_memory_lock();
qemu_thread_jit_write();
- phys_pc = get_page_addr_code(env, pc);
+ phys_pc = get_page_addr_code_hostp(env, pc, false, NULL);
if (phys_pc == -1) {
/* Generate a one-shot TB with 1 insn in it */
--
2.34.1
- Re: [PATCH v6 09/21] accel/tcg: Unlock mmap_lock after longjmp, (continued)
- [PATCH v6 11/21] accel/tcg: Move qemu_ram_addr_from_host_nofail to physmem.c, Richard Henderson, 2022/08/18
- [PATCH v6 13/21] accel/tcg: Add nofault parameter to get_page_addr_code_hostp, Richard Henderson, 2022/08/18
- [PATCH v6 15/21] accel/tcg: Remove translator_ldsw, Richard Henderson, 2022/08/18
- [PATCH v6 12/21] accel/tcg: Use probe_access_internal for softmmu get_page_addr_code_hostp, Richard Henderson, 2022/08/18
- [PATCH v6 10/21] accel/tcg: Make tb_htable_lookup static, Richard Henderson, 2022/08/18
- [PATCH v6 14/21] accel/tcg: Raise PROT_EXEC exception early,
Richard Henderson <=
- [PATCH v6 18/21] target/s390x: Make translator stop before the end of a page, Richard Henderson, 2022/08/18
- [PATCH v6 16/21] accel/tcg: Add pc and host_pc params to gen_intermediate_code, Richard Henderson, 2022/08/18
- [PATCH v6 19/21] target/i386: Make translator stop before the end of a page, Richard Henderson, 2022/08/18
- [PATCH v6 17/21] accel/tcg: Add fast path for translator_ld*, Richard Henderson, 2022/08/18
- [PATCH v6 08/21] accel/tcg: Properly implement get_page_addr_code for user-only, Richard Henderson, 2022/08/18
- [PATCH v6 21/21] target/riscv: Make translator stop before the end of a page, Richard Henderson, 2022/08/18