blob: 44b5e8c26a9de16835c963fdde769a1ef7fae711 [file] [log] [blame]
Christopher Ferris38062f92014-07-09 15:33:25 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef __LINUX_PUBLIC_GNTDEV_H__
20#define __LINUX_PUBLIC_GNTDEV_H__
Christopher Ferris05d08e92016-02-04 13:16:38 -080021#include <linux/types.h>
Christopher Ferris38062f92014-07-09 15:33:25 -070022struct ioctl_gntdev_grant_ref {
Christopher Ferris05d08e92016-02-04 13:16:38 -080023 __u32 domid;
24 __u32 ref;
Christopher Ferris38062f92014-07-09 15:33:25 -070025};
Tao Baod7db5942015-01-28 10:07:51 -080026#define IOCTL_GNTDEV_MAP_GRANT_REF _IOC(_IOC_NONE, 'G', 0, sizeof(struct ioctl_gntdev_map_grant_ref))
Christopher Ferris38062f92014-07-09 15:33:25 -070027struct ioctl_gntdev_map_grant_ref {
Christopher Ferris05d08e92016-02-04 13:16:38 -080028 __u32 count;
29 __u32 pad;
30 __u64 index;
Tao Baod7db5942015-01-28 10:07:51 -080031 struct ioctl_gntdev_grant_ref refs[1];
Christopher Ferris38062f92014-07-09 15:33:25 -070032};
Tao Baod7db5942015-01-28 10:07:51 -080033#define IOCTL_GNTDEV_UNMAP_GRANT_REF _IOC(_IOC_NONE, 'G', 1, sizeof(struct ioctl_gntdev_unmap_grant_ref))
Christopher Ferris38062f92014-07-09 15:33:25 -070034struct ioctl_gntdev_unmap_grant_ref {
Christopher Ferris05d08e92016-02-04 13:16:38 -080035 __u64 index;
36 __u32 count;
37 __u32 pad;
Christopher Ferris38062f92014-07-09 15:33:25 -070038};
Tao Baod7db5942015-01-28 10:07:51 -080039#define IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR _IOC(_IOC_NONE, 'G', 2, sizeof(struct ioctl_gntdev_get_offset_for_vaddr))
Christopher Ferris38062f92014-07-09 15:33:25 -070040struct ioctl_gntdev_get_offset_for_vaddr {
Christopher Ferris05d08e92016-02-04 13:16:38 -080041 __u64 vaddr;
42 __u64 offset;
Christopher Ferris05d08e92016-02-04 13:16:38 -080043 __u32 count;
44 __u32 pad;
Christopher Ferris38062f92014-07-09 15:33:25 -070045};
Tao Baod7db5942015-01-28 10:07:51 -080046#define IOCTL_GNTDEV_SET_MAX_GRANTS _IOC(_IOC_NONE, 'G', 3, sizeof(struct ioctl_gntdev_set_max_grants))
Christopher Ferris05d08e92016-02-04 13:16:38 -080047struct ioctl_gntdev_set_max_grants {
48 __u32 count;
Christopher Ferris38062f92014-07-09 15:33:25 -070049};
Tao Baod7db5942015-01-28 10:07:51 -080050#define IOCTL_GNTDEV_SET_UNMAP_NOTIFY _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntdev_unmap_notify))
Christopher Ferris38062f92014-07-09 15:33:25 -070051struct ioctl_gntdev_unmap_notify {
Christopher Ferris05d08e92016-02-04 13:16:38 -080052 __u64 index;
53 __u32 action;
54 __u32 event_channel_port;
Christopher Ferris38062f92014-07-09 15:33:25 -070055};
Christopher Ferris106b3a82016-08-24 12:15:38 -070056struct gntdev_grant_copy_segment {
57 union {
58 void __user * virt;
Christopher Ferris106b3a82016-08-24 12:15:38 -070059 struct {
60 grant_ref_t ref;
61 __u16 offset;
62 domid_t domid;
Christopher Ferris106b3a82016-08-24 12:15:38 -070063 } foreign;
64 } source, dest;
65 __u16 len;
66 __u16 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -070067 __s16 status;
68};
69#define IOCTL_GNTDEV_GRANT_COPY _IOC(_IOC_NONE, 'G', 8, sizeof(struct ioctl_gntdev_grant_copy))
70struct ioctl_gntdev_grant_copy {
Christopher Ferris106b3a82016-08-24 12:15:38 -070071 unsigned int count;
72 struct gntdev_grant_copy_segment __user * segments;
73};
Christopher Ferris38062f92014-07-09 15:33:25 -070074#define UNMAP_NOTIFY_CLEAR_BYTE 0x1
75#define UNMAP_NOTIFY_SEND_EVENT 0x2
76#endif