aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Christopherson <[email protected]>2025-05-23 01:17:55 +0000
committerSean Christopherson <[email protected]>2025-06-25 16:51:29 +0000
commitff845e6a84c8c2c717efa6caf4db2d51a05aa9fd (patch)
tree5b2d732eead54fb22440d43eaa7eaeb6ef511b50
parentMerge branch 'kvm-x86 mmio' (diff)
downloadkernel-ff845e6a84c8c2c717efa6caf4db2d51a05aa9fd.tar.gz
kernel-ff845e6a84c8c2c717efa6caf4db2d51a05aa9fd.zip
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/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
-rw-r--r--arch/x86/kvm/irq.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/x86/kvm/irq.c b/arch/x86/kvm/irq.c
index 4c3f80e8b13f..16da89259011 100644
--- a/arch/x86/kvm/irq.c
+++ b/arch/x86/kvm/irq.c
@@ -565,8 +565,6 @@ int kvm_arch_irq_bypass_add_producer(struct irq_bypass_consumer *cons,
struct kvm *kvm = irqfd->kvm;
int ret = 0;
- kvm_arch_start_assignment(irqfd->kvm);
-
spin_lock_irq(&kvm->irqfds.lock);
irqfd->producer = prod;
@@ -575,10 +573,8 @@ int kvm_arch_irq_bypass_add_producer(struct irq_bypass_consumer *cons,
if (irqfd->irq_entry.type == KVM_IRQ_ROUTING_MSI) {
ret = kvm_pi_update_irte(irqfd, &irqfd->irq_entry);
- if (ret) {
+ if (ret)
kvm->arch.nr_possible_bypass_irqs--;
- kvm_arch_end_assignment(irqfd->kvm);
- }
}
spin_unlock_irq(&kvm->irqfds.lock);
@@ -614,9 +610,6 @@ void kvm_arch_irq_bypass_del_producer(struct irq_bypass_consumer *cons,
kvm->arch.nr_possible_bypass_irqs--;
spin_unlock_irq(&kvm->irqfds.lock);
-
-
- kvm_arch_end_assignment(irqfd->kvm);
}
void kvm_arch_update_irqfd_routing(struct kvm_kernel_irqfd *irqfd,