mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-06 22:47:41 -07:00
include/exec: Protect icount_enabled from poisoned symbols
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
161f5bc8e9
commit
1751889b5a
1 changed files with 9 additions and 1 deletions
|
|
@ -22,13 +22,21 @@ typedef enum {
|
|||
ICOUNT_ADAPTATIVE,
|
||||
} ICountMode;
|
||||
|
||||
#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
|
||||
#ifdef CONFIG_TCG
|
||||
extern ICountMode use_icount;
|
||||
#define icount_enabled() (use_icount)
|
||||
#else
|
||||
#define icount_enabled() ICOUNT_DISABLED
|
||||
#endif
|
||||
|
||||
/* Protect the CONFIG_USER_ONLY test vs poisoning. */
|
||||
#if defined(COMPILING_PER_TARGET) || defined(COMPILING_SYSTEM_VS_USER)
|
||||
# ifdef CONFIG_USER_ONLY
|
||||
# undef icount_enabled
|
||||
# define icount_enabled() ICOUNT_DISABLED
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Update the icount with the executed instructions. Called by
|
||||
* cpus-tcg vCPU thread so the main-loop can see time has moved forward.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue