iPXE
xenevent.h
Go to the documentation of this file.
1 #ifndef _IPXE_XENEVENT_H
2 #define _IPXE_XENEVENT_H
3 
4 /** @file
5  *
6  * Xen events
7  *
8  */
9 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 
12 #include <ipxe/xen.h>
13 #include <xen/event_channel.h>
14 
15 /**
16  * Close event channel
17  *
18  * @v xen Xen hypervisor
19  * @v close Event descriptor
20  * @ret xenrc Xen status code
21  */
22 static inline __attribute__ (( always_inline )) int
23 xenevent_close ( struct xen_hypervisor *xen, struct evtchn_close *close ) {
24 
25  return xen_hypercall_2 ( xen, __HYPERVISOR_event_channel_op,
27 }
28 
29 /**
30  * Send event
31  *
32  * @v xen Xen hypervisor
33  * @v send Event descriptor
34  * @ret xenrc Xen status code
35  */
36 static inline __attribute__ (( always_inline )) int
37 xenevent_send ( struct xen_hypervisor *xen, struct evtchn_send *send ) {
38 
39  return xen_hypercall_2 ( xen, __HYPERVISOR_event_channel_op,
41 }
42 
43 /**
44  * Allocate an unbound event channel
45  *
46  * @v xen Xen hypervisor
47  * @v alloc_unbound Event descriptor
48  * @ret xenrc Xen status code
49  */
50 static inline __attribute__ (( always_inline )) int
51 xenevent_alloc_unbound ( struct xen_hypervisor *xen,
53 
54  return xen_hypercall_2 ( xen, __HYPERVISOR_event_channel_op,
57 }
58 
59 #endif /* _IPXE_XENEVENT_H */
#define EVTCHNOP_close
Definition: event_channel.h:51
static __always_inline unsigned long virt_to_phys(volatile const void *addr)
Convert virtual address to a physical address.
Definition: uaccess.h:287
A Xen hypervisor.
Definition: xen.h:51
Xen interface.
static struct evtchn_send * send
Definition: xenevent.h:37
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define __HYPERVISOR_event_channel_op
Definition: xen.h:145
#define EVTCHNOP_send
Definition: event_channel.h:52
static __attribute__((always_inline)) int xenevent_close(struct xen_hypervisor *xen
Close event channel.
static struct evtchn_alloc_unbound * alloc_unbound
Definition: xenevent.h:52
static struct evtchn_close * close
Definition: xenevent.h:23
#define EVTCHNOP_alloc_unbound
Definition: event_channel.h:54
struct xen_hypervisor * xen
Xen hypervisor.
Definition: xenbus.h:22