Skip to content

Commit fe02139

Browse files
committed
KVM: SVM: Don't check for assigned device(s) when activating AVIC
Don't short-circuit IRTE updating when (de)activating AVIC based on the VM having assigned devices, as nothing prevents AVIC (de)activation from racing with device (de)assignment. And from a performance perspective, bailing early when there is no assigned device doesn't add much, as ir_list_lock will never be contended if there's no assigned device. Link: https://lore.kernel.org/r/20250611224604.313496-47-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent f599866 commit fe02139

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

arch/x86/kvm/svm/avic.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -733,9 +733,6 @@ static int avic_set_pi_irte_mode(struct kvm_vcpu *vcpu, bool activate)
733733
struct vcpu_svm *svm = to_svm(vcpu);
734734
struct kvm_kernel_irqfd *irqfd;
735735

736-
if (!kvm_arch_has_assigned_device(vcpu->kvm))
737-
return 0;
738-
739736
/*
740737
* Here, we go through the per-vcpu ir_list to update all existing
741738
* interrupt remapping table entry targeting this vcpu.

0 commit comments

Comments
 (0)