blob: 4f0e7b89b2ce8016db9412c46f6d96ff1b5fc2bd [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
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 Ferris38062f92014-07-09 15:33:25 -07007#ifndef __LINUX_PUBLIC_GNTALLOC_H__
8#define __LINUX_PUBLIC_GNTALLOC_H__
Christopher Ferris05d08e92016-02-04 13:16:38 -08009#include <linux/types.h>
Tao Baod7db5942015-01-28 10:07:51 -080010#define IOCTL_GNTALLOC_ALLOC_GREF _IOC(_IOC_NONE, 'G', 5, sizeof(struct ioctl_gntalloc_alloc_gref))
Christopher Ferris38062f92014-07-09 15:33:25 -070011struct ioctl_gntalloc_alloc_gref {
Christopher Ferris05d08e92016-02-04 13:16:38 -080012 __u16 domid;
13 __u16 flags;
14 __u32 count;
Christopher Ferris05d08e92016-02-04 13:16:38 -080015 __u64 index;
Christopher Ferrisb830ddf2024-03-28 11:48:08 -070016 union {
17 __u32 gref_ids[1];
18 __DECLARE_FLEX_ARRAY(__u32, gref_ids_flex);
19 };
Christopher Ferris38062f92014-07-09 15:33:25 -070020};
21#define GNTALLOC_FLAG_WRITABLE 1
Tao Baod7db5942015-01-28 10:07:51 -080022#define IOCTL_GNTALLOC_DEALLOC_GREF _IOC(_IOC_NONE, 'G', 6, sizeof(struct ioctl_gntalloc_dealloc_gref))
Christopher Ferris38062f92014-07-09 15:33:25 -070023struct ioctl_gntalloc_dealloc_gref {
Christopher Ferris05d08e92016-02-04 13:16:38 -080024 __u64 index;
25 __u32 count;
Christopher Ferris05d08e92016-02-04 13:16:38 -080026};
Tao Baod7db5942015-01-28 10:07:51 -080027#define IOCTL_GNTALLOC_SET_UNMAP_NOTIFY _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntalloc_unmap_notify))
Christopher Ferris38062f92014-07-09 15:33:25 -070028struct ioctl_gntalloc_unmap_notify {
Christopher Ferris05d08e92016-02-04 13:16:38 -080029 __u64 index;
Christopher Ferris05d08e92016-02-04 13:16:38 -080030 __u32 action;
31 __u32 event_channel_port;
Christopher Ferris38062f92014-07-09 15:33:25 -070032};
33#define UNMAP_NOTIFY_CLEAR_BYTE 0x1
Christopher Ferris05d08e92016-02-04 13:16:38 -080034#define UNMAP_NOTIFY_SEND_EVENT 0x2
Christopher Ferris38062f92014-07-09 15:33:25 -070035#endif