KVM: SVM: Don't rewrite guest ICR on AVIC IPI virtualization failure
authorSean Christopherson <seanjc@google.com>
Fri, 4 Feb 2022 21:41:59 +0000 (21:41 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 1 Mar 2022 13:50:46 +0000 (08:50 -0500)
commitb51818afdc1d3c7cc269e295953685558d3af71c
treeaf7dc8fcf64e7e84c37f05064196d4cec9c3f235
parented60920efe73c8bf19e9f40b786111a520272787
KVM: SVM: Don't rewrite guest ICR on AVIC IPI virtualization failure

Don't bother rewriting the ICR value into the vAPIC page on an AVIC IPI
virtualization failure, the access is a trap, i.e. the value has already
been written to the vAPIC page.  The one caveat is if hardware left the
BUSY flag set (which appears to happen somewhat arbitrarily), in which
case go through the "nodecode" APIC-write path in order to clear the BUSY
flag.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220204214205.3306634-6-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c
arch/x86/kvm/svm/avic.c