Lines Matching refs:efer
984 if ((vcpu->arch.efer & EFER_LME) && !is_paging(vcpu) &&
995 if (!(vcpu->arch.efer & EFER_LME) && (cr0 & X86_CR0_PG) &&
1725 static bool __kvm_valid_efer(struct kvm_vcpu *vcpu, u64 efer)
1727 if (efer & EFER_AUTOIBRS && !guest_cpuid_has(vcpu, X86_FEATURE_AUTOIBRS))
1730 if (efer & EFER_FFXSR && !guest_cpuid_has(vcpu, X86_FEATURE_FXSR_OPT))
1733 if (efer & EFER_SVME && !guest_cpuid_has(vcpu, X86_FEATURE_SVM))
1736 if (efer & (EFER_LME | EFER_LMA) &&
1740 if (efer & EFER_NX && !guest_cpuid_has(vcpu, X86_FEATURE_NX))
1746 bool kvm_valid_efer(struct kvm_vcpu *vcpu, u64 efer)
1748 if (efer & efer_reserved_bits)
1751 return __kvm_valid_efer(vcpu, efer);
1757 u64 old_efer = vcpu->arch.efer;
1758 u64 efer = msr_info->data;
1761 if (efer & efer_reserved_bits)
1765 if (!__kvm_valid_efer(vcpu, efer))
1769 (vcpu->arch.efer & EFER_LME) != (efer & EFER_LME))
1773 efer &= ~EFER_LMA;
1774 efer |= vcpu->arch.efer & EFER_LMA;
1776 r = static_call(kvm_x86_set_efer)(vcpu, efer);
1782 if ((efer ^ old_efer) & KVM_MMU_EFER_ROLE_BITS)
4189 msr_info->data = vcpu->arch.efer;
11347 sregs->efer = vcpu->arch.efer;
11489 if ((sregs->efer & EFER_LME) && (sregs->cr0 & X86_CR0_PG)) {
11495 if (!(sregs->cr4 & X86_CR4_PAE) || !(sregs->efer & EFER_LMA))
11504 if (sregs->efer & EFER_LMA || sregs->cs.l)
11545 *mmu_reset_needed |= vcpu->arch.efer != sregs->efer;
11546 static_call(kvm_x86_set_efer)(vcpu, sregs->efer);
11614 !(sregs2->efer & EFER_LMA);