]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: clear SMM flags before loading state while leaving SMM
authorSean Christopherson <sean.j.christopherson@intel.com>
Tue, 2 Apr 2019 15:03:11 +0000 (08:03 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 16 Apr 2019 13:37:36 +0000 (15:37 +0200)
commitff0ff33ee7362db09e4d479b2ad615bf07e88e48
tree3de9d350da3033b6ba31a107b6b05cc73cbdafa8
parent421d764fb3dff46be46262e5e75daae799beab4b
KVM: x86: clear SMM flags before loading state while leaving SMM

RSM emulation is currently broken on VMX when the interrupted guest has
CR4.VMXE=1.  Stop dancing around the issue of HF_SMM_MASK being set when
loading SMSTATE into architectural state, e.g. by toggling it for
problematic flows, and simply clear HF_SMM_MASK prior to loading
architectural state (from SMRAM save state area).

Reported-by: Jon Doron <arilou@gmail.com>
Cc: Jim Mattson <jmattson@google.com>
Cc: Liran Alon <liran.alon@oracle.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Fixes: b274b14a32a0 ("KVM: VMX: check nested state and CR4.VMXE against SMM")
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Tested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c
arch/x86/kvm/svm.c
arch/x86/kvm/vmx/vmx.c