Commit 6689fbe3 authored by Nadav Amit's avatar Nadav Amit Committed by Paolo Bonzini

KVM: x86: Replace X86_FEATURE_NX offset with the definition

Replace reference to X86_FEATURE_NX using bit shift with the defined
X86_FEATURE_NX.
Signed-off-by: default avatarNadav Amit <namit@cs.technion.ac.il>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 7103f60d
...@@ -112,8 +112,8 @@ static void cpuid_fix_nx_cap(struct kvm_vcpu *vcpu) ...@@ -112,8 +112,8 @@ static void cpuid_fix_nx_cap(struct kvm_vcpu *vcpu)
break; break;
} }
} }
if (entry && (entry->edx & (1 << 20)) && !is_efer_nx()) { if (entry && (entry->edx & bit(X86_FEATURE_NX)) && !is_efer_nx()) {
entry->edx &= ~(1 << 20); entry->edx &= ~bit(X86_FEATURE_NX);
printk(KERN_INFO "kvm: guest NX capability removed\n"); printk(KERN_INFO "kvm: guest NX capability removed\n");
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment