Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "kvm: detect assigned device via irqbypass manager"

Now that KVM explicitly tracks the number of possible bypass IRQs, and
doesn't conflate IRQ bypass with host MMIO access, stop bumping the
assigned device count when adding an IRQ bypass producer.

This reverts commit 2edd9cb79fb31b0907c6e0cdce2824780cf9b153.

Link: https://lore.kernel.org/r/20250523011756.3243624-5-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>

+1 -8
+1 -8
arch/x86/kvm/irq.c
··· 565 565 struct kvm *kvm = irqfd->kvm; 566 566 int ret = 0; 567 567 568 - kvm_arch_start_assignment(irqfd->kvm); 569 - 570 568 spin_lock_irq(&kvm->irqfds.lock); 571 569 irqfd->producer = prod; 572 570 ··· 573 575 574 576 if (irqfd->irq_entry.type == KVM_IRQ_ROUTING_MSI) { 575 577 ret = kvm_pi_update_irte(irqfd, &irqfd->irq_entry); 576 - if (ret) { 578 + if (ret) 577 579 kvm->arch.nr_possible_bypass_irqs--; 578 - kvm_arch_end_assignment(irqfd->kvm); 579 - } 580 580 } 581 581 spin_unlock_irq(&kvm->irqfds.lock); 582 582 ··· 610 614 kvm->arch.nr_possible_bypass_irqs--; 611 615 612 616 spin_unlock_irq(&kvm->irqfds.lock); 613 - 614 - 615 - kvm_arch_end_assignment(irqfd->kvm); 616 617 } 617 618 618 619 void kvm_arch_update_irqfd_routing(struct kvm_kernel_irqfd *irqfd,