mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
sysemu/hvf: Only declare hvf_allowed when HVF is available
When HVF is not available, the hvf_allowed variable does not exist. Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200526172427.17460-4-f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
ce4049e893
commit
f291cf5414
1 changed files with 3 additions and 3 deletions
|
@ -18,7 +18,6 @@
|
||||||
#include "exec/memory.h"
|
#include "exec/memory.h"
|
||||||
#include "sysemu/accel.h"
|
#include "sysemu/accel.h"
|
||||||
|
|
||||||
extern bool hvf_allowed;
|
|
||||||
#ifdef CONFIG_HVF
|
#ifdef CONFIG_HVF
|
||||||
#include <Hypervisor/hv.h>
|
#include <Hypervisor/hv.h>
|
||||||
#include <Hypervisor/hv_vmx.h>
|
#include <Hypervisor/hv_vmx.h>
|
||||||
|
@ -26,11 +25,12 @@ extern bool hvf_allowed;
|
||||||
#include "target/i386/cpu.h"
|
#include "target/i386/cpu.h"
|
||||||
uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx,
|
uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx,
|
||||||
int reg);
|
int reg);
|
||||||
|
extern bool hvf_allowed;
|
||||||
#define hvf_enabled() (hvf_allowed)
|
#define hvf_enabled() (hvf_allowed)
|
||||||
#else
|
#else /* !CONFIG_HVF */
|
||||||
#define hvf_enabled() 0
|
#define hvf_enabled() 0
|
||||||
#define hvf_get_supported_cpuid(func, idx, reg) 0
|
#define hvf_get_supported_cpuid(func, idx, reg) 0
|
||||||
#endif
|
#endif /* !CONFIG_HVF */
|
||||||
|
|
||||||
/* hvf_slot flags */
|
/* hvf_slot flags */
|
||||||
#define HVF_SLOT_LOG (1 << 0)
|
#define HVF_SLOT_LOG (1 << 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue