iPXE
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...
 

Macros

#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...
 

Functions

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

Variables

static evtchn_port_t port
 

Detailed Description

Xen interface.

Definition in file xen.h.

Macro Definition Documentation

◆ __XEN_INTERFACE_VERSION__

#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.

◆ EXEN

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

Convert a Xen status code to an iPXE status code.

Parameters
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

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ __attribute__()

static __attribute__ ( (always_inline)  )
inlinestatic

Test and clear pending event.

Parameters
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.