From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>, laurent@vivier.eu
Subject: [PATCH v5 01/24] linux-user/alpha: Set TRAP_UNK for bugchk and unknown gentrap
Date: Fri, 7 Jan 2022 13:32:20 -0800 [thread overview]
Message-ID: <20220107213243.212806-2-richard.henderson@linaro.org> (raw)
In-Reply-To: <20220107213243.212806-1-richard.henderson@linaro.org>
These si_codes were changed in 535906c684fca, for linux 4.17.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/syscall_defs.h | 1 +
linux-user/alpha/cpu_loop.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index cca561f622..18bed558fe 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -715,6 +715,7 @@ typedef struct target_siginfo {
#define TARGET_TRAP_TRACE (2) /* process trace trap */
#define TARGET_TRAP_BRANCH (3) /* process taken branch trap */
#define TARGET_TRAP_HWBKPT (4) /* hardware breakpoint/watchpoint */
+#define TARGET_TRAP_UNK (5) /* undiagnosed trap */
struct target_rlimit {
abi_ulong rlim_cur;
diff --git a/linux-user/alpha/cpu_loop.c b/linux-user/alpha/cpu_loop.c
index 37c33f0ccd..96466b23f9 100644
--- a/linux-user/alpha/cpu_loop.c
+++ b/linux-user/alpha/cpu_loop.c
@@ -86,7 +86,7 @@ void cpu_loop(CPUAlphaState *env)
/* BUGCHK */
info.si_signo = TARGET_SIGTRAP;
info.si_errno = 0;
- info.si_code = 0;
+ info.si_code = TARGET_TRAP_UNK;
info._sifields._sigfault._addr = env->pc;
queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info);
break;
@@ -155,7 +155,7 @@ void cpu_loop(CPUAlphaState *env)
break;
default:
info.si_signo = TARGET_SIGTRAP;
- info.si_code = 0;
+ info.si_code = TARGET_TRAP_UNK;
break;
}
info.si_errno = 0;
--
2.25.1
next prev parent reply other threads:[~2022-01-07 21:38 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-07 21:32 [PATCH v5 00/24] linux-user: Clean up siginfo_t handling Richard Henderson
2022-01-07 21:32 ` Richard Henderson [this message]
2022-01-07 21:32 ` [PATCH v5 02/24] linux-user/alpha: Set FPE_FLTUNK for gentrap ROPRAND Richard Henderson
2022-01-07 21:32 ` [PATCH v5 03/24] linux-user/alpha: Use force_sig_fault Richard Henderson
2022-01-07 21:32 ` [PATCH v5 04/24] linux-user/cris: " Richard Henderson
2022-01-07 21:32 ` [PATCH v5 05/24] linux-user/hppa: " Richard Henderson
2022-01-07 21:32 ` [PATCH v5 06/24] linux-user/hppa: Use the proper si_code for PRIV_OPR, PRIV_REG, OVERFLOW Richard Henderson
2022-01-07 21:32 ` [PATCH v5 07/24] linux-user: Remove TARGET_NSIGFPE Richard Henderson
2022-01-07 21:32 ` [PATCH v5 08/24] linux-user/hppa: Set FPE_CONDTRAP for COND Richard Henderson
2022-01-07 21:32 ` [PATCH v5 09/24] linux-user/i386: Split out maybe_handle_vm86_trap Richard Henderson
2022-01-07 21:32 ` [PATCH v5 10/24] linux-user/i386: Use force_sig, force_sig_fault Richard Henderson
2022-01-07 21:32 ` [PATCH v5 11/24] linux-user/m68k: Use force_sig_fault Richard Henderson
2022-01-07 21:32 ` [PATCH v5 12/24] linux-user/microblaze: " Richard Henderson
2022-01-07 21:32 ` [PATCH v5 13/24] linux-user/microblaze: Fix SIGFPE si_codes Richard Henderson
2022-01-07 21:32 ` [PATCH v5 14/24] linux-user/mips: Improve do_break Richard Henderson
2022-01-07 21:32 ` [PATCH v5 15/24] linux-user/mips: Use force_sig_fault Richard Henderson
2022-01-07 21:32 ` [PATCH v5 16/24] target/mips: Extract break code into env->error_code Richard Henderson
2022-01-07 21:32 ` [PATCH v5 17/24] target/mips: Extract trap " Richard Henderson
2022-01-07 21:32 ` [PATCH v5 18/24] linux-user/openrisc: Use force_sig_fault Richard Henderson
2022-01-07 21:32 ` [PATCH v5 19/24] linux-user/ppc: " Richard Henderson
2022-01-07 21:32 ` [PATCH v5 20/24] linux-user/riscv: " Richard Henderson
2022-01-07 21:32 ` [PATCH v5 21/24] linux-user/s390x: " Richard Henderson
2022-01-07 21:32 ` [PATCH v5 22/24] linux-user/sh4: " Richard Henderson
2022-01-07 21:32 ` [PATCH v5 23/24] linux-user/sparc: " Richard Henderson
2022-01-07 21:32 ` [PATCH v5 24/24] linux-user/xtensa: " Richard Henderson
2022-01-08 17:25 ` [PATCH v5 00/24] linux-user: Clean up siginfo_t handling Laurent Vivier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220107213243.212806-2-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=laurent@vivier.eu \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).