OSDN Git Service

i386: kill off hv_cpuid_check_and_set()
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 8 Jun 2021 12:08:14 +0000 (14:08 +0200)
committerEduardo Habkost <ehabkost@redhat.com>
Tue, 13 Jul 2021 13:13:29 +0000 (09:13 -0400)
commit5ce48fa354f2270731e20f81dbb7ff191630c321
tree23ef717a76b6ce4c04ecfcc2aefade2be097ddd8
parent071ce4b03becf9e2df6b758fde9609be8ddf56f1
i386: kill off hv_cpuid_check_and_set()

hv_cpuid_check_and_set() does too much:
- Checks if the feature is supported by KVM;
- Checks if all dependencies are enabled;
- Sets the feature bit in cpu->hyperv_features for 'passthrough' mode.

To reduce the complexity, move all the logic except for dependencies
check out of it. Also, in 'passthrough' mode we don't really need to
check dependencies because KVM is supposed to provide a consistent
set anyway.

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20210608120817.1325125-7-vkuznets@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
target/i386/kvm/kvm.c