forked from Minki/linux
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: Nadav Amit <namit@cs.technion.ac.il> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
7103f60de8
commit
6689fbe3cf
@ -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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user