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 <vkuzn...@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 <ehabk...@redhat.com> -- Eduardo