~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/kvm_irqfd.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  *
  4  * irqfd: Allows an fd to be used to inject an interrupt to the guest
  5  * Credit goes to Avi Kivity for the original idea.
  6  */
  7 
  8 #ifndef __LINUX_KVM_IRQFD_H
  9 #define __LINUX_KVM_IRQFD_H
 10 
 11 #include <linux/kvm_host.h>
 12 #include <linux/poll.h>
 13 
 14 /*
 15  * Resampling irqfds are a special variety of irqfds used to emulate
 16  * level triggered interrupts.  The interrupt is asserted on eventfd
 17  * trigger.  On acknowledgment through the irq ack notifier, the
 18  * interrupt is de-asserted and userspace is notified through the
 19  * resamplefd.  All resamplers on the same gsi are de-asserted
 20  * together, so we don't need to track the state of each individual
 21  * user.  We can also therefore share the same irq source ID.
 22  */
 23 struct kvm_kernel_irqfd_resampler {
 24         struct kvm *kvm;
 25         /*
 26          * List of resampling struct _irqfd objects sharing this gsi.
 27          * RCU list modified under kvm->irqfds.resampler_lock
 28          */
 29         struct list_head list;
 30         struct kvm_irq_ack_notifier notifier;
 31         /*
 32          * Entry in list of kvm->irqfd.resampler_list.  Use for sharing
 33          * resamplers among irqfds on the same gsi.
 34          * RCU list modified under kvm->irqfds.resampler_lock
 35          */
 36         struct list_head link;
 37 };
 38 
 39 struct kvm_kernel_irqfd {
 40         /* Used for MSI fast-path */
 41         struct kvm *kvm;
 42         wait_queue_entry_t wait;
 43         /* Update side is protected by irqfds.lock */
 44         struct kvm_kernel_irq_routing_entry irq_entry;
 45         seqcount_spinlock_t irq_entry_sc;
 46         /* Used for level IRQ fast-path */
 47         int gsi;
 48         struct work_struct inject;
 49         /* The resampler used by this irqfd (resampler-only) */
 50         struct kvm_kernel_irqfd_resampler *resampler;
 51         /* Eventfd notified on resample (resampler-only) */
 52         struct eventfd_ctx *resamplefd;
 53         /* Entry in list of irqfds for a resampler (resampler-only) */
 54         struct list_head resampler_link;
 55         /* Used for setup/shutdown */
 56         struct eventfd_ctx *eventfd;
 57         struct list_head list;
 58         poll_table pt;
 59         struct work_struct shutdown;
 60         struct irq_bypass_consumer consumer;
 61         struct irq_bypass_producer *producer;
 62 };
 63 
 64 #endif /* __LINUX_KVM_IRQFD_H */
 65 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php