Skip to content

Commit 3fdc608

Browse files
Maxim Levitskybonzini
authored andcommitted
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: f44509f ("KVM: x86: SVM: allow AVIC to co-exist with a nested guest running") Cc: [email protected] Signed-off-by: Maxim Levitsky <[email protected]> Reviewed-by: Sean Christopherson <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 2dcf37a commit 3fdc608

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/x86/kvm/svm/nested.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,6 +1253,9 @@ void svm_leave_nested(struct kvm_vcpu *vcpu)
12531253

12541254
nested_svm_uninit_mmu_context(vcpu);
12551255
vmcb_mark_all_dirty(svm->vmcb);
1256+
1257+
if (kvm_apicv_activated(vcpu->kvm))
1258+
kvm_make_request(KVM_REQ_APICV_UPDATE, vcpu);
12561259
}
12571260

12581261
kvm_clear_request(KVM_REQ_GET_NESTED_STATE_PAGES, vcpu);

0 commit comments

Comments
 (0)