qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 03/25] i386/kvm: convert hyperv enlightenments pr


From: Alex Bennée
Subject: Re: [Qemu-devel] [PULL 03/25] i386/kvm: convert hyperv enlightenments properties from bools to bits
Date: Mon, 24 Jun 2019 12:04:13 +0100
User-agent: mu4e 1.3.2; emacs 26.1

Paolo Bonzini <address@hidden> writes:

> From: Vitaly Kuznetsov <address@hidden>
>
> Representing Hyper-V properties as bits will allow us to check features
> and dependencies between them in a natural way.
>
> Suggested-by: Roman Kagan <address@hidden>
> Signed-off-by: Vitaly Kuznetsov <address@hidden>
> Message-Id: <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  hw/i386/pc.c          |  3 +-
>  target/i386/cpu.c     | 44 ++++++++++++++++++---------
>  target/i386/cpu.h     | 37 ++++++++++++++---------
>  target/i386/hyperv.c  |  2 +-
>  target/i386/kvm.c     | 83 
> +++++++++++++++++++++------------------------------
>  target/i386/machine.c |  2 +-
>  6 files changed, 91 insertions(+), 80 deletions(-)
>
<snip>
> diff --git a/target/i386/cpu.h b/target/i386/cpu.h
> index 0732e05..30cd1a0 100644
> --- a/target/i386/cpu.h
> +++ b/target/i386/cpu.h
> @@ -734,6 +734,22 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
>  #define MSR_ARCH_CAP_SKIP_L1DFL_VMENTRY (1U << 3)
>  #define MSR_ARCH_CAP_SSB_NO     (1U << 4)
>
> +/* Supported Hyper-V Enlightenments */
> +#define HYPERV_FEAT_RELAXED             0
> +#define HYPERV_FEAT_VAPIC               1
> +#define HYPERV_FEAT_TIME                2
> +#define HYPERV_FEAT_CRASH               3
> +#define HYPERV_FEAT_RESET               4
> +#define HYPERV_FEAT_VPINDEX             5
> +#define HYPERV_FEAT_RUNTIME             6
> +#define HYPERV_FEAT_SYNIC               7
> +#define HYPERV_FEAT_STIMER              8
> +#define HYPERV_FEAT_FREQUENCIES         9
> +#define HYPERV_FEAT_REENLIGHTENMENT     10
> +#define HYPERV_FEAT_TLBFLUSH            11
> +#define HYPERV_FEAT_EVMCS               12
> +#define HYPERV_FEAT_IPI                 13
> +
>  #ifndef HYPERV_SPINLOCK_NEVER_RETRY
>  #define HYPERV_SPINLOCK_NEVER_RETRY             0xFFFFFFFF
>  #endif
> @@ -1370,23 +1386,11 @@ struct X86CPU {
>      CPUNegativeOffsetState neg;
>      CPUX86State env;
>
> -    bool hyperv_vapic;
> -    bool hyperv_relaxed_timing;
>      int hyperv_spinlock_attempts;
>      char *hyperv_vendor_id;
> -    bool hyperv_time;
> -    bool hyperv_crash;
> -    bool hyperv_reset;
> -    bool hyperv_vpindex;
> -    bool hyperv_runtime;
> -    bool hyperv_synic;
>      bool hyperv_synic_kvm_only;

This looks like it's broken the build:

  configure' '--without-default-devices' '--disable-user'

with:

  /home/alex/lsrc/qemu.git/target/i386/hyperv-stub.c: In function 
‘kvm_hv_handle_exit’:
  /home/alex/lsrc/qemu.git/target/i386/hyperv-stub.c:18:19: error: ‘X86CPU’ 
{aka ‘struct X86CPU’} has no member named ‘hyperv_synic’; did you mean 
‘hyperv_vendor_id’?
           if (!cpu->hyperv_synic) {
                     ^~~~~~~~~~~~

Does the stub need updating for the new flag? I'm a little confused
about the relationship between HyperV and KVM. I thought they were
different hypervisors?

--
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]