KVM: SVM: Always update local APIC on writes to logical dest register
authorSean Christopherson <seanjc@google.com>
Fri, 6 Jan 2023 01:12:58 +0000 (01:12 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 13 Jan 2023 15:45:32 +0000 (10:45 -0500)
commit1ba59a44546797432d4c2fd2854281e3f4514d2d
tree725a4747a1a448c3221dedffd3ca21bca4e96871
parent9a364857ab4f8d59d417eca88a39ddf9b308237b
KVM: SVM: Always update local APIC on writes to logical dest register

Update the vCPU's local (virtual) APIC on LDR writes even if the write
"fails".  The APIC needs to recalc the optimized logical map even if the
LDR is invalid or zero, e.g. if the guest clears its LDR, the optimized
map will be left as is and the vCPU will receive interrupts using its
old LDR.

Fixes: 18f40c53e10f ("svm: Add VMEXIT handlers for AVIC")
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230106011306.85230-26-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/avic.c