提交 6689fbe3 编写于 作者: N Nadav Amit 提交者: 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: NNadav Amit <namit@cs.technion.ac.il>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册