diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2022-02-03 13:16:58 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2022-03-06 13:15:42 +0100 |
commit | b04363c24055f3cc9a458bf723ebebdfbabb578c (patch) | |
tree | bd5d3538a5318d7b1be766c0982857ac4d918545 /target/i386/hax | |
parent | f94bee49d2f391a8bf1b1f9a3353b7b9fdb8ca20 (diff) | |
download | qemu-b04363c24055f3cc9a458bf723ebebdfbabb578c.zip qemu-b04363c24055f3cc9a458bf723ebebdfbabb578c.tar.gz qemu-b04363c24055f3cc9a458bf723ebebdfbabb578c.tar.bz2 |
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>
Diffstat (limited to 'target/i386/hax')
-rw-r--r-- | target/i386/hax/hax-all.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/target/i386/hax/hax-all.c b/target/i386/hax/hax-all.c index bf65ed6..ccdcb6a 100644 --- a/target/i386/hax/hax-all.c +++ b/target/i386/hax/hax-all.c @@ -49,18 +49,13 @@ const uint32_t hax_cur_version = 0x4; /* API v4: unmapping and MMIO moves */ /* Minimum HAX kernel version */ const uint32_t hax_min_version = 0x4; /* API v4: supports unmapping */ -static bool hax_allowed; +bool hax_allowed; struct hax_state hax_global; static void hax_vcpu_sync_state(CPUArchState *env, int modified); static int hax_arch_get_registers(CPUArchState *env); -int hax_enabled(void) -{ - return hax_allowed; -} - int valid_hax_tunnel_size(uint16_t size) { return size >= sizeof(struct hax_tunnel); |