aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorRadim Krčmář <rkrcmar@redhat.com>2017-08-05 00:12:48 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2017-08-07 16:09:38 +0200
commitc6bd18011ff8ea23473a1f4c6d934f761879081d (patch)
treefdc0c38db8994b507da27cc40f43feb810e2a07b /arch/x86/kvm
parentKVM: nVMX: Emulate EPTP switching for the L1 hypervisor (diff)
downloadlinux-dev-c6bd18011ff8ea23473a1f4c6d934f761879081d.tar.xz
linux-dev-c6bd18011ff8ea23473a1f4c6d934f761879081d.zip
KVM: x86: X86_FEATURE_NRIPS is not scattered anymore
bit(X86_FEATURE_NRIPS) is 3 since 2ccd71f1b278 ("x86/cpufeature: Move some of the scattered feature bits to x86_capability"), so we can simplify the code. Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/cpuid.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/arch/x86/kvm/cpuid.h b/arch/x86/kvm/cpuid.h
index da6728383052..c723d64657d0 100644
--- a/arch/x86/kvm/cpuid.h
+++ b/arch/x86/kvm/cpuid.h
@@ -160,25 +160,13 @@ static inline bool guest_cpuid_has_rdtscp(struct kvm_vcpu *vcpu)
return best && (best->edx & bit(X86_FEATURE_RDTSCP));
}
-/*
- * NRIPS is provided through cpuidfn 0x8000000a.edx bit 3
- */
-#define BIT_NRIPS 3
-
static inline bool guest_cpuid_has_nrips(struct kvm_vcpu *vcpu)
{
struct kvm_cpuid_entry2 *best;
best = kvm_find_cpuid_entry(vcpu, 0x8000000a, 0);
-
- /*
- * NRIPS is a scattered cpuid feature, so we can't use
- * X86_FEATURE_NRIPS here (X86_FEATURE_NRIPS would be bit
- * position 8, not 3).
- */
- return best && (best->edx & bit(BIT_NRIPS));
+ return best && (best->edx & bit(X86_FEATURE_NRIPS));
}
-#undef BIT_NRIPS
static inline int guest_cpuid_family(struct kvm_vcpu *vcpu)
{