Lines Matching +full:grant +full:- +full:dma
6 * 2. Accessing others' memory reservations via grant references.
7 * (i.e., mechanisms for both sender and recipient of grant references)
9 * Copyright (c) 2004-2005, K A Fraser
50 #include <linux/page-flags.h>
54 * Technically there's no reliably invalid grant reference or grant handle,
57 #define INVALID_GRANT_REF ((grant_ref_t)-1)
58 #define INVALID_GRANT_HANDLE ((grant_handle_t)-1)
94 * End access through the given grant reference, iff the grant entry is no
95 * longer in use. Return 1 if the grant entry was freed, 0 if it is still in
101 * Eventually end access through the given grant reference, and once that
103 * immediately iff the grant entry is not in use, otherwise it will happen
110 * the grant is no longer in use.
118 * End access through the given grant reference, iff the grant entry is
120 * grant reference is deallocated.
121 * Return 1 if the grant entry was freed, 0 if it is still in use.
126 * operations on reserved batches of grant references
166 map->host_addr = addr; in gnttab_set_map_op()
168 map->host_addr = __pa(addr); in gnttab_set_map_op()
170 map->host_addr = addr; in gnttab_set_map_op()
172 map->flags = flags; in gnttab_set_map_op()
173 map->ref = ref; in gnttab_set_map_op()
174 map->dom = domid; in gnttab_set_map_op()
175 map->status = 1; /* arbitrary positive value */ in gnttab_set_map_op()
183 unmap->host_addr = addr; in gnttab_set_unmap_op()
185 unmap->host_addr = __pa(addr); in gnttab_set_unmap_op()
187 unmap->host_addr = addr; in gnttab_set_unmap_op()
189 unmap->handle = handle; in gnttab_set_unmap_op()
190 unmap->dev_bus_addr = 0; in gnttab_set_unmap_op()
236 /* Device for which DMA memory will be/was allocated. */
238 /* If set then DMA buffer is coherent and write-combine otherwise. */
265 /* Perform a batch of grant map/copy operations. Retry every batch slot
288 return (struct xen_page_foreign *)page->private; in xen_page_foreign()
291 return (struct xen_page_foreign *)&page->private; in xen_page_foreign()
295 /* Split Linux page in chunk of the size of the grant and call fn
299 * offset: offset in the grant
300 * len: length of the data in the grant.
312 /* Helper to get to call fn only on the first "grant chunk" */
317 /* The first request is limited to the size of one grant */ in gnttab_for_one_grant()
318 len = min_t(unsigned int, XEN_PAGE_SIZE - (offset & ~XEN_PAGE_MASK), in gnttab_for_one_grant()
324 /* Get @nr_grefs grants from an array of page and call fn for each grant */
330 /* Get the number of grant in a specified region