tcg: Record code_gen_buffer address for user-only memory helpers
commitec603b5584fa71213ef8f324fe89e4b27cc9d2bc
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 14 Nov 2017 09:34:20 +0000 (14 10:34 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 15 Nov 2017 09:33:27 +0000 (15 10:33 +0100)
treec7f47f8089dfc90c0920a3aa42bd6af9cc972bf2
parent1fa0f627d03cd0d0755924247cafeb42969016bf
tcg: Record code_gen_buffer address for user-only memory helpers

When we handle a signal from a fault within a user-only memory helper,
we cannot cpu_restore_state with the PC found within the signal frame.
Use a TLS variable, helper_retaddr, to record the unwind start point
to find the faulting guest insn.

Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/atomic_template.h
accel/tcg/cputlb.c
accel/tcg/user-exec.c
include/exec/cpu_ldst.h
include/exec/cpu_ldst_useronly_template.h