|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Allocate, bind, and service Xen event channels from Zephyr. More...
Files | |
| file | events.h |
| Xen event channel services. | |
Typedefs | |
| typedef void(* | evtchn_cb_t) (void *priv) |
| Event-channel callback signature. | |
Functions | |
| int | evtchn_status (evtchn_status_t *status) |
| Query the status of an event channel. | |
| int | evtchn_close (evtchn_port_t port) |
| Close a local event channel. | |
| int | evtchn_set_priority (evtchn_port_t port, uint32_t priority) |
| Set the Xen priority assigned to an event channel. | |
| int | notify_evtchn (evtchn_port_t port) |
| Send a notification over an event channel. | |
| int | alloc_unbound_event_channel (domid_t remote_dom) |
| Allocate an unbound event channel for the calling domain. | |
| int | alloc_unbound_event_channel_dom0 (domid_t dom, domid_t remote_dom) |
| Allocate an unbound event channel between two domains. | |
| int | bind_interdomain_event_channel (domid_t remote_dom, evtchn_port_t remote_port, evtchn_cb_t cb, void *data) |
| Bind to a remote event channel and register a callback. | |
| int | bind_event_channel (evtchn_port_t port, evtchn_cb_t cb, void *data) |
| Attach a callback to an already allocated local event channel. | |
| int | unbind_event_channel (evtchn_port_t port) |
| Remove the callback bound to an event channel. | |
| int | get_missed_events (evtchn_port_t port) |
| Get and clear the missed-event state for an unbound channel. | |
| int | mask_event_channel (evtchn_port_t port) |
| Mask local delivery for an event channel. | |
| int | unmask_event_channel (evtchn_port_t port) |
| Unmask local delivery for an event channel. | |
| void | clear_event_channel (evtchn_port_t port) |
| Clear the pending bit for an event channel. | |
| int | xen_events_init (void) |
| Initialize Xen event handling for the current guest. | |
Allocate, bind, and service Xen event channels from Zephyr.
| typedef void(* evtchn_cb_t) (void *priv) |
#include <zephyr/xen/events.h>
Event-channel callback signature.
The callback runs from the Xen event interrupt handler.
| priv | User data pointer that was registered with the event channel. |
| int alloc_unbound_event_channel | ( | domid_t | remote_dom | ) |
#include <zephyr/xen/events.h>
Allocate an unbound event channel for the calling domain.
CONFIG_XEN_EVENTS.| remote_dom | Domain that may bind to the allocated channel. |
#include <zephyr/xen/events.h>
Allocate an unbound event channel between two domains.
CONFIG_XEN_EVENTS, CONFIG_XEN_DOM0.| dom | Domain that receives the new local port. May be DOMID_SELF. |
| remote_dom | Peer domain that may bind to the port. |
| int bind_event_channel | ( | evtchn_port_t | port, |
| evtchn_cb_t | cb, | ||
| void * | data ) |
#include <zephyr/xen/events.h>
Attach a callback to an already allocated local event channel.
CONFIG_XEN_EVENTS.| port | Local event-channel port number. |
| cb | Callback to invoke when the port is signaled. |
| data | User data pointer passed to cb. |
| 0 | on success. |
| int bind_interdomain_event_channel | ( | domid_t | remote_dom, |
| evtchn_port_t | remote_port, | ||
| evtchn_cb_t | cb, | ||
| void * | data ) |
#include <zephyr/xen/events.h>
Bind to a remote event channel and register a callback.
CONFIG_XEN_EVENTS.| remote_dom | Peer domain that already owns remote_port. |
| remote_port | Event-channel port in remote_dom. |
| cb | Callback invoked when the local channel fires. |
| data | User data pointer passed to cb. |
| void clear_event_channel | ( | evtchn_port_t | port | ) |
#include <zephyr/xen/events.h>
Clear the pending bit for an event channel.
CONFIG_XEN_EVENTS.| port | Local event-channel port number. |
| int evtchn_close | ( | evtchn_port_t | port | ) |
#include <zephyr/xen/events.h>
Close a local event channel.
CONFIG_XEN_EVENTS.| port | Local event-channel port to close. |
| int evtchn_set_priority | ( | evtchn_port_t | port, |
| uint32_t | priority ) |
#include <zephyr/xen/events.h>
Set the Xen priority assigned to an event channel.
CONFIG_XEN_EVENTS.| port | Local event-channel port to update. |
| priority | Xen event priority value. |
| int evtchn_status | ( | evtchn_status_t * | status | ) |
#include <zephyr/xen/events.h>
Query the status of an event channel.
CONFIG_XEN_EVENTS.The caller provides the input domain and port in status, and Xen fills the remaining fields with the current channel state.
| [in,out] | status | Event-channel status request and response buffer. |
| int get_missed_events | ( | evtchn_port_t | port | ) |
#include <zephyr/xen/events.h>
Get and clear the missed-event state for an unbound channel.
CONFIG_XEN_EVENTS.| port | Local event-channel port number. |
| 1 | At least one event was recorded while no callback was bound. |
| 0 | Otherwise. |
| int mask_event_channel | ( | evtchn_port_t | port | ) |
#include <zephyr/xen/events.h>
Mask local delivery for an event channel.
CONFIG_XEN_EVENTS.| port | Local event-channel port number. |
| 0 | Always returned after updating the shared-info mask bit. |
| int notify_evtchn | ( | evtchn_port_t | port | ) |
#include <zephyr/xen/events.h>
Send a notification over an event channel.
CONFIG_XEN_EVENTS.| port | Local event-channel port to notify. |
| int unbind_event_channel | ( | evtchn_port_t | port | ) |
#include <zephyr/xen/events.h>
Remove the callback bound to an event channel.
CONFIG_XEN_EVENTS.The channel remains allocated, but subsequent notifications are recorded as missed events until another callback is registered.
| port | Local event-channel port number. |
| 0 | on success. |
| int unmask_event_channel | ( | evtchn_port_t | port | ) |
#include <zephyr/xen/events.h>
Unmask local delivery for an event channel.
CONFIG_XEN_EVENTS.| port | Local event-channel port number. |
| 0 | Always returned after updating the shared-info mask bit. |
| int xen_events_init | ( | void | ) |
#include <zephyr/xen/events.h>
Initialize Xen event handling for the current guest.
CONFIG_XEN_EVENTS.This function prepares the per-port callback table and connects the Zephyr ISR to the Xen event interrupt described by devicetree.
| -EINVAL | Xen shared-info page is not mapped. |