i386: drop FEAT_HYPERV feature leaves
commit061817a7ccd9e1c028153f308c541c299a009ef8
authorVitaly Kuznetsov <vkuznets@redhat.com>
Thu, 22 Apr 2021 16:11:18 +0000 (22 18:11 +0200)
committerEduardo Habkost <ehabkost@redhat.com>
Mon, 31 May 2021 19:53:03 +0000 (31 15:53 -0400)
tree7f254e57df217a0e67aad7049f213ad124f344fd
parente1a66a1e27eee8b025954713d28b9e74d95a5271
i386: drop FEAT_HYPERV feature leaves

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>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20210422161130.652779-8-vkuznets@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
target/i386/cpu-sysemu.c
target/i386/cpu.c
target/i386/cpu.h
target/i386/kvm/kvm.c