]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
KVM: SVM: Don't check for assigned device(s) when updating affinity
authorSean Christopherson <seanjc@google.com>
Wed, 11 Jun 2025 22:45:47 +0000 (15:45 -0700)
committerSean Christopherson <seanjc@google.com>
Mon, 23 Jun 2025 16:50:40 +0000 (09:50 -0700)
Don't bother checking if a VM has an assigned device when updating AVIC
vCPU affinity, querying ir_list is just as cheap and nothing prevents
racing with changes in device assignment.

Link: https://lore.kernel.org/r/20250611224604.313496-46-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/avic.c

index cb6317fcaddf77ddbb4f50d5c0d9a3bbe010100c..e1fa5c73bc98ba30b5ebb7b1ae66dec45d91e799 100644 (file)
@@ -848,9 +848,6 @@ static inline int avic_update_iommu_vcpu_affinity(struct kvm_vcpu *vcpu, int cpu
 
        lockdep_assert_held(&svm->ir_list_lock);
 
-       if (!kvm_arch_has_assigned_device(vcpu->kvm))
-               return 0;
-
        /*
         * Here, we go through the per-vcpu ir_list to update all existing
         * interrupt remapping table entry targeting this vcpu.