]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: Process ICR on AVIC IPI delivery failure due to invalid target
authorSean Christopherson <seanjc@google.com>
Fri, 6 Jan 2023 01:12:37 +0000 (01:12 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:34:12 +0000 (09:34 +0100)
commitb1dcdbf4668741ace8f1cd4c6ef59f15cd7539f6
tree1ab460d8618903228e251a50a0804890949687c5
parent56b9c7bfe5d2c451f13b81ff3c74d42e16ec1523
KVM: SVM: Process ICR on AVIC IPI delivery failure due to invalid target

commit 2ac79525d6c4f49909ac673a949d8031c48dda3e upstream.

Emulate ICR writes on AVIC IPI failures due to invalid targets using the
same logic as failures due to invalid types.  AVIC acceleration fails if
_any_ of the targets are invalid, and crucially VM-Exits before sending
IPIs to targets that _are_ valid.  In logical mode, the destination is a
bitmap, i.e. a single IPI can target multiple logical IDs.  Doing nothing
causes KVM to drop IPIs if at least one target is valid and at least one
target is invalid.

Fixes: 124f99fe05d4 ("svm: Add VMEXIT handlers for AVIC")
Cc: stable@vger.kernel.org
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230106011306.85230-5-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/svm/avic.c