Lines Matching refs:resampler
48 if (!irqfd->resampler) { in irqfd_inject()
58 static void irqfd_resampler_notify(struct kvm_kernel_irqfd_resampler *resampler) in irqfd_resampler_notify() argument
62 list_for_each_entry_srcu(irqfd, &resampler->list, resampler_link, in irqfd_resampler_notify()
63 srcu_read_lock_held(&resampler->kvm->irq_srcu)) in irqfd_resampler_notify()
75 struct kvm_kernel_irqfd_resampler *resampler; in irqfd_resampler_ack() local
79 resampler = container_of(kian, in irqfd_resampler_ack()
81 kvm = resampler->kvm; in irqfd_resampler_ack()
84 resampler->notifier.gsi, 0, false); in irqfd_resampler_ack()
87 irqfd_resampler_notify(resampler); in irqfd_resampler_ack()
94 struct kvm_kernel_irqfd_resampler *resampler = irqfd->resampler; in irqfd_resampler_shutdown() local
95 struct kvm *kvm = resampler->kvm; in irqfd_resampler_shutdown()
102 if (list_empty(&resampler->list)) { in irqfd_resampler_shutdown()
103 list_del_rcu(&resampler->link); in irqfd_resampler_shutdown()
104 kvm_unregister_irq_ack_notifier(kvm, &resampler->notifier); in irqfd_resampler_shutdown()
110 resampler->notifier.gsi, 0, false); in irqfd_resampler_shutdown()
111 kfree(resampler); in irqfd_resampler_shutdown()
143 if (irqfd->resampler) { in irqfd_shutdown()
344 struct kvm_kernel_irqfd_resampler *resampler; in kvm_irqfd_assign() local
357 list_for_each_entry(resampler, in kvm_irqfd_assign()
359 if (resampler->notifier.gsi == irqfd->gsi) { in kvm_irqfd_assign()
360 irqfd->resampler = resampler; in kvm_irqfd_assign()
365 if (!irqfd->resampler) { in kvm_irqfd_assign()
366 resampler = kzalloc(sizeof(*resampler), in kvm_irqfd_assign()
368 if (!resampler) { in kvm_irqfd_assign()
374 resampler->kvm = kvm; in kvm_irqfd_assign()
375 INIT_LIST_HEAD(&resampler->list); in kvm_irqfd_assign()
376 resampler->notifier.gsi = irqfd->gsi; in kvm_irqfd_assign()
377 resampler->notifier.irq_acked = irqfd_resampler_ack; in kvm_irqfd_assign()
378 INIT_LIST_HEAD(&resampler->link); in kvm_irqfd_assign()
380 list_add_rcu(&resampler->link, &kvm->irqfds.resampler_list); in kvm_irqfd_assign()
382 &resampler->notifier); in kvm_irqfd_assign()
383 irqfd->resampler = resampler; in kvm_irqfd_assign()
386 list_add_rcu(&irqfd->resampler_link, &irqfd->resampler->list); in kvm_irqfd_assign()
451 if (irqfd->resampler) in kvm_irqfd_assign()
659 struct kvm_kernel_irqfd_resampler *resampler; in kvm_notify_irqfd_resampler() local
665 list_for_each_entry_srcu(resampler, in kvm_notify_irqfd_resampler()
668 if (resampler->notifier.gsi == gsi) { in kvm_notify_irqfd_resampler()
669 irqfd_resampler_notify(resampler); in kvm_notify_irqfd_resampler()