[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 18/41] linux-user/signal: Drop HOST_SIGNAL_PLACEHOLDER
From: |
Richard Henderson |
Subject: |
[PATCH v3 18/41] linux-user/signal: Drop HOST_SIGNAL_PLACEHOLDER |
Date: |
Fri, 1 Oct 2021 13:11:28 -0400 |
Now that all of the linux-user hosts have been converted
to host-signal.h, drop the compatibility code.
Reviewed by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/exec/exec-all.h | 12 ------------
linux-user/signal.c | 14 --------------
2 files changed, 26 deletions(-)
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 5f94d799aa..5dd663c153 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -685,18 +685,6 @@ MMUAccessType adjust_signal_pc(uintptr_t *pc, bool
is_write);
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
- * @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) {}
diff --git a/linux-user/signal.c b/linux-user/signal.c
index bab47a6962..537c6c41c0 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -777,17 +777,6 @@ static void host_signal_handler(int host_sig, siginfo_t
*info, void *puc)
ucontext_t *uc = puc;
struct emulated_sigtable *k;
int guest_sig;
-
-#ifdef HOST_SIGNAL_PLACEHOLDER
- /* the CPU emulator uses some host signals to detect exceptions,
- we forward to it some signals */
- if ((host_sig == SIGSEGV || host_sig == SIGBUS)
- && info->si_code > 0) {
- if (cpu_signal_handler(host_sig, info, puc)) {
- return;
- }
- }
-#else
uintptr_t pc = 0;
bool sync_sig = false;
@@ -847,7 +836,6 @@ static void host_signal_handler(int host_sig, siginfo_t
*info, void *puc)
sync_sig = true;
}
-#endif
/* get target signal number */
guest_sig = host_to_target_signal(host_sig);
@@ -862,7 +850,6 @@ static void host_signal_handler(int host_sig, siginfo_t
*info, void *puc)
k->pending = guest_sig;
ts->signal_pending = 1;
-#ifndef HOST_SIGNAL_PLACEHOLDER
/*
* For synchronous signals, unwind the cpu state to the faulting
* insn and then exit back to the main loop so that the signal
@@ -872,7 +859,6 @@ static void host_signal_handler(int host_sig, siginfo_t
*info, void *puc)
cpu->exception_index = EXCP_INTERRUPT;
cpu_loop_exit_restore(cpu, pc);
}
-#endif
rewind_if_in_safe_syscall(puc);
--
2.25.1
- [PATCH v3 15/41] linux-user/host/riscv: Populate host_signal.h, (continued)
- [PATCH v3 15/41] linux-user/host/riscv: Populate host_signal.h, Richard Henderson, 2021/10/01
- [PATCH v3 05/41] configure: Merge riscv32 and riscv64 host architectures, Richard Henderson, 2021/10/01
- [PATCH v3 10/41] linux-user/host/sparc: Populate host_signal.h, Richard Henderson, 2021/10/01
- [PATCH v3 06/41] linux-user: Reorg handling for SIGSEGV, Richard Henderson, 2021/10/01
- [PATCH v3 08/41] linux-user/host/ppc: Populate host_signal.h, Richard Henderson, 2021/10/01
- [PATCH v3 14/41] linux-user/host/mips: Populate host_signal.h, Richard Henderson, 2021/10/01
- [PATCH v3 13/41] linux-user/host/s390: Populate host_signal.h, Richard Henderson, 2021/10/01
- [PATCH v3 12/41] linux-user/host/aarch64: Populate host_signal.h, Richard Henderson, 2021/10/01
- [PATCH v3 16/41] target/arm: Fixup comment re handle_cpu_signal, Richard Henderson, 2021/10/01
- [PATCH v3 18/41] linux-user/signal: Drop HOST_SIGNAL_PLACEHOLDER,
Richard Henderson <=
- [PATCH v3 09/41] linux-user/host/alpha: Populate host_signal.h, Richard Henderson, 2021/10/01
- [PATCH v3 20/41] linux-user: Add cpu_loop_exit_segv, Richard Henderson, 2021/10/01
- [PATCH v3 24/41] target/cris: Make cris_cpu_tlb_fill sysemu only, Richard Henderson, 2021/10/01
- [PATCH v3 25/41] target/hexagon: Remove hexagon_cpu_tlb_fill, Richard Henderson, 2021/10/01
- [PATCH v3 27/41] target/i386: Implement x86_cpu_record_sigsegv, Richard Henderson, 2021/10/01
- [PATCH v3 28/41] target/m68k: Make m68k_cpu_tlb_fill sysemu only, Richard Henderson, 2021/10/01
- [PATCH v3 17/41] linux-user/host/riscv: Improve host_signal_write, Richard Henderson, 2021/10/01
- [PATCH v3 19/41] hw/core: Add TCGCPUOps.record_sigsegv, Richard Henderson, 2021/10/01