Event Channels

group event_channels

Event channels are the basic primitive provided by Xen for event notifications. An event is the Xen equivalent of a hardware interrupt. They essentially store one bit of information, the event of interest is signalled by transitioning this bit from 0 to 1.

Notifications are received by a guest via an upcall from Xen, indicating when an event arrives (setting the bit). Further notifications are masked until the bit is cleared again (therefore, guests must check the value of the bit after re-enabling event delivery to ensure no missed notifications).

Event notifications can be masked by setting a flag; this is equivalent to disabling interrupts and can be used to ensure atomicity of certain operations in the guest kernel.

Event channels are represented by the evtchn_* fields in struct shared_info and struct vcpu_info.

Defines

EVTCHNOP_bind_interdomain 0
EVTCHNOP_bind_virq 1
EVTCHNOP_bind_pirq 2
EVTCHNOP_close 3
EVTCHNOP_send 4
EVTCHNOP_status 5
EVTCHNOP_alloc_unbound 6
EVTCHNOP_bind_ipi 7
EVTCHNOP_bind_vcpu 8
EVTCHNOP_unmask 9
EVTCHNOP_reset 10
EVTCHNOP_init_control 11
EVTCHNOP_expand_array 12
EVTCHNOP_set_priority 13
EVTCHNOP_reset_cont 14
EVTCHN_2L_NR_CHANNELS (sizeof(xen_ulong_t) * sizeof(xen_ulong_t) * 64)
EVTCHN_FIFO_PRIORITY_MAX 0
EVTCHN_FIFO_PRIORITY_DEFAULT 7
EVTCHN_FIFO_PRIORITY_MIN 15
EVTCHN_FIFO_MAX_QUEUES (EVTCHN_FIFO_PRIORITY_MIN + 1)
EVTCHN_FIFO_PENDING 31
EVTCHN_FIFO_MASKED 30
EVTCHN_FIFO_LINKED 29
EVTCHN_FIFO_BUSY 28
EVTCHN_FIFO_NR_CHANNELS (1 << EVTCHN_FIFO_LINK_BITS)

Typedefs

typedef uint32_t evtchn_port_t
typedef struct evtchn_alloc_unbound evtchn_alloc_unbound_t
typedef struct evtchn_bind_interdomain evtchn_bind_interdomain_t
typedef struct evtchn_bind_virq evtchn_bind_virq_t
typedef struct evtchn_bind_pirq evtchn_bind_pirq_t
typedef struct evtchn_bind_ipi evtchn_bind_ipi_t
typedef struct evtchn_close evtchn_close_t
typedef struct evtchn_send evtchn_send_t
typedef struct evtchn_status evtchn_status_t
typedef struct evtchn_bind_vcpu evtchn_bind_vcpu_t
typedef struct evtchn_unmask evtchn_unmask_t
typedef struct evtchn_reset evtchn_reset_t
typedef struct evtchn_init_control evtchn_init_control_t
typedef struct evtchn_expand_array evtchn_expand_array_t
typedef struct evtchn_set_priority evtchn_set_priority_t
typedef struct evtchn_op evtchn_op_t
typedef uint32_t event_word_t
typedef struct evtchn_fifo_control_block evtchn_fifo_control_block_t
union __guest_handle_evtchn_port_t
#include <event_channel.h>

Public Members

evtchn_port_t* p
unsigned long q
union __guest_handle_64_evtchn_port_t
#include <event_channel.h>

Public Members

evtchn_port_t* p
uint64_t q
union __guest_handle_const_evtchn_port_t
#include <event_channel.h>

Public Members

const evtchn_port_t* p
unsigned long q
union __guest_handle_64_const_evtchn_port_t
#include <event_channel.h>

Public Members

const evtchn_port_t* p
uint64_t q
struct evtchn_status
#include <event_channel.h>
union anonymous_union_0
#include <event_channel.h>

Public Members

struct evtchn_status::anonymous_union_0::anonymous_struct_0 anonymous_union_0::unbound
struct evtchn_status::anonymous_union_0::anonymous_struct_1 anonymous_union_0::interdomain
uint32_t anonymous_union_0::pirq
uint32_t anonymous_union_0::virq
struct evtchn_op
#include <event_channel.h>
union anonymous_union_1
#include <event_channel.h>

Public Members

evtchn_alloc_unbound_t anonymous_union_1::alloc_unbound
evtchn_bind_interdomain_t anonymous_union_1::bind_interdomain
evtchn_bind_virq_t anonymous_union_1::bind_virq
evtchn_bind_pirq_t anonymous_union_1::bind_pirq
evtchn_bind_ipi_t anonymous_union_1::bind_ipi
evtchn_close_t anonymous_union_1::close
evtchn_send_t anonymous_union_1::send
evtchn_status_t anonymous_union_1::status
evtchn_bind_vcpu_t anonymous_union_1::bind_vcpu
evtchn_unmask_t anonymous_union_1::unmask
union __guest_handle_evtchn_op_t
#include <event_channel.h>

Public Members

evtchn_op_t* p
unsigned long q
union __guest_handle_64_evtchn_op_t
#include <event_channel.h>

Public Members

evtchn_op_t* p
uint64_t q
union __guest_handle_const_evtchn_op_t
#include <event_channel.h>

Public Members

const evtchn_op_t* p
unsigned long q
union __guest_handle_64_const_evtchn_op_t
#include <event_channel.h>

Public Members

const evtchn_op_t* p
uint64_t q