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()
101 if (list_empty(&resampler->list)) { in irqfd_resampler_shutdown()
102 list_del_rcu(&resampler->link); in irqfd_resampler_shutdown()
103 kvm_unregister_irq_ack_notifier(kvm, &resampler->notifier); in irqfd_resampler_shutdown()
109 resampler->notifier.gsi, 0, false); in irqfd_resampler_shutdown()
110 kfree(resampler); in irqfd_resampler_shutdown()
144 if (irqfd->resampler) { in irqfd_shutdown()
411 struct kvm_kernel_irqfd_resampler *resampler; in kvm_irqfd_assign() local
424 list_for_each_entry(resampler, in kvm_irqfd_assign()
426 if (resampler->notifier.gsi == irqfd->gsi) { in kvm_irqfd_assign()
427 irqfd->resampler = resampler; in kvm_irqfd_assign()
432 if (!irqfd->resampler) { in kvm_irqfd_assign()
433 resampler = kzalloc_obj(*resampler, GFP_KERNEL_ACCOUNT); in kvm_irqfd_assign()
434 if (!resampler) { in kvm_irqfd_assign()
440 resampler->kvm = kvm; in kvm_irqfd_assign()
441 INIT_LIST_HEAD(&resampler->list); in kvm_irqfd_assign()
442 resampler->notifier.gsi = irqfd->gsi; in kvm_irqfd_assign()
443 resampler->notifier.irq_acked = irqfd_resampler_ack; in kvm_irqfd_assign()
444 INIT_LIST_HEAD(&resampler->link); in kvm_irqfd_assign()
446 list_add_rcu(&resampler->link, &kvm->irqfds.resampler_list); in kvm_irqfd_assign()
448 &resampler->notifier); in kvm_irqfd_assign()
449 irqfd->resampler = resampler; in kvm_irqfd_assign()
452 list_add_rcu(&irqfd->resampler_link, &irqfd->resampler->list); in kvm_irqfd_assign()
508 if (irqfd->resampler) in kvm_irqfd_assign()
685 struct kvm_kernel_irqfd_resampler *resampler; in kvm_notify_irqfd_resampler() local
691 list_for_each_entry_srcu(resampler, in kvm_notify_irqfd_resampler()
694 if (resampler->notifier.gsi == gsi) { in kvm_notify_irqfd_resampler()
695 irqfd_resampler_notify(resampler); in kvm_notify_irqfd_resampler()