diff options
author | Xiao Guangrong <guangrong.xiao@linux.intel.com> | 2015-09-09 08:05:57 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-10-01 15:06:41 +0200 |
commit | 1cea0ce68ed76490ffa64a9e2a7a40104efe9352 (patch) | |
tree | c0705c37ce6c4ec90e9143ca449a24c8700341ee /arch/x86/kvm/cpuid.h | |
parent | KVM: VMX: clean up bit operation on SECONDARY_VM_EXEC_CONTROL (diff) | |
download | linux-1cea0ce68ed76490ffa64a9e2a7a40104efe9352.tar.xz linux-1cea0ce68ed76490ffa64a9e2a7a40104efe9352.zip |
KVM: VMX: drop rdtscp_enabled field
Check cpuid bit instead of it
Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/cpuid.h')
-rw-r--r-- | arch/x86/kvm/cpuid.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kvm/cpuid.h b/arch/x86/kvm/cpuid.h index aed7bfeeaf0d..d434ee952b00 100644 --- a/arch/x86/kvm/cpuid.h +++ b/arch/x86/kvm/cpuid.h @@ -141,4 +141,12 @@ static inline bool guest_cpuid_has_pcommit(struct kvm_vcpu *vcpu) best = kvm_find_cpuid_entry(vcpu, 7, 0); return best && (best->ebx & bit(X86_FEATURE_PCOMMIT)); } + +static inline bool guest_cpuid_has_rdtscp(struct kvm_vcpu *vcpu) +{ + struct kvm_cpuid_entry2 *best; + + best = kvm_find_cpuid_entry(vcpu, 0x80000001, 0); + return best && (best->edx & bit(X86_FEATURE_RDTSCP)); +} #endif |