KVM: x86: Replace X86_FEATURE_NX offset with the definition
authorNadav Amit <[email protected]>
Wed, 20 Aug 2014 13:38:19 +0000 (16:38 +0300)
committerPaolo Bonzini <[email protected]>
Thu, 21 Aug 2014 11:50:23 +0000 (13:50 +0200)
Replace reference to X86_FEATURE_NX using bit shift with the defined
X86_FEATURE_NX.

Signed-off-by: Nadav Amit <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
arch/x86/kvm/cpuid.c

index 38a0afe83c6ba17822ca683ae570fec7ff65825e..f4bad87ef256533473650a57b250d0d1924ee164 100644 (file)
@@ -112,8 +112,8 @@ static void cpuid_fix_nx_cap(struct kvm_vcpu *vcpu)
                        break;
                }
        }
-       if (entry && (entry->edx & (1 << 20)) && !is_efer_nx()) {
-               entry->edx &= ~(1 << 20);
+       if (entry && (entry->edx & bit(X86_FEATURE_NX)) && !is_efer_nx()) {
+               entry->edx &= ~bit(X86_FEATURE_NX);
                printk(KERN_INFO "kvm: guest NX capability removed\n");
        }
 }