mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
system/hvf: Expose hvf_enabled() to common code
Currently hvf_enabled() is restricted to target-specific code. By defining CONFIG_HVF_IS_POSSIBLE we allow its use anywhere. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20250403235821.9909-28-philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
0af34b1dac
commit
962f9f18d2
4 changed files with 23 additions and 5 deletions
|
@ -19,15 +19,19 @@
|
|||
#include "qom/object.h"
|
||||
|
||||
#ifdef COMPILING_PER_TARGET
|
||||
# ifdef CONFIG_HVF
|
||||
# define CONFIG_HVF_IS_POSSIBLE
|
||||
# endif /* !CONFIG_HVF */
|
||||
#else
|
||||
# define CONFIG_HVF_IS_POSSIBLE
|
||||
#endif /* COMPILING_PER_TARGET */
|
||||
|
||||
#ifdef CONFIG_HVF
|
||||
#ifdef CONFIG_HVF_IS_POSSIBLE
|
||||
extern bool hvf_allowed;
|
||||
#define hvf_enabled() (hvf_allowed)
|
||||
#else /* !CONFIG_HVF */
|
||||
#else /* !CONFIG_HVF_IS_POSSIBLE */
|
||||
#define hvf_enabled() 0
|
||||
#endif /* !CONFIG_HVF */
|
||||
|
||||
#endif /* COMPILING_PER_TARGET */
|
||||
#endif /* !CONFIG_HVF_IS_POSSIBLE */
|
||||
|
||||
#define TYPE_HVF_ACCEL ACCEL_CLASS_NAME("hvf")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue