iPXE
Data Structures | Macros | Typedefs | Functions
grant_table.h File Reference
#include "xen.h"

Go to the source code of this file.

Data Structures

struct  grant_entry_v1
 
struct  gnttab_map_grant_ref
 
struct  gnttab_unmap_grant_ref
 
struct  gnttab_setup_table
 
struct  gnttab_dump_table
 
struct  gnttab_transfer
 
struct  gnttab_copy
 
struct  gnttab_copy::gnttab_copy_ptr
 
struct  gnttab_query_size
 
struct  gnttab_unmap_and_replace
 

Macros

#define grant_entry_v1   grant_entry
 
#define grant_entry_v1_t   grant_entry_t
 
#define GNTTAB_NR_RESERVED_ENTRIES   8
 
#define GNTTAB_RESERVED_CONSOLE   0
 
#define GNTTAB_RESERVED_XENSTORE   1
 
#define GTF_invalid   (0U<<0)
 
#define GTF_permit_access   (1U<<0)
 
#define GTF_accept_transfer   (2U<<0)
 
#define GTF_transitive   (3U<<0)
 
#define GTF_type_mask   (3U<<0)
 
#define _GTF_readonly   (2)
 
#define GTF_readonly   (1U<<_GTF_readonly)
 
#define _GTF_reading   (3)
 
#define GTF_reading   (1U<<_GTF_reading)
 
#define _GTF_writing   (4)
 
#define GTF_writing   (1U<<_GTF_writing)
 
#define _GTF_PWT   (5)
 
#define GTF_PWT   (1U<<_GTF_PWT)
 
#define _GTF_PCD   (6)
 
#define GTF_PCD   (1U<<_GTF_PCD)
 
#define _GTF_PAT   (7)
 
#define GTF_PAT   (1U<<_GTF_PAT)
 
#define _GTF_sub_page   (8)
 
#define GTF_sub_page   (1U<<_GTF_sub_page)
 
#define _GTF_transfer_committed   (2)
 
#define GTF_transfer_committed   (1U<<_GTF_transfer_committed)
 
#define _GTF_transfer_completed   (3)
 
#define GTF_transfer_completed   (1U<<_GTF_transfer_completed)
 
#define GNTTABOP_map_grant_ref   0
 
#define GNTTABOP_unmap_grant_ref   1
 
#define GNTTABOP_setup_table   2
 
#define GNTTABOP_dump_table   3
 
#define GNTTABOP_transfer   4
 
#define GNTTABOP_copy   5
 
#define GNTTABOP_query_size   6
 
#define GNTTABOP_unmap_and_replace   7
 
#define _GNTCOPY_source_gref   (0)
 
#define GNTCOPY_source_gref   (1<<_GNTCOPY_source_gref)
 
#define _GNTCOPY_dest_gref   (1)
 
#define GNTCOPY_dest_gref   (1<<_GNTCOPY_dest_gref)
 
#define _GNTMAP_device_map   (0)
 
#define GNTMAP_device_map   (1<<_GNTMAP_device_map)
 
#define _GNTMAP_host_map   (1)
 
#define GNTMAP_host_map   (1<<_GNTMAP_host_map)
 
#define _GNTMAP_readonly   (2)
 
#define GNTMAP_readonly   (1<<_GNTMAP_readonly)
 
#define _GNTMAP_application_map   (3)
 
#define GNTMAP_application_map   (1<<_GNTMAP_application_map)
 
#define _GNTMAP_contains_pte   (4)
 
#define GNTMAP_contains_pte   (1<<_GNTMAP_contains_pte)
 
#define _GNTMAP_guest_avail0   (16)
 
#define GNTMAP_guest_avail_mask   ((uint32_t)~0 << _GNTMAP_guest_avail0)
 
#define GNTST_okay   (0) /* Normal return. */
 
#define GNTST_general_error   (-1) /* General undefined error. */
 
#define GNTST_bad_domain   (-2) /* Unrecognsed domain id. */
 
#define GNTST_bad_gntref   (-3) /* Unrecognised or inappropriate gntref. */
 
#define GNTST_bad_handle   (-4) /* Unrecognised or inappropriate handle. */
 
#define GNTST_bad_virt_addr   (-5) /* Inappropriate virtual address to map. */
 
#define GNTST_bad_dev_addr   (-6) /* Inappropriate device address to unmap.*/
 
#define GNTST_no_device_space   (-7) /* Out of space in I/O MMU. */
 
#define GNTST_permission_denied   (-8) /* Not enough privilege for operation. */
 
#define GNTST_bad_page   (-9) /* Specified page was invalid for op. */
 
#define GNTST_bad_copy_arg   (-10) /* copy arguments cross page boundary. */
 
#define GNTST_address_too_big   (-11) /* transfer page address too large. */
 
#define GNTST_eagain   (-12) /* Operation not done; try again. */
 
#define GNTST_no_space   (-13) /* Out of space (handles etc). */
 
#define GNTTABOP_error_msgs
 

Typedefs

typedef uint32_t grant_ref_t
 
typedef struct grant_entry_v1 grant_entry_v1_t
 
typedef uint32_t grant_handle_t
 
typedef struct gnttab_map_grant_ref gnttab_map_grant_ref_t
 
typedef struct gnttab_unmap_grant_ref gnttab_unmap_grant_ref_t
 
typedef struct gnttab_setup_table gnttab_setup_table_t
 
typedef struct gnttab_dump_table gnttab_dump_table_t
 
typedef struct gnttab_transfer gnttab_transfer_t
 
typedef struct gnttab_copy gnttab_copy_t
 
typedef struct gnttab_query_size gnttab_query_size_t
 
typedef struct gnttab_unmap_and_replace gnttab_unmap_and_replace_t
 

Functions

 FILE_LICENCE (MIT)
 
 DEFINE_XEN_GUEST_HANDLE (gnttab_map_grant_ref_t)
 
 DEFINE_XEN_GUEST_HANDLE (gnttab_unmap_grant_ref_t)
 
 DEFINE_XEN_GUEST_HANDLE (gnttab_setup_table_t)
 
 DEFINE_XEN_GUEST_HANDLE (gnttab_dump_table_t)
 
 DEFINE_XEN_GUEST_HANDLE (gnttab_transfer_t)
 
 DEFINE_XEN_GUEST_HANDLE (gnttab_copy_t)
 
 DEFINE_XEN_GUEST_HANDLE (gnttab_query_size_t)
 
 DEFINE_XEN_GUEST_HANDLE (gnttab_unmap_and_replace_t)
 

Macro Definition Documentation

◆ grant_entry_v1

#define grant_entry_v1   grant_entry

Definition at line 114 of file grant_table.h.

◆ grant_entry_v1_t

#define grant_entry_v1_t   grant_entry_t

Definition at line 115 of file grant_table.h.

◆ GNTTAB_NR_RESERVED_ENTRIES

#define GNTTAB_NR_RESERVED_ENTRIES   8

Definition at line 135 of file grant_table.h.

◆ GNTTAB_RESERVED_CONSOLE

#define GNTTAB_RESERVED_CONSOLE   0

Definition at line 136 of file grant_table.h.

◆ GNTTAB_RESERVED_XENSTORE

#define GNTTAB_RESERVED_XENSTORE   1

Definition at line 137 of file grant_table.h.

◆ GTF_invalid

#define GTF_invalid   (0U<<0)

Definition at line 148 of file grant_table.h.

◆ GTF_permit_access

#define GTF_permit_access   (1U<<0)

Definition at line 149 of file grant_table.h.

◆ GTF_accept_transfer

#define GTF_accept_transfer   (2U<<0)

Definition at line 150 of file grant_table.h.

◆ GTF_transitive

#define GTF_transitive   (3U<<0)

Definition at line 151 of file grant_table.h.

◆ GTF_type_mask

#define GTF_type_mask   (3U<<0)

Definition at line 152 of file grant_table.h.

◆ _GTF_readonly

#define _GTF_readonly   (2)

Definition at line 166 of file grant_table.h.

◆ GTF_readonly

#define GTF_readonly   (1U<<_GTF_readonly)

Definition at line 167 of file grant_table.h.

◆ _GTF_reading

#define _GTF_reading   (3)

Definition at line 168 of file grant_table.h.

◆ GTF_reading

#define GTF_reading   (1U<<_GTF_reading)

Definition at line 169 of file grant_table.h.

◆ _GTF_writing

#define _GTF_writing   (4)

Definition at line 170 of file grant_table.h.

◆ GTF_writing

#define GTF_writing   (1U<<_GTF_writing)

Definition at line 171 of file grant_table.h.

◆ _GTF_PWT

#define _GTF_PWT   (5)

Definition at line 172 of file grant_table.h.

◆ GTF_PWT

#define GTF_PWT   (1U<<_GTF_PWT)

Definition at line 173 of file grant_table.h.

◆ _GTF_PCD

#define _GTF_PCD   (6)

Definition at line 174 of file grant_table.h.

◆ GTF_PCD

#define GTF_PCD   (1U<<_GTF_PCD)

Definition at line 175 of file grant_table.h.

◆ _GTF_PAT

#define _GTF_PAT   (7)

Definition at line 176 of file grant_table.h.

◆ GTF_PAT

#define GTF_PAT   (1U<<_GTF_PAT)

Definition at line 177 of file grant_table.h.

◆ _GTF_sub_page

#define _GTF_sub_page   (8)

Definition at line 178 of file grant_table.h.

◆ GTF_sub_page

#define GTF_sub_page   (1U<<_GTF_sub_page)

Definition at line 179 of file grant_table.h.

◆ _GTF_transfer_committed

#define _GTF_transfer_committed   (2)

Definition at line 191 of file grant_table.h.

◆ GTF_transfer_committed

#define GTF_transfer_committed   (1U<<_GTF_transfer_committed)

Definition at line 192 of file grant_table.h.

◆ _GTF_transfer_completed

#define _GTF_transfer_completed   (3)

Definition at line 193 of file grant_table.h.

◆ GTF_transfer_completed

#define GTF_transfer_completed   (1U<<_GTF_transfer_completed)

Definition at line 194 of file grant_table.h.

◆ GNTTABOP_map_grant_ref

#define GNTTABOP_map_grant_ref   0

Definition at line 289 of file grant_table.h.

◆ GNTTABOP_unmap_grant_ref

#define GNTTABOP_unmap_grant_ref   1

Definition at line 290 of file grant_table.h.

◆ GNTTABOP_setup_table

#define GNTTABOP_setup_table   2

Definition at line 291 of file grant_table.h.

◆ GNTTABOP_dump_table

#define GNTTABOP_dump_table   3

Definition at line 292 of file grant_table.h.

◆ GNTTABOP_transfer

#define GNTTABOP_transfer   4

Definition at line 293 of file grant_table.h.

◆ GNTTABOP_copy

#define GNTTABOP_copy   5

Definition at line 294 of file grant_table.h.

◆ GNTTABOP_query_size

#define GNTTABOP_query_size   6

Definition at line 295 of file grant_table.h.

◆ GNTTABOP_unmap_and_replace

#define GNTTABOP_unmap_and_replace   7

Definition at line 296 of file grant_table.h.

◆ _GNTCOPY_source_gref

#define _GNTCOPY_source_gref   (0)

Definition at line 440 of file grant_table.h.

◆ GNTCOPY_source_gref

#define GNTCOPY_source_gref   (1<<_GNTCOPY_source_gref)

Definition at line 441 of file grant_table.h.

◆ _GNTCOPY_dest_gref

#define _GNTCOPY_dest_gref   (1)

Definition at line 442 of file grant_table.h.

◆ GNTCOPY_dest_gref

#define GNTCOPY_dest_gref   (1<<_GNTCOPY_dest_gref)

Definition at line 443 of file grant_table.h.

◆ _GNTMAP_device_map

#define _GNTMAP_device_map   (0)

Definition at line 593 of file grant_table.h.

◆ GNTMAP_device_map

#define GNTMAP_device_map   (1<<_GNTMAP_device_map)

Definition at line 594 of file grant_table.h.

◆ _GNTMAP_host_map

#define _GNTMAP_host_map   (1)

Definition at line 596 of file grant_table.h.

◆ GNTMAP_host_map

#define GNTMAP_host_map   (1<<_GNTMAP_host_map)

Definition at line 597 of file grant_table.h.

◆ _GNTMAP_readonly

#define _GNTMAP_readonly   (2)

Definition at line 599 of file grant_table.h.

◆ GNTMAP_readonly

#define GNTMAP_readonly   (1<<_GNTMAP_readonly)

Definition at line 600 of file grant_table.h.

◆ _GNTMAP_application_map

#define _GNTMAP_application_map   (3)

Definition at line 606 of file grant_table.h.

◆ GNTMAP_application_map

#define GNTMAP_application_map   (1<<_GNTMAP_application_map)

Definition at line 607 of file grant_table.h.

◆ _GNTMAP_contains_pte

#define _GNTMAP_contains_pte   (4)

Definition at line 614 of file grant_table.h.

◆ GNTMAP_contains_pte

#define GNTMAP_contains_pte   (1<<_GNTMAP_contains_pte)

Definition at line 615 of file grant_table.h.

◆ _GNTMAP_guest_avail0

#define _GNTMAP_guest_avail0   (16)

Definition at line 621 of file grant_table.h.

◆ GNTMAP_guest_avail_mask

#define GNTMAP_guest_avail_mask   ((uint32_t)~0 << _GNTMAP_guest_avail0)

Definition at line 622 of file grant_table.h.

◆ GNTST_okay

#define GNTST_okay   (0) /* Normal return. */

Definition at line 628 of file grant_table.h.

◆ GNTST_general_error

#define GNTST_general_error   (-1) /* General undefined error. */

Definition at line 629 of file grant_table.h.

◆ GNTST_bad_domain

#define GNTST_bad_domain   (-2) /* Unrecognsed domain id. */

Definition at line 630 of file grant_table.h.

◆ GNTST_bad_gntref

#define GNTST_bad_gntref   (-3) /* Unrecognised or inappropriate gntref. */

Definition at line 631 of file grant_table.h.

◆ GNTST_bad_handle

#define GNTST_bad_handle   (-4) /* Unrecognised or inappropriate handle. */

Definition at line 632 of file grant_table.h.

◆ GNTST_bad_virt_addr

#define GNTST_bad_virt_addr   (-5) /* Inappropriate virtual address to map. */

Definition at line 633 of file grant_table.h.

◆ GNTST_bad_dev_addr

#define GNTST_bad_dev_addr   (-6) /* Inappropriate device address to unmap.*/

Definition at line 634 of file grant_table.h.

◆ GNTST_no_device_space

#define GNTST_no_device_space   (-7) /* Out of space in I/O MMU. */

Definition at line 635 of file grant_table.h.

◆ GNTST_permission_denied

#define GNTST_permission_denied   (-8) /* Not enough privilege for operation. */

Definition at line 636 of file grant_table.h.

◆ GNTST_bad_page

#define GNTST_bad_page   (-9) /* Specified page was invalid for op. */

Definition at line 637 of file grant_table.h.

◆ GNTST_bad_copy_arg

#define GNTST_bad_copy_arg   (-10) /* copy arguments cross page boundary. */

Definition at line 638 of file grant_table.h.

◆ GNTST_address_too_big

#define GNTST_address_too_big   (-11) /* transfer page address too large. */

Definition at line 639 of file grant_table.h.

◆ GNTST_eagain

#define GNTST_eagain   (-12) /* Operation not done; try again. */

Definition at line 640 of file grant_table.h.

◆ GNTST_no_space

#define GNTST_no_space   (-13) /* Out of space (handles etc). */

Definition at line 641 of file grant_table.h.

◆ GNTTABOP_error_msgs

#define GNTTABOP_error_msgs
Value:
{ \
"okay", \
"undefined error", \
"unrecognised domain id", \
"invalid grant reference", \
"invalid mapping handle", \
"invalid virtual address", \
"invalid device address", \
"no spare translation slot in the I/O MMU", \
"permission denied", \
"bad page", \
"copy arguments cross page boundary", \
"page address size too large", \
"operation not done; try again", \
"out of space", \
}

Definition at line 644 of file grant_table.h.

Typedef Documentation

◆ grant_ref_t

Definition at line 99 of file grant_table.h.

◆ grant_entry_v1_t

Definition at line 130 of file grant_table.h.

◆ grant_handle_t

Definition at line 309 of file grant_table.h.

◆ gnttab_map_grant_ref_t

Definition at line 339 of file grant_table.h.

◆ gnttab_unmap_grant_ref_t

Definition at line 361 of file grant_table.h.

◆ gnttab_setup_table_t

Definition at line 385 of file grant_table.h.

◆ gnttab_dump_table_t

Definition at line 398 of file grant_table.h.

◆ gnttab_transfer_t

Definition at line 418 of file grant_table.h.

◆ gnttab_copy_t

typedef struct gnttab_copy gnttab_copy_t

Definition at line 460 of file grant_table.h.

◆ gnttab_query_size_t

Definition at line 478 of file grant_table.h.

◆ gnttab_unmap_and_replace_t

Definition at line 500 of file grant_table.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( MIT  )

◆ DEFINE_XEN_GUEST_HANDLE() [1/8]

DEFINE_XEN_GUEST_HANDLE ( gnttab_map_grant_ref_t  )

◆ DEFINE_XEN_GUEST_HANDLE() [2/8]

DEFINE_XEN_GUEST_HANDLE ( gnttab_unmap_grant_ref_t  )

◆ DEFINE_XEN_GUEST_HANDLE() [3/8]

DEFINE_XEN_GUEST_HANDLE ( gnttab_setup_table_t  )

◆ DEFINE_XEN_GUEST_HANDLE() [4/8]

DEFINE_XEN_GUEST_HANDLE ( gnttab_dump_table_t  )

◆ DEFINE_XEN_GUEST_HANDLE() [5/8]

DEFINE_XEN_GUEST_HANDLE ( gnttab_transfer_t  )

◆ DEFINE_XEN_GUEST_HANDLE() [6/8]

DEFINE_XEN_GUEST_HANDLE ( gnttab_copy_t  )

◆ DEFINE_XEN_GUEST_HANDLE() [7/8]

DEFINE_XEN_GUEST_HANDLE ( gnttab_query_size_t  )

◆ DEFINE_XEN_GUEST_HANDLE() [8/8]

DEFINE_XEN_GUEST_HANDLE ( gnttab_unmap_and_replace_t  )