1 /******************************************************************************
4 * Interface to /dev/xen/gntalloc.
6 * Author: Daniel De Graaf <dgdegra@tycho.nsa.gov>
8 * This file is in the public domain.
11 #ifndef __LINUX_PUBLIC_GNTALLOC_H__
12 #define __LINUX_PUBLIC_GNTALLOC_H__
15 * Allocates a new page and creates a new grant reference.
17 #define IOCTL_GNTALLOC_ALLOC_GREF \
18 _IOC(_IOC_NONE, 'G', 5, sizeof(struct ioctl_gntalloc_alloc_gref))
19 struct ioctl_gntalloc_alloc_gref {
21 /* The ID of the domain to be given access to the grants. */
23 /* Flags for this mapping */
25 /* Number of pages to map */
28 /* The offset to be used on a subsequent call to mmap(). */
30 /* The grant references of the newly created grant, one per page */
31 /* Variable size, depending on count */
35 #define GNTALLOC_FLAG_WRITABLE 1
38 * Deallocates the grant reference, allowing the associated page to be freed if
39 * no other domains are using it.
41 #define IOCTL_GNTALLOC_DEALLOC_GREF \
42 _IOC(_IOC_NONE, 'G', 6, sizeof(struct ioctl_gntalloc_dealloc_gref))
43 struct ioctl_gntalloc_dealloc_gref {
45 /* The offset returned in the map operation */
47 /* Number of references to unmap */
50 #endif /* __LINUX_PUBLIC_GNTALLOC_H__ */