30#ifndef __XEN_PUBLIC_GRANT_TABLE_H__
31#define __XEN_PUBLIC_GRANT_TABLE_H__
129#if __XEN_INTERFACE_VERSION__ < 0x0003020a
130#define grant_entry_v1 grant_entry
131#define grant_entry_v1_t grant_entry_t
151#define GNTTAB_NR_RESERVED_ENTRIES 8
152#define GNTTAB_RESERVED_CONSOLE 0
153#define GNTTAB_RESERVED_XENSTORE 1
164#define GTF_invalid (0U << 0)
165#define GTF_permit_access (1U << 0)
166#define GTF_accept_transfer (2U << 0)
167#define GTF_transitive (3U << 0)
168#define GTF_type_mask (3U << 0)
182#define _GTF_readonly (2)
183#define GTF_readonly (1U << _GTF_readonly)
184#define _GTF_reading (3)
185#define GTF_reading (1U << _GTF_reading)
186#define _GTF_writing (4)
187#define GTF_writing (1U << _GTF_writing)
189#define GTF_PWT (1U << _GTF_PWT)
191#define GTF_PCD (1U << _GTF_PCD)
193#define GTF_PAT (1U << _GTF_PAT)
194#define _GTF_sub_page (8)
195#define GTF_sub_page (1U << _GTF_sub_page)
207#define _GTF_transfer_committed (2)
208#define GTF_transfer_committed (1U << _GTF_transfer_committed)
209#define _GTF_transfer_completed (3)
210#define GTF_transfer_completed (1U << _GTF_transfer_completed)
227#define GNTTABOP_map_grant_ref 0
228#define GNTTABOP_unmap_grant_ref 1
229#define GNTTABOP_setup_table 2
230#define GNTTABOP_dump_table 3
231#define GNTTABOP_transfer 4
232#define GNTTABOP_copy 5
233#define GNTTABOP_query_size 6
234#define GNTTABOP_unmap_and_replace 7
235#if __XEN_INTERFACE_VERSION__ >= 0x0003020a
236#define GNTTABOP_set_version 8
237#define GNTTABOP_get_status_frames 9
238#define GNTTABOP_get_version 10
239#define GNTTABOP_swap_grant_ref 11
240#define GNTTABOP_cache_flush 12
318#if __XEN_INTERFACE_VERSION__ < 0x00040300
333#define _GNTMAP_device_map (0)
334#define GNTMAP_device_map (1<<_GNTMAP_device_map)
336#define _GNTMAP_host_map (1)
337#define GNTMAP_host_map (1<<_GNTMAP_host_map)
339#define _GNTMAP_readonly (2)
340#define GNTMAP_readonly (1<<_GNTMAP_readonly)
346#define _GNTMAP_application_map (3)
347#define GNTMAP_application_map (1<<_GNTMAP_application_map)
354#define _GNTMAP_contains_pte (4)
355#define GNTMAP_contains_pte (1<<_GNTMAP_contains_pte)
361#define _GNTMAP_guest_avail0 (16)
362#define GNTMAP_guest_avail_mask ((uint32_t)~0 << _GNTMAP_guest_avail0)
368#define GNTST_okay (0)
369#define GNTST_general_error (-1)
370#define GNTST_bad_domain (-2)
371#define GNTST_bad_gntref (-3)
372#define GNTST_bad_handle (-4)
373#define GNTST_bad_virt_addr (-5)
374#define GNTST_bad_dev_addr (-6)
375#define GNTST_no_device_space (-7)
376#define GNTST_permission_denied (-8)
377#define GNTST_bad_page (-9)
378#define GNTST_bad_copy_arg (-10)
379#define GNTST_address_too_big (-11)
380#define GNTST_eagain (-12)
383#define GNTTABOP_error_msgs { \
386 "unrecognised domain id", \
387 "invalid grant reference", \
388 "invalid mapping handle", \
389 "invalid virtual address", \
390 "invalid device address", \
391 "no spare translation slot in the I/O MMU", \
392 "permission denied", \
394 "copy arguments cross page boundary", \
395 "page address size too large", \
396 "operation not done; try again" \
uint64_t xen_pfn_t
Definition: arch-arm.h:204
#define XEN_GUEST_HANDLE(name)
Definition: arch-arm.h:194
#define DEFINE_XEN_GUEST_HANDLE(name)
Definition: arch-arm.h:192
uint32_t grant_handle_t
Definition: grant_table.h:247
#define grant_entry_v1_t
Definition: grant_table.h:131
#define grant_entry_v1
Definition: grant_table.h:130
uint32_t grant_ref_t
Definition: grant_table.h:116
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT64_TYPE__ uint64_t
Definition: stdint.h:91
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
__INT16_TYPE__ int16_t
Definition: stdint.h:73
Definition: grant_table.h:266
uint32_t flags
Definition: grant_table.h:269
domid_t dom
Definition: grant_table.h:271
uint64_t host_addr
Definition: grant_table.h:268
grant_handle_t handle
Definition: grant_table.h:274
int16_t status
Definition: grant_table.h:273
uint64_t dev_bus_addr
Definition: grant_table.h:275
grant_ref_t ref
Definition: grant_table.h:270
Definition: grant_table.h:311
uint32_t nr_frames
Definition: grant_table.h:314
domid_t dom
Definition: grant_table.h:313
XEN_GUEST_HANDLE(ulong) frame_list
int16_t status
Definition: grant_table.h:317
Definition: grant_table.h:291
grant_handle_t handle
Definition: grant_table.h:295
uint64_t host_addr
Definition: grant_table.h:293
uint64_t dev_bus_addr
Definition: grant_table.h:294
int16_t status
Definition: grant_table.h:297
domid_t domid
Definition: grant_table.h:137
uint32_t frame
Definition: grant_table.h:144
uint16_t flags
Definition: grant_table.h:135
uint16_t domid_t
Definition: xen.h:217