mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
accel/tcg: Move {set,clear}_helper_retaddr to cpu_ldst.h
Use of these in helpers goes hand-in-hand with tlb_vaddr_to_host and other probing functions. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
a7ddb48bd1
commit
3d75856d1a
4 changed files with 34 additions and 32 deletions
|
@ -41,9 +41,6 @@
|
|||
#include "tb-context.h"
|
||||
#include "internal-common.h"
|
||||
#include "internal-target.h"
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
#include "user-retaddr.h"
|
||||
#endif
|
||||
|
||||
/* -icount align implementation. */
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include "tcg/tcg-ldst.h"
|
||||
#include "internal-common.h"
|
||||
#include "internal-target.h"
|
||||
#include "user-retaddr.h"
|
||||
|
||||
__thread uintptr_t helper_retaddr;
|
||||
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
#ifndef ACCEL_TCG_USER_RETADDR_H
|
||||
#define ACCEL_TCG_USER_RETADDR_H
|
||||
|
||||
#include "qemu/atomic.h"
|
||||
|
||||
extern __thread uintptr_t helper_retaddr;
|
||||
|
||||
static inline void set_helper_retaddr(uintptr_t ra)
|
||||
{
|
||||
helper_retaddr = ra;
|
||||
/*
|
||||
* Ensure that this write is visible to the SIGSEGV handler that
|
||||
* may be invoked due to a subsequent invalid memory operation.
|
||||
*/
|
||||
signal_barrier();
|
||||
}
|
||||
|
||||
static inline void clear_helper_retaddr(void)
|
||||
{
|
||||
/*
|
||||
* Ensure that previous memory operations have succeeded before
|
||||
* removing the data visible to the signal handler.
|
||||
*/
|
||||
signal_barrier();
|
||||
helper_retaddr = 0;
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue