Data Structures | Macros | Functions | Variables
xen.h File Reference

Xen interface. More...

#include <stdint.h>
#include <ipxe/bitops.h>
#include <ipxe/uaccess.h>
#include <xen/xen.h>
#include <xen/event_channel.h>
#include <bits/xen.h>

Go to the source code of this file.

Data Structures

struct  xen_grant
 A Xen grant table. More...
struct  xen_store
 A XenStore. More...
struct  xen_hypervisor
 A Xen hypervisor. More...


#define __XEN_INTERFACE_VERSION__   0x00040400
#define xen_mb()   mb()
#define xen_rmb()   rmb()
#define xen_wmb()   wmb()
#define EXEN(xenrc)   EPLATFORM ( EINFO_EPLATFORM, -(xenrc) )
 Convert a Xen status code to an iPXE status code. More...


static __attribute__ ((always_inline)) int xenevent_pending(struct xen_hypervisor *xen
 Test and clear pending event. More...


static evtchn_port_t port

Detailed Description

Xen interface.

Definition in file xen.h.

Macro Definition Documentation


#define __XEN_INTERFACE_VERSION__   0x00040400

Definition at line 13 of file xen.h.

◆ xen_mb

#define xen_mb ( )    mb()

Definition at line 22 of file xen.h.

◆ xen_rmb

#define xen_rmb ( )    rmb()

Definition at line 23 of file xen.h.

◆ xen_wmb

#define xen_wmb ( )    wmb()

Definition at line 24 of file xen.h.


#define EXEN (   xenrc)    EPLATFORM ( EINFO_EPLATFORM, -(xenrc) )

Convert a Xen status code to an iPXE status code.

xenrcXen status code (negated)
Return values
rciPXE status code (before negation)

Xen status codes are defined in the file include/xen/errno.h in the Xen repository. They happen to match the Linux error codes, some of which can be found in our include/ipxe/errno/linux.h.

Definition at line 87 of file xen.h.

Function Documentation



◆ __attribute__()

static __attribute__ ( (always_inline)  )

Test and clear pending event.

xenXen hypervisor
portEvent channel port
Return values
pendingEvent was pending

Variable Documentation

◆ port

Initial value:
return test_and_clear_bit ( port, xen->shared->evtchn_pending )
static evtchn_port_t port
Definition: xen.h:70
int test_and_clear_bit(unsigned int bit, volatile void *bits)

Definition at line 70 of file xen.h.