diff options
Diffstat (limited to 'include/xen/interface/event_channel.h')
-rw-r--r-- | include/xen/interface/event_channel.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/include/xen/interface/event_channel.h b/include/xen/interface/event_channel.h index f4942921e202..7e6acef5415b 100644 --- a/include/xen/interface/event_channel.h +++ b/include/xen/interface/event_channel.h | |||
@@ -190,6 +190,39 @@ struct evtchn_reset { | |||
190 | }; | 190 | }; |
191 | typedef struct evtchn_reset evtchn_reset_t; | 191 | typedef struct evtchn_reset evtchn_reset_t; |
192 | 192 | ||
193 | /* | ||
194 | * EVTCHNOP_init_control: initialize the control block for the FIFO ABI. | ||
195 | */ | ||
196 | #define EVTCHNOP_init_control 11 | ||
197 | struct evtchn_init_control { | ||
198 | /* IN parameters. */ | ||
199 | uint64_t control_gfn; | ||
200 | uint32_t offset; | ||
201 | uint32_t vcpu; | ||
202 | /* OUT parameters. */ | ||
203 | uint8_t link_bits; | ||
204 | uint8_t _pad[7]; | ||
205 | }; | ||
206 | |||
207 | /* | ||
208 | * EVTCHNOP_expand_array: add an additional page to the event array. | ||
209 | */ | ||
210 | #define EVTCHNOP_expand_array 12 | ||
211 | struct evtchn_expand_array { | ||
212 | /* IN parameters. */ | ||
213 | uint64_t array_gfn; | ||
214 | }; | ||
215 | |||
216 | /* | ||
217 | * EVTCHNOP_set_priority: set the priority for an event channel. | ||
218 | */ | ||
219 | #define EVTCHNOP_set_priority 13 | ||
220 | struct evtchn_set_priority { | ||
221 | /* IN parameters. */ | ||
222 | uint32_t port; | ||
223 | uint32_t priority; | ||
224 | }; | ||
225 | |||
193 | struct evtchn_op { | 226 | struct evtchn_op { |
194 | uint32_t cmd; /* EVTCHNOP_* */ | 227 | uint32_t cmd; /* EVTCHNOP_* */ |
195 | union { | 228 | union { |
@@ -207,4 +240,39 @@ struct evtchn_op { | |||
207 | }; | 240 | }; |
208 | DEFINE_GUEST_HANDLE_STRUCT(evtchn_op); | 241 | DEFINE_GUEST_HANDLE_STRUCT(evtchn_op); |
209 | 242 | ||
243 | /* | ||
244 | * 2-level ABI | ||
245 | */ | ||
246 | |||
247 | #define EVTCHN_2L_NR_CHANNELS (sizeof(xen_ulong_t) * sizeof(xen_ulong_t) * 64) | ||
248 | |||
249 | /* | ||
250 | * FIFO ABI | ||
251 | */ | ||
252 | |||
253 | /* Events may have priorities from 0 (highest) to 15 (lowest). */ | ||
254 | #define EVTCHN_FIFO_PRIORITY_MAX 0 | ||
255 | #define EVTCHN_FIFO_PRIORITY_DEFAULT 7 | ||
256 | #define EVTCHN_FIFO_PRIORITY_MIN 15 | ||
257 | |||
258 | #define EVTCHN_FIFO_MAX_QUEUES (EVTCHN_FIFO_PRIORITY_MIN + 1) | ||
259 | |||
260 | typedef uint32_t event_word_t; | ||
261 | |||
262 | #define EVTCHN_FIFO_PENDING 31 | ||
263 | #define EVTCHN_FIFO_MASKED 30 | ||
264 | #define EVTCHN_FIFO_LINKED 29 | ||
265 | #define EVTCHN_FIFO_BUSY 28 | ||
266 | |||
267 | #define EVTCHN_FIFO_LINK_BITS 17 | ||
268 | #define EVTCHN_FIFO_LINK_MASK ((1 << EVTCHN_FIFO_LINK_BITS) - 1) | ||
269 | |||
270 | #define EVTCHN_FIFO_NR_CHANNELS (1 << EVTCHN_FIFO_LINK_BITS) | ||
271 | |||
272 | struct evtchn_fifo_control_block { | ||
273 | uint32_t ready; | ||
274 | uint32_t _rsvd; | ||
275 | event_word_t head[EVTCHN_FIFO_MAX_QUEUES]; | ||
276 | }; | ||
277 | |||
210 | #endif /* __XEN_PUBLIC_EVENT_CHANNEL_H__ */ | 278 | #endif /* __XEN_PUBLIC_EVENT_CHANNEL_H__ */ |