diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-11-23 03:04:05 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-11-23 03:04:05 -0500 |
commit | 92907cbbef8625bb3998d1eb385fc88f23c97a3f (patch) | |
tree | 15626ff9287e37c3cb81c7286d6db5a7fd77c854 /include/linux/kvm_irqfd.h | |
parent | 15fbfccfe92c62ae8d1ecc647c44157ed01ac02e (diff) | |
parent | 1ec218373b8ebda821aec00bb156a9c94fad9cd4 (diff) |
Merge tag 'v4.4-rc2' into drm-intel-next-queued
Linux 4.4-rc2
Backmerge to get at
commit 1b0e3a049efe471c399674fd954500ce97438d30
Author: Imre Deak <imre.deak@intel.com>
Date: Thu Nov 5 23:04:11 2015 +0200
drm/i915/skl: disable display side power well support for now
so that we can proplery re-eanble skl power wells in -next.
Conflicts are just adjacent lines changed, except for intel_fbdev.c
where we need to interleave the changs. Nothing nefarious.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'include/linux/kvm_irqfd.h')
-rw-r--r-- | include/linux/kvm_irqfd.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/include/linux/kvm_irqfd.h b/include/linux/kvm_irqfd.h new file mode 100644 index 000000000000..0c1de05098c8 --- /dev/null +++ b/include/linux/kvm_irqfd.h | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License as published by | ||
4 | * the Free Software Foundation; either version 2 of the License. | ||
5 | * | ||
6 | * This program is distributed in the hope that it will be useful, | ||
7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
9 | * GNU General Public License for more details. | ||
10 | * | ||
11 | * irqfd: Allows an fd to be used to inject an interrupt to the guest | ||
12 | * Credit goes to Avi Kivity for the original idea. | ||
13 | */ | ||
14 | |||
15 | #ifndef __LINUX_KVM_IRQFD_H | ||
16 | #define __LINUX_KVM_IRQFD_H | ||
17 | |||
18 | #include <linux/kvm_host.h> | ||
19 | #include <linux/poll.h> | ||
20 | |||
21 | /* | ||
22 | * Resampling irqfds are a special variety of irqfds used to emulate | ||
23 | * level triggered interrupts. The interrupt is asserted on eventfd | ||
24 | * trigger. On acknowledgment through the irq ack notifier, the | ||
25 | * interrupt is de-asserted and userspace is notified through the | ||
26 | * resamplefd. All resamplers on the same gsi are de-asserted | ||
27 | * together, so we don't need to track the state of each individual | ||
28 | * user. We can also therefore share the same irq source ID. | ||
29 | */ | ||
30 | struct kvm_kernel_irqfd_resampler { | ||
31 | struct kvm *kvm; | ||
32 | /* | ||
33 | * List of resampling struct _irqfd objects sharing this gsi. | ||
34 | * RCU list modified under kvm->irqfds.resampler_lock | ||
35 | */ | ||
36 | struct list_head list; | ||
37 | struct kvm_irq_ack_notifier notifier; | ||
38 | /* | ||
39 | * Entry in list of kvm->irqfd.resampler_list. Use for sharing | ||
40 | * resamplers among irqfds on the same gsi. | ||
41 | * Accessed and modified under kvm->irqfds.resampler_lock | ||
42 | */ | ||
43 | struct list_head link; | ||
44 | }; | ||
45 | |||
46 | struct kvm_kernel_irqfd { | ||
47 | /* Used for MSI fast-path */ | ||
48 | struct kvm *kvm; | ||
49 | wait_queue_t wait; | ||
50 | /* Update side is protected by irqfds.lock */ | ||
51 | struct kvm_kernel_irq_routing_entry irq_entry; | ||
52 | seqcount_t irq_entry_sc; | ||
53 | /* Used for level IRQ fast-path */ | ||
54 | int gsi; | ||
55 | struct work_struct inject; | ||
56 | /* The resampler used by this irqfd (resampler-only) */ | ||
57 | struct kvm_kernel_irqfd_resampler *resampler; | ||
58 | /* Eventfd notified on resample (resampler-only) */ | ||
59 | struct eventfd_ctx *resamplefd; | ||
60 | /* Entry in list of irqfds for a resampler (resampler-only) */ | ||
61 | struct list_head resampler_link; | ||
62 | /* Used for setup/shutdown */ | ||
63 | struct eventfd_ctx *eventfd; | ||
64 | struct list_head list; | ||
65 | poll_table pt; | ||
66 | struct work_struct shutdown; | ||
67 | struct irq_bypass_consumer consumer; | ||
68 | struct irq_bypass_producer *producer; | ||
69 | }; | ||
70 | |||
71 | #endif /* __LINUX_KVM_IRQFD_H */ | ||