mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-30 22:03:54 -06:00
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>
This commit is contained in:
parent
1fa0f627d0
commit
ec603b5584
5 changed files with 87 additions and 20 deletions
|
@ -76,6 +76,8 @@
|
|||
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
|
||||
extern __thread uintptr_t helper_retaddr;
|
||||
|
||||
/* In user-only mode we provide only the _code and _data accessors. */
|
||||
|
||||
#define MEMSUFFIX _data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue