mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-02 15:02:02 -06:00
accel/hax: Introduce CONFIG_HAX_IS_POSSIBLE
Mirror "sysemu/kvm.h" #ifdef'ry to define CONFIG_HAX_IS_POSSIBLE, expose hax_allowed to hax_enabled() macro. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220207075426.81934-9-f4bug@amsat.org>
This commit is contained in:
parent
f94bee49d2
commit
b04363c240
3 changed files with 15 additions and 12 deletions
|
@ -25,17 +25,23 @@
|
|||
int hax_sync_vcpus(void);
|
||||
|
||||
#ifdef NEED_CPU_H
|
||||
# ifdef CONFIG_HAX
|
||||
# define CONFIG_HAX_IS_POSSIBLE
|
||||
# endif
|
||||
#else /* !NEED_CPU_H */
|
||||
# define CONFIG_HAX_IS_POSSIBLE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HAX
|
||||
#ifdef CONFIG_HAX_IS_POSSIBLE
|
||||
|
||||
int hax_enabled(void);
|
||||
extern bool hax_allowed;
|
||||
|
||||
#else /* CONFIG_HAX */
|
||||
#define hax_enabled() (hax_allowed)
|
||||
|
||||
#define hax_enabled() (0)
|
||||
#else /* !CONFIG_HAX_IS_POSSIBLE */
|
||||
|
||||
#endif /* CONFIG_HAX */
|
||||
#define hax_enabled() (0)
|
||||
|
||||
#endif /* NEED_CPU_H */
|
||||
#endif /* CONFIG_HAX_IS_POSSIBLE */
|
||||
|
||||
#endif /* QEMU_HAX_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue