aboutsummaryrefslogtreecommitdiff
path: root/include/exec
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-09-12 19:47:29 -0700
committerRichard Henderson <richard.henderson@linaro.org>2021-10-30 09:52:04 -0700
commit5e38ba7dde963414dddc8a83848701b49d0bcb00 (patch)
tree9b5829b3f986cf2a4a316ab3c3865e0d8efd7123 /include/exec
parentf920ffdd8ed6d0abb34fdf2bbb85926cfb40aef2 (diff)
accel/tcg: Split out handle_sigsegv_accerr_write
This is the major portion of handle_cpu_signal which is specific to tcg, handling the page protections for the translations. Most of the rest will migrate to linux-user/ shortly. Reviewed-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- v2: Pass guest address to handle_sigsegv_accerr_write.
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/exec-all.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index e54f8e5d65..5f94d799aa 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -674,6 +674,18 @@ static inline tb_page_addr_t get_page_addr_code_hostp(CPUArchState *env,
MMUAccessType adjust_signal_pc(uintptr_t *pc, bool is_write);
/**
+ * handle_sigsegv_accerr_write:
+ * @cpu: the cpu context
+ * @old_set: the sigset_t from the signal ucontext_t
+ * @host_pc: the host pc, adjusted for the signal
+ * @host_addr: the host address of the fault
+ *
+ * Return true if the write fault has been handled, and should be re-tried.
+ */
+bool handle_sigsegv_accerr_write(CPUState *cpu, sigset_t *old_set,
+ uintptr_t host_pc, abi_ptr guest_addr);
+
+/**
* cpu_signal_handler
* @signum: host signal number
* @pinfo: host siginfo_t