summaryrefslogtreecommitdiffstats
path: root/include/exec
diff options
context:
space:
mode:
authorRichard Henderson2021-08-03 17:31:43 +0200
committerRichard Henderson2021-09-22 04:36:44 +0200
commit8b1d5b3c3507d062d7611a64a81989e8903605ed (patch)
tree4ebf8344b80f05d03d6229a8381c1d837cc63680 /include/exec
parentMerge remote-tracking branch 'remotes/alistair23/tags/pull-riscv-to-apply-202... (diff)
downloadqemu-8b1d5b3c3507d062d7611a64a81989e8903605ed.tar.gz
qemu-8b1d5b3c3507d062d7611a64a81989e8903605ed.tar.xz
qemu-8b1d5b3c3507d062d7611a64a81989e8903605ed.zip
include/exec: Move cpu_signal_handler declaration
There is nothing target specific about this. The implementation is host specific, but the declaration is 100% common. Reviewed-By: Warner Losh <imp@bsdimp.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/exec-all.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 5d1b6d80fb..9d5987ba04 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -662,6 +662,19 @@ static inline tb_page_addr_t get_page_addr_code_hostp(CPUArchState *env,
}
return addr;
}
+
+/**
+ * cpu_signal_handler
+ * @signum: host signal number
+ * @pinfo: host siginfo_t
+ * @puc: host ucontext_t
+ *
+ * To be called from the SIGBUS and SIGSEGV signal handler to inform the
+ * virtual cpu of exceptions. Returns true if the signal was handled by
+ * the virtual CPU.
+ */
+int cpu_signal_handler(int signum, void *pinfo, void *puc);
+
#else
static inline void mmap_lock(void) {}
static inline void mmap_unlock(void) {}