KVM: SVM: Update svm->ldr_reg cache even if LDR is "bad"
authorSean Christopherson <seanjc@google.com>
Fri, 6 Jan 2023 01:12:59 +0000 (01:12 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 13 Jan 2023 15:45:32 +0000 (10:45 -0500)
commit4f160b7bd481650b15c46808515c67281492ff1a
tree4aa95068228aa93aabcb4b332397256bfc43b8d9
parent1ba59a44546797432d4c2fd2854281e3f4514d2d
KVM: SVM: Update svm->ldr_reg cache even if LDR is "bad"

Update SVM's cache of the LDR even if the new value is "bad".  Leaving
stale information in the cache can result in KVM missing updates and/or
invalidating the wrong entry, e.g. if avic_invalidate_logical_id_entry()
is triggered after a different vCPU has "claimed" the 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-27-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/avic.c