aboutsummaryrefslogtreecommitdiff
path: root/libc/kernel/uapi/linux/vboxguest.h
blob: 342c0202737337c898eb6a149b7f3010582db7df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
/****************************************************************************
 ****************************************************************************
 ***
 ***   This header was automatically generated from a Linux kernel header
 ***   of the same name, to make information necessary for userspace to
 ***   call into the kernel available to libc.  It contains only constants,
 ***   structures, and macros generated from the original header, and thus,
 ***   contains no copyrightable information.
 ***
 ***   To edit the content of this header, modify the corresponding
 ***   source file (e.g. under external/kernel-headers/original/) then
 ***   run bionic/libc/kernel/tools/update_all.py
 ***
 ***   Any manual change here will be lost the next time this script will
 ***   be run. You've been warned!
 ***
 ****************************************************************************
 ****************************************************************************/
#ifndef __UAPI_VBOXGUEST_H__
#define __UAPI_VBOXGUEST_H__
#include <asm/bitsperlong.h>
#include <linux/ioctl.h>
#include <linux/vbox_err.h>
#include <linux/vbox_vmmdev_types.h>
#define VBG_IOCTL_HDR_VERSION 0x10001
#define VBG_IOCTL_HDR_TYPE_DEFAULT 0
struct vbg_ioctl_hdr {
  __u32 size_in;
  __u32 version;
  __u32 type;
  __s32 rc;
  __u32 size_out;
  __u32 reserved;
};
#define VBG_IOC_VERSION 0x00010000u
struct vbg_ioctl_driver_version_info {
  struct vbg_ioctl_hdr hdr;
  union {
    struct {
      __u32 req_version;
      __u32 min_version;
      __u32 reserved1;
      __u32 reserved2;
    } in;
    struct {
      __u32 session_version;
      __u32 driver_version;
      __u32 driver_revision;
      __u32 reserved1;
      __u32 reserved2;
    } out;
  } u;
};
#define VBG_IOCTL_DRIVER_VERSION_INFO _IOWR('V', 0, struct vbg_ioctl_driver_version_info)
#define VBG_IOCTL_VMMDEV_REQUEST(s) _IOC(_IOC_READ | _IOC_WRITE, 'V', 2, s)
#define VBG_IOCTL_VMMDEV_REQUEST_BIG _IO('V', 3)
struct vbg_ioctl_hgcm_connect {
  struct vbg_ioctl_hdr hdr;
  union {
    struct {
      struct vmmdev_hgcm_service_location loc;
    } in;
    struct {
      __u32 client_id;
    } out;
  } u;
};
#define VBG_IOCTL_HGCM_CONNECT _IOWR('V', 4, struct vbg_ioctl_hgcm_connect)
struct vbg_ioctl_hgcm_disconnect {
  struct vbg_ioctl_hdr hdr;
  union {
    struct {
      __u32 client_id;
    } in;
  } u;
};
#define VBG_IOCTL_HGCM_DISCONNECT _IOWR('V', 5, struct vbg_ioctl_hgcm_disconnect)
struct vbg_ioctl_hgcm_call {
  struct vbg_ioctl_hdr hdr;
  __u32 client_id;
  __u32 function;
  __u32 timeout_ms;
  __u8 interruptible;
  __u8 reserved;
  __u16 parm_count;
};
#define VBG_IOCTL_HGCM_CALL_32(s) _IOC(_IOC_READ | _IOC_WRITE, 'V', 6, s)
#define VBG_IOCTL_HGCM_CALL_64(s) _IOC(_IOC_READ | _IOC_WRITE, 'V', 7, s)
#if __BITS_PER_LONG == 64
#define VBG_IOCTL_HGCM_CALL(s) VBG_IOCTL_HGCM_CALL_64(s)
#else
#define VBG_IOCTL_HGCM_CALL(s) VBG_IOCTL_HGCM_CALL_32(s)
#endif
struct vbg_ioctl_log {
  struct vbg_ioctl_hdr hdr;
  union {
    struct {
      char msg[1];
    } in;
  } u;
};
#define VBG_IOCTL_LOG(s) _IO('V', 9)
struct vbg_ioctl_wait_for_events {
  struct vbg_ioctl_hdr hdr;
  union {
    struct {
      __u32 timeout_ms;
      __u32 events;
    } in;
    struct {
      __u32 events;
    } out;
  } u;
};
#define VBG_IOCTL_WAIT_FOR_EVENTS _IOWR('V', 10, struct vbg_ioctl_wait_for_events)
#define VBG_IOCTL_INTERRUPT_ALL_WAIT_FOR_EVENTS _IOWR('V', 11, struct vbg_ioctl_hdr)
struct vbg_ioctl_change_filter {
  struct vbg_ioctl_hdr hdr;
  union {
    struct {
      __u32 or_mask;
      __u32 not_mask;
    } in;
  } u;
};
#define VBG_IOCTL_CHANGE_FILTER_MASK _IOWR('V', 12, struct vbg_ioctl_change_filter)
struct vbg_ioctl_acquire_guest_caps {
  struct vbg_ioctl_hdr hdr;
  union {
    struct {
      __u32 flags;
      __u32 or_mask;
      __u32 not_mask;
    } in;
  } u;
};
#define VBGL_IOC_AGC_FLAGS_CONFIG_ACQUIRE_MODE 0x00000001
#define VBGL_IOC_AGC_FLAGS_VALID_MASK 0x00000001
#define VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES _IOWR('V', 13, struct vbg_ioctl_acquire_guest_caps)
struct vbg_ioctl_set_guest_caps {
  struct vbg_ioctl_hdr hdr;
  union {
    struct {
      __u32 or_mask;
      __u32 not_mask;
    } in;
    struct {
      __u32 session_caps;
      __u32 global_caps;
    } out;
  } u;
};
#define VBG_IOCTL_CHANGE_GUEST_CAPABILITIES _IOWR('V', 14, struct vbg_ioctl_set_guest_caps)
struct vbg_ioctl_check_balloon {
  struct vbg_ioctl_hdr hdr;
  union {
    struct {
      __u32 balloon_chunks;
      __u8 handle_in_r3;
      __u8 padding[3];
    } out;
  } u;
};
#define VBG_IOCTL_CHECK_BALLOON _IOWR('V', 17, struct vbg_ioctl_check_balloon)
struct vbg_ioctl_write_coredump {
  struct vbg_ioctl_hdr hdr;
  union {
    struct {
      __u32 flags;
    } in;
  } u;
};
#define VBG_IOCTL_WRITE_CORE_DUMP _IOWR('V', 19, struct vbg_ioctl_write_coredump)
#endif