|
@@ -7496,13 +7496,13 @@ EXPORT_SYMBOL_GPL(kvm_task_switch);
|
|
|
|
|
|
int kvm_valid_sregs(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs)
|
|
|
{
|
|
|
- if ((sregs->efer & EFER_LME) && (sregs->cr0 & X86_CR0_PG_BIT)) {
|
|
|
+ if ((sregs->efer & EFER_LME) && (sregs->cr0 & X86_CR0_PG)) {
|
|
|
/*
|
|
|
* When EFER.LME and CR0.PG are set, the processor is in
|
|
|
* 64-bit mode (though maybe in a 32-bit code segment).
|
|
|
* CR4.PAE and EFER.LMA must be set.
|
|
|
*/
|
|
|
- if (!(sregs->cr4 & X86_CR4_PAE_BIT)
|
|
|
+ if (!(sregs->cr4 & X86_CR4_PAE)
|
|
|
|| !(sregs->efer & EFER_LMA))
|
|
|
return -EINVAL;
|
|
|
} else {
|