x86: KVM: SVM: refresh AVIC inhibition in svm_leave_nested()
authorMaxim Levitsky <mlevitsk@redhat.com>
Thu, 28 Sep 2023 17:33:53 +0000 (20:33 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 Oct 2023 15:09:00 +0000 (11:09 -0400)
commit3fdc6087df3be73a212a81ce5dd6516638568806
treeb7ebadc224491c13ef13bd4bf94778e25c2ae155
parent2dcf37abf9d3aab7f975002d29fc7c17272def38
x86: KVM: SVM: refresh AVIC inhibition in svm_leave_nested()

svm_leave_nested() similar to a nested VM exit, get the vCPU out of nested
mode and thus should end the local inhibition of AVIC on this vCPU.

Failure to do so, can lead to hangs on guest reboot.

Raise the KVM_REQ_APICV_UPDATE request to refresh the AVIC state of the
current vCPU in this case.

Fixes: f44509f849fe ("KVM: x86: SVM: allow AVIC to co-exist with a nested guest running")
Cc: stable@vger.kernel.org
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230928173354.217464-4-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/nested.c