qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v6 07/19] i386: drop FEAT_HYPERV feature leaves


From: Eduardo Habkost
Subject: Re: [PATCH v6 07/19] i386: drop FEAT_HYPERV feature leaves
Date: Thu, 20 May 2021 16:13:25 -0400

On Thu, Apr 22, 2021 at 06:11:18PM +0200, Vitaly Kuznetsov wrote:
> Hyper-V feature leaves are weird. We have some of them in
> feature_word_info[] array but we don't use feature_word_info
> magic to enable them. Neither do we use feature_dependencies[]
> mechanism to validate the configuration as it doesn't allign
> well with Hyper-V's many-to-many dependency chains. Some of
> the feature leaves hold not only feature bits, but also values.
> E.g. FEAT_HV_NESTED_EAX contains both features and the supported
> Enlightened VMCS range.
> 
> Hyper-V features are already represented in 'struct X86CPU' with
> uint64_t hyperv_features so duplicating them in env->features adds
> little (or zero) benefits. THe other half of Hyper-V emulation features
> is also stored with values in hyperv_vendor_id[], hyperv_limits[],...
> so env->features[] is already incomplete.
> 
> Remove Hyper-V feature leaves from env->features[] completely.
> kvm_hyperv_properties[] is converted to using raw CPUID func/reg
> pairs for features, this allows us to get rid of hv_cpuid_get_fw()
> conversion.
> 
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
>  target/i386/cpu.c     |  90 +----------------------------------
>  target/i386/cpu.h     |   5 --
>  target/i386/kvm/kvm.c | 108 ++++++++++++++----------------------------
>  3 files changed, 37 insertions(+), 166 deletions(-)

Nice diffstat!

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>

-- 
Eduardo




reply via email to

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