Changeset View
Changeset View
Standalone View
Standalone View
sys/xen/interface/grant_table.h
Show First 20 Lines • Show All 160 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
#define GTF_invalid (0U<<0) | #define GTF_invalid (0U<<0) | ||||
#define GTF_permit_access (1U<<0) | #define GTF_permit_access (1U<<0) | ||||
#define GTF_accept_transfer (2U<<0) | #define GTF_accept_transfer (2U<<0) | ||||
#define GTF_transitive (3U<<0) | #define GTF_transitive (3U<<0) | ||||
#define GTF_type_mask (3U<<0) | #define GTF_type_mask (3U<<0) | ||||
/* | /* | ||||
* Subflags for GTF_permit_access. | * Subflags for GTF_permit_access and GTF_transitive. | ||||
* GTF_readonly: Restrict @domid to read-only mappings and accesses. [GST] | * GTF_readonly: Restrict @domid to read-only mappings and accesses. [GST] | ||||
* GTF_reading: Grant entry is currently mapped for reading by @domid. [XEN] | * GTF_reading: Grant entry is currently mapped for reading by @domid. [XEN] | ||||
* GTF_writing: Grant entry is currently mapped for writing by @domid. [XEN] | * GTF_writing: Grant entry is currently mapped for writing by @domid. [XEN] | ||||
* GTF_PAT, GTF_PWT, GTF_PCD: (x86) cache attribute flags for the grant [GST] | * Further subflags for GTF_permit_access only. | ||||
* GTF_PAT, GTF_PWT, GTF_PCD: (x86) cache attribute flags to be used for | |||||
* mappings of the grant [GST] | |||||
* GTF_sub_page: Grant access to only a subrange of the page. @domid | * GTF_sub_page: Grant access to only a subrange of the page. @domid | ||||
* will only be allowed to copy from the grant, and not | * will only be allowed to copy from the grant, and not | ||||
* map it. [GST] | * map it. [GST] | ||||
*/ | */ | ||||
#define _GTF_readonly (2) | #define _GTF_readonly (2) | ||||
#define GTF_readonly (1U<<_GTF_readonly) | #define GTF_readonly (1U<<_GTF_readonly) | ||||
#define _GTF_reading (3) | #define _GTF_reading (3) | ||||
#define GTF_reading (1U<<_GTF_reading) | #define GTF_reading (1U<<_GTF_reading) | ||||
▲ Show 20 Lines • Show All 439 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* GNTMAP_contains_pte subflag: | * GNTMAP_contains_pte subflag: | ||||
* 0 => This map request contains a host virtual address. | * 0 => This map request contains a host virtual address. | ||||
* 1 => This map request contains the machine addess of the PTE to update. | * 1 => This map request contains the machine addess of the PTE to update. | ||||
*/ | */ | ||||
#define _GNTMAP_contains_pte (4) | #define _GNTMAP_contains_pte (4) | ||||
#define GNTMAP_contains_pte (1<<_GNTMAP_contains_pte) | #define GNTMAP_contains_pte (1<<_GNTMAP_contains_pte) | ||||
#define _GNTMAP_can_fail (5) | |||||
#define GNTMAP_can_fail (1<<_GNTMAP_can_fail) | |||||
/* | /* | ||||
* Bits to be placed in guest kernel available PTE bits (architecture | * Bits to be placed in guest kernel available PTE bits (architecture | ||||
* dependent; only supported when XENFEAT_gnttab_map_avail_bits is set). | * dependent; only supported when XENFEAT_gnttab_map_avail_bits is set). | ||||
*/ | */ | ||||
#define _GNTMAP_guest_avail0 (16) | #define _GNTMAP_guest_avail0 (16) | ||||
#define GNTMAP_guest_avail_mask ((uint32_t)~0 << _GNTMAP_guest_avail0) | #define GNTMAP_guest_avail_mask ((uint32_t)~0 << _GNTMAP_guest_avail0) | ||||
/* | /* | ||||
* Values for error status returns. All errors are -ve. | * Values for error status returns. All errors are -ve. | ||||
*/ | */ | ||||
/* ` enum grant_status { */ | /* ` enum grant_status { */ | ||||
#define GNTST_okay (0) /* Normal return. */ | #define GNTST_okay (0) /* Normal return. */ | ||||
#define GNTST_general_error (-1) /* General undefined error. */ | #define GNTST_general_error (-1) /* General undefined error. */ | ||||
#define GNTST_bad_domain (-2) /* Unrecognsed domain id. */ | #define GNTST_bad_domain (-2) /* Unrecognsed domain id. */ | ||||
#define GNTST_bad_gntref (-3) /* Unrecognised or inappropriate gntref. */ | #define GNTST_bad_gntref (-3) /* Unrecognised or inappropriate gntref. */ | ||||
#define GNTST_bad_handle (-4) /* Unrecognised or inappropriate handle. */ | #define GNTST_bad_handle (-4) /* Unrecognised or inappropriate handle. */ | ||||
#define GNTST_bad_virt_addr (-5) /* Inappropriate virtual address to map. */ | #define GNTST_bad_virt_addr (-5) /* Inappropriate virtual address to map. */ | ||||
#define GNTST_bad_dev_addr (-6) /* Inappropriate device address to unmap.*/ | #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_no_device_space (-7) /* Out of space in I/O MMU. */ | ||||
#define GNTST_permission_denied (-8) /* Not enough privilege for operation. */ | #define GNTST_permission_denied (-8) /* Not enough privilege for operation. */ | ||||
#define GNTST_bad_page (-9) /* Specified page was invalid for op. */ | #define GNTST_bad_page (-9) /* Specified page was invalid for op. */ | ||||
#define GNTST_bad_copy_arg (-10) /* copy arguments cross page boundary. */ | #define GNTST_bad_copy_arg (-10) /* copy arguments cross page boundary. */ | ||||
#define GNTST_address_too_big (-11) /* transfer page address too large. */ | #define GNTST_address_too_big (-11) /* transfer page address too large. */ | ||||
#define GNTST_eagain (-12) /* Operation not done; try again. */ | #define GNTST_eagain (-12) /* Operation not done; try again. */ | ||||
#define GNTST_no_space (-13) /* Out of space (handles etc). */ | |||||
/* ` } */ | /* ` } */ | ||||
#define GNTTABOP_error_msgs { \ | #define GNTTABOP_error_msgs { \ | ||||
"okay", \ | "okay", \ | ||||
"undefined error", \ | "undefined error", \ | ||||
"unrecognised domain id", \ | "unrecognised domain id", \ | ||||
"invalid grant reference", \ | "invalid grant reference", \ | ||||
"invalid mapping handle", \ | "invalid mapping handle", \ | ||||
"invalid virtual address", \ | "invalid virtual address", \ | ||||
"invalid device address", \ | "invalid device address", \ | ||||
"no spare translation slot in the I/O MMU", \ | "no spare translation slot in the I/O MMU", \ | ||||
"permission denied", \ | "permission denied", \ | ||||
"bad page", \ | "bad page", \ | ||||
"copy arguments cross page boundary", \ | "copy arguments cross page boundary", \ | ||||
"page address size too large", \ | "page address size too large", \ | ||||
"operation not done; try again" \ | "operation not done; try again", \ | ||||
"out of space", \ | |||||
} | } | ||||
#endif /* __XEN_PUBLIC_GRANT_TABLE_H__ */ | #endif /* __XEN_PUBLIC_GRANT_TABLE_H__ */ | ||||
/* | /* | ||||
* Local variables: | * Local variables: | ||||
* mode: C | * mode: C | ||||
* c-file-style: "BSD" | * c-file-style: "BSD" | ||||
* c-basic-offset: 4 | * c-basic-offset: 4 | ||||
* tab-width: 4 | * tab-width: 4 | ||||
* indent-tabs-mode: nil | * indent-tabs-mode: nil | ||||
* End: | * End: | ||||
*/ | */ |