]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit
authorMaxim Levitsky <mlevitsk@redhat.com>
Thu, 7 Jan 2021 09:38:51 +0000 (11:38 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 7 Jan 2021 23:11:35 +0000 (18:11 -0500)
commitf015ce761976d725e4b1e0ec2f43f927975c21bb
tree3165f855f36aa7602d20c11471af964bbdf12bdd
parent00339800f2c302e2f88f72027bae8f2ac3c92964
KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit

It is possible to exit the nested guest mode, entered by
svm_set_nested_state prior to first vm entry to it (e.g due to pending event)
if the nested run was not pending during the migration.

In this case we must not switch to the nested msr permission bitmap.
Also add a warning to catch similar cases in the future.

Fixes: 7e59aff626163 ("KVM: nSVM: delay MSR permission processing to first nested VM run")
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20210107093854.882483-2-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/nested.c
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/x86.c