]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Drop guest CPUID check for VMXE in vmx_set_cr4()
authorSean Christopherson <sean.j.christopherson@intel.com>
Wed, 7 Oct 2020 01:44:12 +0000 (18:44 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 15 Nov 2020 14:49:06 +0000 (09:49 -0500)
commit0c7e1427496a3850b1968d0b4d9c74fa7de6a450
treefb5f6abf6d24303b7748b9024d1c23e708e1eff5
parenta3f4618caa00c90839b511eeaa6a20b9ff2b0fff
KVM: VMX: Drop guest CPUID check for VMXE in vmx_set_cr4()

Drop vmx_set_cr4()'s somewhat hidden guest_cpuid_has() check on VMXE now
that common x86 handles the check by incorporating VMXE into the CR4
reserved bits, i.e. in cr4_guest_rsvd_bits.  This fixes a bug where KVM
incorrectly rejects KVM_SET_SREGS with CR4.VMXE=1 if it's executed
before KVM_SET_CPUID{,2}.

Fixes: e84aa99caadd ("KVM: nVMX: Allow setting the VMXE bit in CR4")
Reported-by: Stas Sergeev <stsp@users.sourceforge.net>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20201007014417.29276-2-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c