aboutsummaryrefslogtreecommitdiff
path: root/linux-user/s390x
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-04-28 12:34:03 -0700
committerLaurent Vivier <laurent@vivier.eu>2021-05-15 21:44:38 +0200
commit7e5355578eef26ece8a783f336b2c06a1f5a083a (patch)
tree38ec106a8f584f13e4dd0cad27c4542c176fc844 /linux-user/s390x
parent20807348806e12141347d87badd34e358971e7d5 (diff)
linux-user/s390x: Set psw.mask properly for the signal handler
Note that PSW_ADDR_{64,32} are called PSW_MASK_{EA,BA} in the kernel source. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Message-Id: <20210428193408.233706-11-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/s390x')
-rw-r--r--linux-user/s390x/signal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/linux-user/s390x/signal.c b/linux-user/s390x/signal.c
index 64a9eab097..17f617c655 100644
--- a/linux-user/s390x/signal.c
+++ b/linux-user/s390x/signal.c
@@ -162,6 +162,9 @@ void setup_frame(int sig, struct target_sigaction *ka,
/* Set up registers for signal handler */
env->regs[15] = frame_addr;
+ /* Force default amode and default user address space control. */
+ env->psw.mask = PSW_MASK_64 | PSW_MASK_32 | PSW_ASC_PRIMARY
+ | (env->psw.mask & ~PSW_MASK_ASC);
env->psw.addr = ka->_sa_handler;
env->regs[2] = sig; //map_signal(sig);
@@ -215,6 +218,9 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
/* Set up registers for signal handler */
env->regs[15] = frame_addr;
+ /* Force default amode and default user address space control. */
+ env->psw.mask = PSW_MASK_64 | PSW_MASK_32 | PSW_ASC_PRIMARY
+ | (env->psw.mask & ~PSW_MASK_ASC);
env->psw.addr = ka->_sa_handler;
env->regs[2] = sig; //map_signal(sig);