Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
grant_table.h File Reference
#include "xen.h"

Go to the source code of this file.

Data Structures

struct  grant_entry
 
struct  gnttab_map_grant_ref
 
struct  gnttab_unmap_grant_ref
 
struct  gnttab_setup_table
 

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   (1U << _GTF_readonly)
 
#define GTF_reading   (1U << _GTF_reading)
 
#define GTF_writing   (1U << _GTF_writing)
 
#define GTF_PWT   (1U << _GTF_PWT)
 
#define GTF_PCD   (1U << _GTF_PCD)
 
#define GTF_PAT   (1U << _GTF_PAT)
 
#define GTF_sub_page   (1U << _GTF_sub_page)
 
#define GTF_transfer_committed   (1U << _GTF_transfer_committed)
 
#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 GNTMAP_device_map   (1<<_GNTMAP_device_map)
 
#define GNTMAP_host_map   (1<<_GNTMAP_host_map)
 
#define GNTMAP_readonly   (1<<_GNTMAP_readonly)
 
#define GNTMAP_application_map   (1<<_GNTMAP_application_map)
 
#define GNTMAP_contains_pte   (1<<_GNTMAP_contains_pte)
 
#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 GNTTABOP_error_msgs
 

Typedefs

typedef uint32_t grant_ref_t
 
typedef struct grant_entry grant_entry_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
 

Functions

 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)
 

Macro Definition Documentation

◆ GNTMAP_application_map

#define GNTMAP_application_map   (1<<_GNTMAP_application_map)

◆ GNTMAP_contains_pte

#define GNTMAP_contains_pte   (1<<_GNTMAP_contains_pte)

◆ GNTMAP_device_map

#define GNTMAP_device_map   (1<<_GNTMAP_device_map)

◆ GNTMAP_guest_avail_mask

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

◆ GNTMAP_host_map

#define GNTMAP_host_map   (1<<_GNTMAP_host_map)

◆ GNTMAP_readonly

#define GNTMAP_readonly   (1<<_GNTMAP_readonly)

◆ GNTST_address_too_big

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

◆ GNTST_bad_copy_arg

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

◆ GNTST_bad_dev_addr

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

◆ GNTST_bad_domain

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

◆ GNTST_bad_gntref

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

◆ GNTST_bad_handle

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

◆ GNTST_bad_page

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

◆ GNTST_bad_virt_addr

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

◆ GNTST_eagain

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

◆ GNTST_general_error

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

◆ GNTST_no_device_space

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

◆ GNTST_okay

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

◆ GNTST_permission_denied

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

◆ GNTTAB_NR_RESERVED_ENTRIES

#define GNTTAB_NR_RESERVED_ENTRIES   8

◆ GNTTAB_RESERVED_CONSOLE

#define GNTTAB_RESERVED_CONSOLE   0

◆ GNTTAB_RESERVED_XENSTORE

#define GNTTAB_RESERVED_XENSTORE   1

◆ GNTTABOP_copy

#define GNTTABOP_copy   5

◆ GNTTABOP_dump_table

#define GNTTABOP_dump_table   3

◆ 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" \
}

◆ GNTTABOP_map_grant_ref

#define GNTTABOP_map_grant_ref   0

◆ GNTTABOP_query_size

#define GNTTABOP_query_size   6

◆ GNTTABOP_setup_table

#define GNTTABOP_setup_table   2

◆ GNTTABOP_transfer

#define GNTTABOP_transfer   4

◆ GNTTABOP_unmap_and_replace

#define GNTTABOP_unmap_and_replace   7

◆ GNTTABOP_unmap_grant_ref

#define GNTTABOP_unmap_grant_ref   1

◆ grant_entry_v1

#define grant_entry_v1   grant_entry

◆ grant_entry_v1_t

#define grant_entry_v1_t   grant_entry_t

◆ GTF_accept_transfer

#define GTF_accept_transfer   (2U << 0)

◆ GTF_invalid

#define GTF_invalid   (0U << 0)

◆ GTF_PAT

#define GTF_PAT   (1U << _GTF_PAT)

◆ GTF_PCD

#define GTF_PCD   (1U << _GTF_PCD)

◆ GTF_permit_access

#define GTF_permit_access   (1U << 0)

◆ GTF_PWT

#define GTF_PWT   (1U << _GTF_PWT)

◆ GTF_reading

#define GTF_reading   (1U << _GTF_reading)

◆ GTF_readonly

#define GTF_readonly   (1U << _GTF_readonly)

◆ GTF_sub_page

#define GTF_sub_page   (1U << _GTF_sub_page)

◆ GTF_transfer_committed

#define GTF_transfer_committed   (1U << _GTF_transfer_committed)

◆ GTF_transfer_completed

#define GTF_transfer_completed   (1U << _GTF_transfer_completed)

◆ GTF_transitive

#define GTF_transitive   (3U << 0)

◆ GTF_type_mask

#define GTF_type_mask   (3U << 0)

◆ GTF_writing

#define GTF_writing   (1U << _GTF_writing)

Typedef Documentation

◆ gnttab_map_grant_ref_t

◆ gnttab_setup_table_t

◆ gnttab_unmap_grant_ref_t

◆ grant_entry_t

typedef struct grant_entry grant_entry_t

◆ grant_handle_t

◆ grant_ref_t

Function Documentation

◆ DEFINE_XEN_GUEST_HANDLE() [1/3]

DEFINE_XEN_GUEST_HANDLE ( gnttab_map_grant_ref_t  )

◆ DEFINE_XEN_GUEST_HANDLE() [2/3]

DEFINE_XEN_GUEST_HANDLE ( gnttab_setup_table_t  )

◆ DEFINE_XEN_GUEST_HANDLE() [3/3]

DEFINE_XEN_GUEST_HANDLE ( gnttab_unmap_grant_ref_t  )