]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: nVMX: re-evaluate emulation_required on nested VM exit
authorMaxim Levitsky <mlevitsk@redhat.com>
Mon, 13 Sep 2021 14:09:54 +0000 (17:09 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 22 Sep 2021 14:47:50 +0000 (10:47 -0400)
commit488860f30eee04969f59c6013776cd62f637c3aa
treeebc092a5d5d294b2a027969c9b71121428a007c3
parent5406a95e0eb5a52e7526b6424e487c7a3d4a2ae3
KVM: x86: nVMX: re-evaluate emulation_required on nested VM exit

If L1 had invalid state on VM entry (can happen on SMM transactions
when we enter from real mode, straight to nested guest),

then after we load 'host' state from VMCS12, the state has to become
valid again, but since we load the segment registers with
__vmx_set_segment we weren't always updating emulation_required.

Update emulation_required explicitly at end of load_vmcs12_host_state.

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