diff options
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 f9087315e0cd..a5380590ab0e 100644 --- a/arch/x86/kvm/cpuid.h +++ b/arch/x86/kvm/cpuid.h | |||
@@ -95,4 +95,12 @@ static inline bool guest_cpuid_has_gbpages(struct kvm_vcpu *vcpu) | |||
95 | best = kvm_find_cpuid_entry(vcpu, 0x80000001, 0); | 95 | best = kvm_find_cpuid_entry(vcpu, 0x80000001, 0); |
96 | return best && (best->edx & bit(X86_FEATURE_GBPAGES)); | 96 | return best && (best->edx & bit(X86_FEATURE_GBPAGES)); |
97 | } | 97 | } |
98 | |||
99 | static inline bool guest_cpuid_has_rtm(struct kvm_vcpu *vcpu) | ||
100 | { | ||
101 | struct kvm_cpuid_entry2 *best; | ||
102 | |||
103 | best = kvm_find_cpuid_entry(vcpu, 7, 0); | ||
104 | return best && (best->ebx & bit(X86_FEATURE_RTM)); | ||
105 | } | ||
98 | #endif | 106 | #endif |