Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 7 | #ifndef __LINUX_PUBLIC_GNTALLOC_H__ |
| 8 | #define __LINUX_PUBLIC_GNTALLOC_H__ |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 9 | #include <linux/types.h> |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 10 | #define IOCTL_GNTALLOC_ALLOC_GREF _IOC(_IOC_NONE, 'G', 5, sizeof(struct ioctl_gntalloc_alloc_gref)) |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 11 | struct ioctl_gntalloc_alloc_gref { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 12 | __u16 domid; |
| 13 | __u16 flags; |
| 14 | __u32 count; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 15 | __u64 index; |
Christopher Ferris | b830ddf | 2024-03-28 11:48:08 -0700 | [diff] [blame] | 16 | union { |
| 17 | __u32 gref_ids[1]; |
| 18 | __DECLARE_FLEX_ARRAY(__u32, gref_ids_flex); |
| 19 | }; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 20 | }; |
| 21 | #define GNTALLOC_FLAG_WRITABLE 1 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 22 | #define IOCTL_GNTALLOC_DEALLOC_GREF _IOC(_IOC_NONE, 'G', 6, sizeof(struct ioctl_gntalloc_dealloc_gref)) |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 23 | struct ioctl_gntalloc_dealloc_gref { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 24 | __u64 index; |
| 25 | __u32 count; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 26 | }; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | #define IOCTL_GNTALLOC_SET_UNMAP_NOTIFY _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntalloc_unmap_notify)) |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 28 | struct ioctl_gntalloc_unmap_notify { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 29 | __u64 index; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 30 | __u32 action; |
| 31 | __u32 event_channel_port; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 32 | }; |
| 33 | #define UNMAP_NOTIFY_CLEAR_BYTE 0x1 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 34 | #define UNMAP_NOTIFY_SEND_EVENT 0x2 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 35 | #endif |