[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 3/7] sysemu/hvf: Only declare hvf_allowed when HVF is avai
From: |
Roman Bolshakov |
Subject: |
Re: [PATCH v2 3/7] sysemu/hvf: Only declare hvf_allowed when HVF is available |
Date: |
Tue, 26 May 2020 22:18:44 +0300 |
On Tue, May 26, 2020 at 07:24:23PM +0200, Philippe Mathieu-Daudé wrote:
> When HVF is not available, the hvf_allowed variable does not exist.
>
> Reviewed-by: Edgar E. Iglesias <address@hidden>
> Reviewed-by: Cornelia Huck <address@hidden>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> v2: Fixed typo s/tcg_allowed/hvf_allowed/ (Edgar)
> ---
> 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.21.3
>
Reviewed-by: Roman Bolshakov <address@hidden>
Thanks,
Roman
- [PATCH v2 0/7] exec/cpu: Cleanups around "exec/hwaddr.h" (reserved to system-mode), Philippe Mathieu-Daudé, 2020/05/26
- [PATCH v2 1/7] sysemu/accel: Restrict machine methods to system-mode, Philippe Mathieu-Daudé, 2020/05/26
- [PATCH v2 2/7] sysemu/tcg: Only declare tcg_allowed when TCG is available, Philippe Mathieu-Daudé, 2020/05/26
- [PATCH v2 3/7] sysemu/hvf: Only declare hvf_allowed when HVF is available, Philippe Mathieu-Daudé, 2020/05/26
- Re: [PATCH v2 3/7] sysemu/hvf: Only declare hvf_allowed when HVF is available,
Roman Bolshakov <=
- [PATCH v2 4/7] target/ppc: Restrict PPCVirtualHypervisorClass to system-mode, Philippe Mathieu-Daudé, 2020/05/26
- [PATCH v2 5/7] target/s390x: Only compile decode_basedisp() on system-mode, Philippe Mathieu-Daudé, 2020/05/26
- [PATCH v2 6/7] target/s390x/helper: Clean ifdef'ry, Philippe Mathieu-Daudé, 2020/05/26
- [PATCH v2 7/7] target/s390x: Restrict system-mode declarations, Philippe Mathieu-Daudé, 2020/05/26
- Re: [PATCH v2 0/7] exec/cpu: Cleanups around "exec/hwaddr.h" (reserved to system-mode), Cornelia Huck, 2020/05/27