]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: nVMX: don't fail nested VM entry on invalid guest state if !from_vmentry
authorMaxim Levitsky <mlevitsk@redhat.com>
Mon, 13 Sep 2021 14:09:53 +0000 (17:09 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 22 Sep 2021 14:47:50 +0000 (10:47 -0400)
commit61e84292b4cb33cfe3cbc4b1ef1c2e2de7fe36b0
tree793d3656494efa39a47b327fb4b44ec90c7cac97
parent9688ec59b973651b836942c6cb97c77bcca71931
KVM: x86: nVMX: don't fail nested VM entry on invalid guest state if !from_vmentry

It is possible that when non root mode is entered via special entry
(!from_vmentry), that is from SMM or from loading the nested state,
the L2 state could be invalid in regard to non unrestricted guest mode,
but later it can become valid.

(for example when RSM emulation restores segment registers from SMRAM)

Thus delay the check to VM entry, where we will check this and fail.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20210913140954.165665-7-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c