mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
KVM: x86: Remove supports_cpuid_fault() helper
The function, supports_cpuid_fault(), tests specifically for guest support of Intel's CPUID faulting feature. It does not test for guest support of AMD's CPUID faulting feature. To avoid confusion, remove the helper. Suggested-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Jim Mattson <jmattson@google.com> Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Link: https://patch.msgid.link/20260527174347.2356165-4-jmattson@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
This commit is contained in:
parent
be7fd7c3e8
commit
d1bc99885a
|
|
@ -183,11 +183,6 @@ static inline int guest_cpuid_stepping(struct kvm_vcpu *vcpu)
|
|||
return x86_stepping(best->eax);
|
||||
}
|
||||
|
||||
static inline bool supports_cpuid_fault(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return vcpu->arch.msr_platform_info & MSR_PLATFORM_INFO_CPUID_FAULT;
|
||||
}
|
||||
|
||||
static inline bool cpuid_fault_enabled(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return vcpu->arch.msr_misc_features_enables &
|
||||
|
|
|
|||
|
|
@ -4264,7 +4264,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
|||
case MSR_MISC_FEATURES_ENABLES:
|
||||
if (data & ~MSR_MISC_FEATURES_ENABLES_CPUID_FAULT ||
|
||||
(data & MSR_MISC_FEATURES_ENABLES_CPUID_FAULT &&
|
||||
!supports_cpuid_fault(vcpu)))
|
||||
!(vcpu->arch.msr_platform_info & MSR_PLATFORM_INFO_CPUID_FAULT)))
|
||||
return 1;
|
||||
vcpu->arch.msr_misc_features_enables = data;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user