]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: Allow restore nested-state to enable eVMCS when vCPU in SMM
authorLiran Alon <liran.alon@oracle.com>
Tue, 25 Jun 2019 11:26:42 +0000 (14:26 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 2 Jul 2019 17:02:44 +0000 (19:02 +0200)
commit81f22e9341d44bb65150da6b74b91e0ecc1914e4
treed90008d652f75fb570ae47a975b4327c59f7a799
parenta3aab1a5f78c9d16b7758ecdb9e5481049a6afd3
KVM: nVMX: Allow restore nested-state to enable eVMCS when vCPU in SMM

As comment in code specifies, SMM temporarily disables VMX so we cannot
be in guest mode, nor can VMLAUNCH/VMRESUME be pending.

However, code currently assumes that these are the only flags that can be
set on kvm_state->flags. This is not true as KVM_STATE_NESTED_EVMCS
can also be set on this field to signal that eVMCS should be enabled.

Therefore, fix code to check for guest-mode and pending VMLAUNCH/VMRESUME
explicitly.

Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c