[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 085/115] sysemu/hvf: Only declare hvf_allowed when HVF is availabl
From: |
Paolo Bonzini |
Subject: |
[PULL 085/115] sysemu/hvf: Only declare hvf_allowed when HVF is available |
Date: |
Thu, 11 Jun 2020 15:44:19 -0400 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
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>
---
include/sysemu/hvf.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/sysemu/hvf.h b/include/sysemu/hvf.h
index d211e808e9..fe95743124 100644
--- a/include/sysemu/hvf.h
+++ b/include/sysemu/hvf.h
@@ -18,7 +18,6 @@
#include "exec/memory.h"
#include "sysemu/accel.h"
-extern bool hvf_allowed;
#ifdef CONFIG_HVF
#include <Hypervisor/hv.h>
#include <Hypervisor/hv_vmx.h>
@@ -26,11 +25,12 @@ extern bool hvf_allowed;
#include "target/i386/cpu.h"
uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx,
int reg);
+extern bool hvf_allowed;
#define hvf_enabled() (hvf_allowed)
-#else
+#else /* !CONFIG_HVF */
#define hvf_enabled() 0
#define hvf_get_supported_cpuid(func, idx, reg) 0
-#endif
+#endif /* !CONFIG_HVF */
/* hvf_slot flags */
#define HVF_SLOT_LOG (1 << 0)
--
2.26.2
- [PULL 078/115] qemu/thread: Mark qemu_thread_exit() with 'noreturn' attribute, (continued)
- [PULL 078/115] qemu/thread: Mark qemu_thread_exit() with 'noreturn' attribute, Paolo Bonzini, 2020/06/11
- [PULL 071/115] tests: machine-none-test: Enable MicroBlaze testing, Paolo Bonzini, 2020/06/11
- [PULL 050/115] megasas: use unsigned type for positive numeric fields, Paolo Bonzini, 2020/06/11
- [PULL 084/115] sysemu/tcg: Only declare tcg_allowed when TCG is available, Paolo Bonzini, 2020/06/11
- [PULL 082/115] target/i386: correct fix for pcmpxstrx substring search, Paolo Bonzini, 2020/06/11
- [PULL 081/115] target/i386: fix IEEE x87 floating-point exception raising, Paolo Bonzini, 2020/06/11
- [PULL 089/115] i386: hvf: Drop unused variable, Paolo Bonzini, 2020/06/11
- [PULL 092/115] i386: hvf: Drop fetch_rip from HVFX86EmulatorState, Paolo Bonzini, 2020/06/11
- [PULL 088/115] i386: hvf: Drop useless declarations in sysemu, Paolo Bonzini, 2020/06/11
- [PULL 090/115] i386: hvf: Use ins_len to advance IP, Paolo Bonzini, 2020/06/11
- [PULL 085/115] sysemu/hvf: Only declare hvf_allowed when HVF is available,
Paolo Bonzini <=
- [PULL 083/115] sysemu/accel: Restrict machine methods to system-mode, Paolo Bonzini, 2020/06/11
- [PULL 069/115] KVM: Kick resamplefd for split kernel irqchip, Paolo Bonzini, 2020/06/11
- [PULL 095/115] i386: hvf: Drop regs in HVFX86EmulatorState, Paolo Bonzini, 2020/06/11
- [PULL 080/115] exec: set map length to zero when returning NULL, Paolo Bonzini, 2020/06/11
- [PULL 091/115] i386: hvf: Use IP from CPUX86State, Paolo Bonzini, 2020/06/11
- [PULL 094/115] i386: hvf: Drop copy of RFLAGS defines, Paolo Bonzini, 2020/06/11
- [PULL 097/115] i386: hvf: Move mmio_buf into CPUX86State, Paolo Bonzini, 2020/06/11
- [PULL 096/115] i386: hvf: Move lazy_flags into CPUX86State, Paolo Bonzini, 2020/06/11
- [PULL 098/115] i386: hvf: Drop HVFX86EmulatorState, Paolo Bonzini, 2020/06/11
- [PULL 093/115] i386: hvf: Drop rflags from HVFX86EmulatorState, Paolo Bonzini, 2020/06/11