11 #ifndef __XEN_PUBLIC_GRANT_TABLE_H__ 12 #define __XEN_PUBLIC_GRANT_TABLE_H__ 113 #if __XEN_INTERFACE_VERSION__ < 0x0003020a 114 #define grant_entry_v1 grant_entry 115 #define grant_entry_v1_t grant_entry_t 135 #define GNTTAB_NR_RESERVED_ENTRIES 8 136 #define GNTTAB_RESERVED_CONSOLE 0 137 #define GNTTAB_RESERVED_XENSTORE 1 148 #define GTF_invalid (0U<<0) 149 #define GTF_permit_access (1U<<0) 150 #define GTF_accept_transfer (2U<<0) 151 #define GTF_transitive (3U<<0) 152 #define GTF_type_mask (3U<<0) 166 #define _GTF_readonly (2) 167 #define GTF_readonly (1U<<_GTF_readonly) 168 #define _GTF_reading (3) 169 #define GTF_reading (1U<<_GTF_reading) 170 #define _GTF_writing (4) 171 #define GTF_writing (1U<<_GTF_writing) 173 #define GTF_PWT (1U<<_GTF_PWT) 175 #define GTF_PCD (1U<<_GTF_PCD) 177 #define GTF_PAT (1U<<_GTF_PAT) 178 #define _GTF_sub_page (8) 179 #define GTF_sub_page (1U<<_GTF_sub_page) 191 #define _GTF_transfer_committed (2) 192 #define GTF_transfer_committed (1U<<_GTF_transfer_committed) 193 #define _GTF_transfer_completed (3) 194 #define GTF_transfer_completed (1U<<_GTF_transfer_completed) 205 #if __XEN_INTERFACE_VERSION__ >= 0x0003020a 211 struct grant_entry_header {
215 typedef struct grant_entry_header grant_entry_header_t;
220 union grant_entry_v2 {
221 grant_entry_header_t
hdr;
233 grant_entry_header_t
hdr;
244 grant_entry_header_t
hdr;
260 grant_entry_header_t
hdr;
268 typedef union grant_entry_v2 grant_entry_v2_t;
289 #define GNTTABOP_map_grant_ref 0 290 #define GNTTABOP_unmap_grant_ref 1 291 #define GNTTABOP_setup_table 2 292 #define GNTTABOP_dump_table 3 293 #define GNTTABOP_transfer 4 294 #define GNTTABOP_copy 5 295 #define GNTTABOP_query_size 6 296 #define GNTTABOP_unmap_and_replace 7 297 #if __XEN_INTERFACE_VERSION__ >= 0x0003020a 298 #define GNTTABOP_set_version 8 299 #define GNTTABOP_get_status_frames 9 300 #define GNTTABOP_get_version 10 301 #define GNTTABOP_swap_grant_ref 11 302 #define GNTTABOP_cache_flush 12 379 #if __XEN_INTERFACE_VERSION__ < 0x00040300 440 #define _GNTCOPY_source_gref (0) 441 #define GNTCOPY_source_gref (1<<_GNTCOPY_source_gref) 442 #define _GNTCOPY_dest_gref (1) 443 #define GNTCOPY_dest_gref (1<<_GNTCOPY_dest_gref) 503 #if __XEN_INTERFACE_VERSION__ >= 0x0003020a 510 struct gnttab_set_version {
514 typedef struct gnttab_set_version gnttab_set_version_t;
530 struct gnttab_get_status_frames {
538 typedef struct gnttab_get_status_frames gnttab_get_status_frames_t;
545 struct gnttab_get_version {
552 typedef struct gnttab_get_version gnttab_get_version_t;
558 struct gnttab_swap_grant_ref {
565 typedef struct gnttab_swap_grant_ref gnttab_swap_grant_ref_t;
572 struct gnttab_cache_flush {
579 #define GNTTAB_CACHE_CLEAN (1u<<0) 580 #define GNTTAB_CACHE_INVAL (1u<<1) 581 #define GNTTAB_CACHE_SOURCE_GREF (1u<<31) 584 typedef struct gnttab_cache_flush gnttab_cache_flush_t;
593 #define _GNTMAP_device_map (0) 594 #define GNTMAP_device_map (1<<_GNTMAP_device_map) 596 #define _GNTMAP_host_map (1) 597 #define GNTMAP_host_map (1<<_GNTMAP_host_map) 599 #define _GNTMAP_readonly (2) 600 #define GNTMAP_readonly (1<<_GNTMAP_readonly) 606 #define _GNTMAP_application_map (3) 607 #define GNTMAP_application_map (1<<_GNTMAP_application_map) 614 #define _GNTMAP_contains_pte (4) 615 #define GNTMAP_contains_pte (1<<_GNTMAP_contains_pte) 621 #define _GNTMAP_guest_avail0 (16) 622 #define GNTMAP_guest_avail_mask ((uint32_t)~0 << _GNTMAP_guest_avail0) 628 #define GNTST_okay (0) 629 #define GNTST_general_error (-1) 630 #define GNTST_bad_domain (-2) 631 #define GNTST_bad_gntref (-3) 632 #define GNTST_bad_handle (-4) 633 #define GNTST_bad_virt_addr (-5) 634 #define GNTST_bad_dev_addr (-6) 635 #define GNTST_no_device_space (-7) 636 #define GNTST_permission_denied (-8) 637 #define GNTST_bad_page (-9) 638 #define GNTST_bad_copy_arg (-10) 639 #define GNTST_address_too_big (-11) 640 #define GNTST_eagain (-12) 641 #define GNTST_no_space (-13) 644 #define GNTTABOP_error_msgs { \ 647 "unrecognised domain id", \ 648 "invalid grant reference", \ 649 "invalid mapping handle", \ 650 "invalid virtual address", \ 651 "invalid device address", \ 652 "no spare translation slot in the I/O MMU", \ 653 "permission denied", \ 655 "copy arguments cross page boundary", \ 656 "page address size too large", \ 657 "operation not done; try again", \
DEFINE_XEN_GUEST_HANDLE(gnttab_map_grant_ref_t)
struct golan_inbox_hdr hdr
Message header.
unsigned long long uint64_t
union gnttab_copy::gnttab_copy_ptr::@661 u
XEN_GUEST_HANDLE(ulong) frame_list
struct gnttab_copy::gnttab_copy_ptr dest
u32 version
Driver version.
static grant_ref_t domid_t domid
static uint16_t struct vmbus_xfer_pages_operations * op
struct gnttab_copy::gnttab_copy_ptr source
uint16_t offset
Offset to command line.
static const char grant_ref_t ref
#define XEN_GUEST_HANDLE(name)