target/s390x: Implement s390_cpu_record_sigsegv
authorRichard Henderson <richard.henderson@linaro.org>
Sat, 18 Sep 2021 17:34:30 +0000 (10:34 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 2 Nov 2021 11:00:52 +0000 (07:00 -0400)
commitc8e7fef102058c3554b26a381e0a89ae05b9677b
tree90700dadf3af24dab8d0083aa64200aad5ace4e1
parentdb9aab5783a2fb62250e12f0c4cfed5e1778c189
target/s390x: Implement s390_cpu_record_sigsegv

Move the masking of the address from cpu_loop into
s390_cpu_record_sigsegv -- this is governed by hw, not linux.
This does mean we have to raise our own exception, rather
than return to the fallback.

Use maperr to choose between PGM_PROTECTION and PGM_ADDRESSING.
Use the appropriate si_code for each in cpu_loop.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
linux-user/s390x/cpu_loop.c
target/s390x/cpu.c
target/s390x/s390x-internal.h
target/s390x/tcg/excp_helper.c