[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/28] linux-user/sparc: Handle priviledged opcode trap
From: |
Laurent Vivier |
Subject: |
[PULL 22/28] linux-user/sparc: Handle priviledged opcode trap |
Date: |
Fri, 10 Mar 2023 23:09:21 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
For the most part priviledged opcodes are ifdefed out of the
user-only sparc translator, which will then incorrectly produce
illegal opcode traps. But there are some code paths that
properly raise TT_PRIV_INSN, so we must handle it.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230216054516.1267305-11-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/sparc/cpu_loop.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c
index a3edb353f6fd..61b6e81459be 100644
--- a/linux-user/sparc/cpu_loop.c
+++ b/linux-user/sparc/cpu_loop.c
@@ -303,6 +303,9 @@ void cpu_loop (CPUSPARCState *env)
case TT_ILL_INSN:
force_sig_fault(TARGET_SIGILL, TARGET_ILL_ILLOPC, env->pc);
break;
+ case TT_PRIV_INSN:
+ force_sig_fault(TARGET_SIGILL, TARGET_ILL_PRVOPC, env->pc);
+ break;
case EXCP_ATOMIC:
cpu_exec_step_atomic(cs);
break;
--
2.39.2
- [PULL 03/28] linux-user: add target to host netlink conversions, (continued)
- [PULL 03/28] linux-user: add target to host netlink conversions, Laurent Vivier, 2023/03/10
- [PULL 04/28] linux-user: Fix unaligned memory access in prlimit64 syscall, Laurent Vivier, 2023/03/10
- [PULL 14/28] linux-user/sparc: Tidy syscall trap, Laurent Vivier, 2023/03/10
- [PULL 13/28] linux-user: Emulate CLONE_PIDFD flag in clone(), Laurent Vivier, 2023/03/10
- [PULL 20/28] linux-user/sparc: Handle division by zero traps, Laurent Vivier, 2023/03/10
- [PULL 06/28] linux-user: fill out task state in /proc/self/stat, Laurent Vivier, 2023/03/10
- [PULL 02/28] linux-user: fix timerfd read endianness conversion, Laurent Vivier, 2023/03/10
- [PULL 15/28] linux-user/sparc: Tidy syscall error return, Laurent Vivier, 2023/03/10
- [PULL 17/28] linux-user/sparc: Tidy window spill/fill traps, Laurent Vivier, 2023/03/10
- [PULL 18/28] linux-user/sparc: Fix sparc64_{get, set}_context traps, Laurent Vivier, 2023/03/10
- [PULL 22/28] linux-user/sparc: Handle priviledged opcode trap,
Laurent Vivier <=
- [PULL 11/28] linux-user: handle netlink flag NLA_F_NESTED, Laurent Vivier, 2023/03/10
- [PULL 23/28] linux-user/sparc: Handle privilidged action trap, Laurent Vivier, 2023/03/10
- [PULL 24/28] linux-user/sparc: Handle coprocessor disabled trap, Laurent Vivier, 2023/03/10
- [PULL 19/28] linux-user/sparc: Handle software breakpoint trap, Laurent Vivier, 2023/03/10
- [PULL 09/28] linux-user: Add strace for prlimit64() syscall, Laurent Vivier, 2023/03/10
- [PULL 16/28] linux-user/sparc: Use TT_TRAP for flush windows, Laurent Vivier, 2023/03/10
- [PULL 21/28] linux-user/sparc: Handle getcc, setcc, getpsr traps, Laurent Vivier, 2023/03/10
- [PULL 10/28] linux-user: fix sockaddr_in6 endianness, Laurent Vivier, 2023/03/10
- [PULL 26/28] linux-user/sparc: Handle floating-point exceptions, Laurent Vivier, 2023/03/10
- [PULL 25/28] linux-user/sparc: Handle unimplemented flush trap, Laurent Vivier, 2023/03/10