~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/vboxguest.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/uapi/linux/vboxguest.h (Version linux-6.12-rc7) and /include/uapi/linux/vboxguest.h (Version linux-6.5.13)


  1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Lin      1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR CDDL-1.0) */
  2 /*                                                  2 /*
  3  * VBoxGuest - VirtualBox Guest Additions Driv      3  * VBoxGuest - VirtualBox Guest Additions Driver Interface.
  4  *                                                  4  *
  5  * Copyright (C) 2006-2016 Oracle Corporation       5  * Copyright (C) 2006-2016 Oracle Corporation
  6  */                                                 6  */
  7                                                     7 
  8 #ifndef __UAPI_VBOXGUEST_H__                        8 #ifndef __UAPI_VBOXGUEST_H__
  9 #define __UAPI_VBOXGUEST_H__                        9 #define __UAPI_VBOXGUEST_H__
 10                                                    10 
 11 #include <asm/bitsperlong.h>                       11 #include <asm/bitsperlong.h>
 12 #include <linux/ioctl.h>                           12 #include <linux/ioctl.h>
 13 #include <linux/vbox_err.h>                        13 #include <linux/vbox_err.h>
 14 #include <linux/vbox_vmmdev_types.h>               14 #include <linux/vbox_vmmdev_types.h>
 15                                                    15 
 16 /* Version of vbg_ioctl_hdr structure. */          16 /* Version of vbg_ioctl_hdr structure. */
 17 #define VBG_IOCTL_HDR_VERSION           0x1000     17 #define VBG_IOCTL_HDR_VERSION           0x10001
 18 /* Default request type.  Use this for non-VMM     18 /* Default request type.  Use this for non-VMMDev requests. */
 19 #define VBG_IOCTL_HDR_TYPE_DEFAULT                 19 #define VBG_IOCTL_HDR_TYPE_DEFAULT              0
 20                                                    20 
 21 /**                                                21 /**
 22  * Common ioctl header.                            22  * Common ioctl header.
 23  *                                                 23  *
 24  * This is a mirror of vmmdev_request_header t     24  * This is a mirror of vmmdev_request_header to prevent duplicating data and
 25  * needing to verify things multiple times.        25  * needing to verify things multiple times.
 26  */                                                26  */
 27 struct vbg_ioctl_hdr {                             27 struct vbg_ioctl_hdr {
 28         /** IN: The request input size, and ou     28         /** IN: The request input size, and output size if size_out is zero. */
 29         __u32 size_in;                             29         __u32 size_in;
 30         /** IN: Structure version (VBG_IOCTL_H     30         /** IN: Structure version (VBG_IOCTL_HDR_VERSION) */
 31         __u32 version;                             31         __u32 version;
 32         /** IN: The VMMDev request type or VBG     32         /** IN: The VMMDev request type or VBG_IOCTL_HDR_TYPE_DEFAULT. */
 33         __u32 type;                                33         __u32 type;
 34         /**                                        34         /**
 35          * OUT: The VBox status code of the op     35          * OUT: The VBox status code of the operation, out direction only.
 36          * This is a VINF_ or VERR_ value as d     36          * This is a VINF_ or VERR_ value as defined in vbox_err.h.
 37          */                                        37          */
 38         __s32 rc;                                  38         __s32 rc;
 39         /** IN: Output size. Set to zero to us     39         /** IN: Output size. Set to zero to use size_in as output size. */
 40         __u32 size_out;                            40         __u32 size_out;
 41         /** Reserved, MBZ. */                      41         /** Reserved, MBZ. */
 42         __u32 reserved;                            42         __u32 reserved;
 43 };                                                 43 };
 44 VMMDEV_ASSERT_SIZE(vbg_ioctl_hdr, 24);             44 VMMDEV_ASSERT_SIZE(vbg_ioctl_hdr, 24);
 45                                                    45 
 46                                                    46 
 47 /*                                                 47 /*
 48  * The VBoxGuest I/O control version.              48  * The VBoxGuest I/O control version.
 49  *                                                 49  *
 50  * As usual, the high word contains the major      50  * As usual, the high word contains the major version and changes to it
 51  * signifies incompatible changes.                 51  * signifies incompatible changes.
 52  *                                                 52  *
 53  * The lower word is the minor version number,     53  * The lower word is the minor version number, it is increased when new
 54  * functions are added or existing changed in      54  * functions are added or existing changed in a backwards compatible manner.
 55  */                                                55  */
 56 #define VBG_IOC_VERSION         0x00010000u        56 #define VBG_IOC_VERSION         0x00010000u
 57                                                    57 
 58 /**                                                58 /**
 59  * VBG_IOCTL_DRIVER_VERSION_INFO data structur     59  * VBG_IOCTL_DRIVER_VERSION_INFO data structure
 60  *                                                 60  *
 61  * Note VBG_IOCTL_DRIVER_VERSION_INFO may swit     61  * Note VBG_IOCTL_DRIVER_VERSION_INFO may switch the session to a backwards
 62  * compatible interface version if uClientVers     62  * compatible interface version if uClientVersion indicates older client code.
 63  */                                                63  */
 64 struct vbg_ioctl_driver_version_info {             64 struct vbg_ioctl_driver_version_info {
 65         /** The header. */                         65         /** The header. */
 66         struct vbg_ioctl_hdr hdr;                  66         struct vbg_ioctl_hdr hdr;
 67         union {                                    67         union {
 68                 struct {                           68                 struct {
 69                         /** Requested interfac     69                         /** Requested interface version (VBG_IOC_VERSION). */
 70                         __u32 req_version;         70                         __u32 req_version;
 71                         /**                        71                         /**
 72                          * Minimum interface v     72                          * Minimum interface version number (typically the
 73                          * major version part      73                          * major version part of VBG_IOC_VERSION).
 74                          */                        74                          */
 75                         __u32 min_version;         75                         __u32 min_version;
 76                         /** Reserved, MBZ. */      76                         /** Reserved, MBZ. */
 77                         __u32 reserved1;           77                         __u32 reserved1;
 78                         /** Reserved, MBZ. */      78                         /** Reserved, MBZ. */
 79                         __u32 reserved2;           79                         __u32 reserved2;
 80                 } in;                              80                 } in;
 81                 struct {                           81                 struct {
 82                         /** Version for this s     82                         /** Version for this session (typ. VBG_IOC_VERSION). */
 83                         __u32 session_version;     83                         __u32 session_version;
 84                         /** Version of the IDC     84                         /** Version of the IDC interface (VBG_IOC_VERSION). */
 85                         __u32 driver_version;      85                         __u32 driver_version;
 86                         /** The SVN revision o     86                         /** The SVN revision of the driver, or 0. */
 87                         __u32 driver_revision;     87                         __u32 driver_revision;
 88                         /** Reserved \#1 (zero     88                         /** Reserved \#1 (zero until defined). */
 89                         __u32 reserved1;           89                         __u32 reserved1;
 90                         /** Reserved \#2 (zero     90                         /** Reserved \#2 (zero until defined). */
 91                         __u32 reserved2;           91                         __u32 reserved2;
 92                 } out;                             92                 } out;
 93         } u;                                       93         } u;
 94 };                                                 94 };
 95 VMMDEV_ASSERT_SIZE(vbg_ioctl_driver_version_in     95 VMMDEV_ASSERT_SIZE(vbg_ioctl_driver_version_info, 24 + 20);
 96                                                    96 
 97 #define VBG_IOCTL_DRIVER_VERSION_INFO \            97 #define VBG_IOCTL_DRIVER_VERSION_INFO \
 98         _IOWR('V', 0, struct vbg_ioctl_driver_     98         _IOWR('V', 0, struct vbg_ioctl_driver_version_info)
 99                                                    99 
100                                                   100 
101 /* IOCTL to perform a VMM Device request less     101 /* IOCTL to perform a VMM Device request less than 1KB in size. */
102 #define VBG_IOCTL_VMMDEV_REQUEST(s)     _IOC(_    102 #define VBG_IOCTL_VMMDEV_REQUEST(s)     _IOC(_IOC_READ | _IOC_WRITE, 'V', 2, s)
103                                                   103 
104                                                   104 
105 /* IOCTL to perform a VMM Device request large    105 /* IOCTL to perform a VMM Device request larger then 1KB. */
106 #define VBG_IOCTL_VMMDEV_REQUEST_BIG    _IO('V    106 #define VBG_IOCTL_VMMDEV_REQUEST_BIG    _IO('V', 3)
107                                                   107 
108                                                   108 
109 /** VBG_IOCTL_HGCM_CONNECT data structure. */     109 /** VBG_IOCTL_HGCM_CONNECT data structure. */
110 struct vbg_ioctl_hgcm_connect {                   110 struct vbg_ioctl_hgcm_connect {
111         struct vbg_ioctl_hdr hdr;                 111         struct vbg_ioctl_hdr hdr;
112         union {                                   112         union {
113                 struct {                          113                 struct {
114                         struct vmmdev_hgcm_ser    114                         struct vmmdev_hgcm_service_location loc;
115                 } in;                             115                 } in;
116                 struct {                          116                 struct {
117                         __u32 client_id;          117                         __u32 client_id;
118                 } out;                            118                 } out;
119         } u;                                      119         } u;
120 };                                                120 };
121 VMMDEV_ASSERT_SIZE(vbg_ioctl_hgcm_connect, 24     121 VMMDEV_ASSERT_SIZE(vbg_ioctl_hgcm_connect, 24 + 132);
122                                                   122 
123 #define VBG_IOCTL_HGCM_CONNECT \                  123 #define VBG_IOCTL_HGCM_CONNECT \
124         _IOWR('V', 4, struct vbg_ioctl_hgcm_co    124         _IOWR('V', 4, struct vbg_ioctl_hgcm_connect)
125                                                   125 
126                                                   126 
127 /** VBG_IOCTL_HGCM_DISCONNECT data structure.     127 /** VBG_IOCTL_HGCM_DISCONNECT data structure. */
128 struct vbg_ioctl_hgcm_disconnect {                128 struct vbg_ioctl_hgcm_disconnect {
129         struct vbg_ioctl_hdr hdr;                 129         struct vbg_ioctl_hdr hdr;
130         union {                                   130         union {
131                 struct {                          131                 struct {
132                         __u32 client_id;          132                         __u32 client_id;
133                 } in;                             133                 } in;
134         } u;                                      134         } u;
135 };                                                135 };
136 VMMDEV_ASSERT_SIZE(vbg_ioctl_hgcm_disconnect,     136 VMMDEV_ASSERT_SIZE(vbg_ioctl_hgcm_disconnect, 24 + 4);
137                                                   137 
138 #define VBG_IOCTL_HGCM_DISCONNECT \               138 #define VBG_IOCTL_HGCM_DISCONNECT \
139         _IOWR('V', 5, struct vbg_ioctl_hgcm_di    139         _IOWR('V', 5, struct vbg_ioctl_hgcm_disconnect)
140                                                   140 
141                                                   141 
142 /** VBG_IOCTL_HGCM_CALL data structure. */        142 /** VBG_IOCTL_HGCM_CALL data structure. */
143 struct vbg_ioctl_hgcm_call {                      143 struct vbg_ioctl_hgcm_call {
144         /** The header. */                        144         /** The header. */
145         struct vbg_ioctl_hdr hdr;                 145         struct vbg_ioctl_hdr hdr;
146         /** Input: The id of the caller. */       146         /** Input: The id of the caller. */
147         __u32 client_id;                          147         __u32 client_id;
148         /** Input: Function number. */            148         /** Input: Function number. */
149         __u32 function;                           149         __u32 function;
150         /**                                       150         /**
151          * Input: How long to wait (millisecon    151          * Input: How long to wait (milliseconds) for completion before
152          * cancelling the call. Set to -1 to w    152          * cancelling the call. Set to -1 to wait indefinitely.
153          */                                       153          */
154         __u32 timeout_ms;                         154         __u32 timeout_ms;
155         /** Interruptable flag, ignored for us    155         /** Interruptable flag, ignored for userspace calls. */
156         __u8 interruptible;                       156         __u8 interruptible;
157         /** Explicit padding, MBZ. */             157         /** Explicit padding, MBZ. */
158         __u8 reserved;                            158         __u8 reserved;
159         /**                                       159         /**
160          * Input: How many parameters followin    160          * Input: How many parameters following this structure.
161          *                                        161          *
162          * The parameters are either HGCMFunct    162          * The parameters are either HGCMFunctionParameter64 or 32,
163          * depending on whether we're receivin    163          * depending on whether we're receiving a 64-bit or 32-bit request.
164          *                                        164          *
165          * The current maximum is 61 parameter    165          * The current maximum is 61 parameters (given a 1KB max request size,
166          * and a 64-bit parameter size of 16 b    166          * and a 64-bit parameter size of 16 bytes).
167          */                                       167          */
168         __u16 parm_count;                         168         __u16 parm_count;
169         /*                                        169         /*
170          * Parameters follow in form:             170          * Parameters follow in form:
171          * struct hgcm_function_parameter<32|6    171          * struct hgcm_function_parameter<32|64> parms[parm_count]
172          */                                       172          */
173 };                                                173 };
174 VMMDEV_ASSERT_SIZE(vbg_ioctl_hgcm_call, 24 + 1    174 VMMDEV_ASSERT_SIZE(vbg_ioctl_hgcm_call, 24 + 16);
175                                                   175 
176 #define VBG_IOCTL_HGCM_CALL_32(s)       _IOC(_    176 #define VBG_IOCTL_HGCM_CALL_32(s)       _IOC(_IOC_READ | _IOC_WRITE, 'V', 6, s)
177 #define VBG_IOCTL_HGCM_CALL_64(s)       _IOC(_    177 #define VBG_IOCTL_HGCM_CALL_64(s)       _IOC(_IOC_READ | _IOC_WRITE, 'V', 7, s)
178 #if __BITS_PER_LONG == 64                         178 #if __BITS_PER_LONG == 64
179 #define VBG_IOCTL_HGCM_CALL(s)          VBG_IO    179 #define VBG_IOCTL_HGCM_CALL(s)          VBG_IOCTL_HGCM_CALL_64(s)
180 #else                                             180 #else
181 #define VBG_IOCTL_HGCM_CALL(s)          VBG_IO    181 #define VBG_IOCTL_HGCM_CALL(s)          VBG_IOCTL_HGCM_CALL_32(s)
182 #endif                                            182 #endif
183                                                   183 
184                                                   184 
185 /** VBG_IOCTL_LOG data structure. */              185 /** VBG_IOCTL_LOG data structure. */
186 struct vbg_ioctl_log {                            186 struct vbg_ioctl_log {
187         /** The header. */                        187         /** The header. */
188         struct vbg_ioctl_hdr hdr;                 188         struct vbg_ioctl_hdr hdr;
189         union {                                   189         union {
190                 struct {                          190                 struct {
191                         /**                       191                         /**
192                          * The log message, th    192                          * The log message, this may be zero terminated. If it
193                          * is not zero termina    193                          * is not zero terminated then the length is determined
194                          * from the input size    194                          * from the input size.
195                          */                       195                          */
196                         char msg[1];              196                         char msg[1];
197                 } in;                             197                 } in;
198         } u;                                      198         } u;
199 };                                                199 };
200                                                   200 
201 #define VBG_IOCTL_LOG(s)                _IO('V    201 #define VBG_IOCTL_LOG(s)                _IO('V', 9)
202                                                   202 
203                                                   203 
204 /** VBG_IOCTL_WAIT_FOR_EVENTS data structure.     204 /** VBG_IOCTL_WAIT_FOR_EVENTS data structure. */
205 struct vbg_ioctl_wait_for_events {                205 struct vbg_ioctl_wait_for_events {
206         /** The header. */                        206         /** The header. */
207         struct vbg_ioctl_hdr hdr;                 207         struct vbg_ioctl_hdr hdr;
208         union {                                   208         union {
209                 struct {                          209                 struct {
210                         /** Timeout in millise    210                         /** Timeout in milliseconds. */
211                         __u32 timeout_ms;         211                         __u32 timeout_ms;
212                         /** Events to wait for    212                         /** Events to wait for. */
213                         __u32 events;             213                         __u32 events;
214                 } in;                             214                 } in;
215                 struct {                          215                 struct {
216                         /** Events that occurr    216                         /** Events that occurred. */
217                         __u32 events;             217                         __u32 events;
218                 } out;                            218                 } out;
219         } u;                                      219         } u;
220 };                                                220 };
221 VMMDEV_ASSERT_SIZE(vbg_ioctl_wait_for_events,     221 VMMDEV_ASSERT_SIZE(vbg_ioctl_wait_for_events, 24 + 8);
222                                                   222 
223 #define VBG_IOCTL_WAIT_FOR_EVENTS \               223 #define VBG_IOCTL_WAIT_FOR_EVENTS \
224         _IOWR('V', 10, struct vbg_ioctl_wait_f    224         _IOWR('V', 10, struct vbg_ioctl_wait_for_events)
225                                                   225 
226                                                   226 
227 /*                                                227 /*
228  * IOCTL to VBoxGuest to interrupt (cancel) an    228  * IOCTL to VBoxGuest to interrupt (cancel) any pending
229  * VBG_IOCTL_WAIT_FOR_EVENTS and return.          229  * VBG_IOCTL_WAIT_FOR_EVENTS and return.
230  *                                                230  *
231  * Handled inside the vboxguest driver and not    231  * Handled inside the vboxguest driver and not seen by the host at all.
232  * After calling this, VBG_IOCTL_WAIT_FOR_EVEN    232  * After calling this, VBG_IOCTL_WAIT_FOR_EVENTS should no longer be called in
233  * the same session. Any VBOXGUEST_IOCTL_WAITE    233  * the same session. Any VBOXGUEST_IOCTL_WAITEVENT calls in the same session
234  * done after calling this will directly exit     234  * done after calling this will directly exit with -EINTR.
235  */                                               235  */
236 #define VBG_IOCTL_INTERRUPT_ALL_WAIT_FOR_EVENT    236 #define VBG_IOCTL_INTERRUPT_ALL_WAIT_FOR_EVENTS \
237         _IOWR('V', 11, struct vbg_ioctl_hdr)      237         _IOWR('V', 11, struct vbg_ioctl_hdr)
238                                                   238 
239                                                   239 
240 /** VBG_IOCTL_CHANGE_FILTER_MASK data structur    240 /** VBG_IOCTL_CHANGE_FILTER_MASK data structure. */
241 struct vbg_ioctl_change_filter {                  241 struct vbg_ioctl_change_filter {
242         /** The header. */                        242         /** The header. */
243         struct vbg_ioctl_hdr hdr;                 243         struct vbg_ioctl_hdr hdr;
244         union {                                   244         union {
245                 struct {                          245                 struct {
246                         /** Flags to set. */      246                         /** Flags to set. */
247                         __u32 or_mask;            247                         __u32 or_mask;
248                         /** Flags to remove. *    248                         /** Flags to remove. */
249                         __u32 not_mask;           249                         __u32 not_mask;
250                 } in;                             250                 } in;
251         } u;                                      251         } u;
252 };                                                252 };
253 VMMDEV_ASSERT_SIZE(vbg_ioctl_change_filter, 24    253 VMMDEV_ASSERT_SIZE(vbg_ioctl_change_filter, 24 + 8);
254                                                   254 
255 /* IOCTL to VBoxGuest to control the event fil    255 /* IOCTL to VBoxGuest to control the event filter mask. */
256 #define VBG_IOCTL_CHANGE_FILTER_MASK \            256 #define VBG_IOCTL_CHANGE_FILTER_MASK \
257         _IOWR('V', 12, struct vbg_ioctl_change    257         _IOWR('V', 12, struct vbg_ioctl_change_filter)
258                                                   258 
259                                                   259 
260 /** VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES data     260 /** VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES data structure. */
261 struct vbg_ioctl_acquire_guest_caps {             261 struct vbg_ioctl_acquire_guest_caps {
262         /** The header. */                        262         /** The header. */
263         struct vbg_ioctl_hdr hdr;                 263         struct vbg_ioctl_hdr hdr;
264         union {                                   264         union {
265                 struct {                          265                 struct {
266                         /** Flags (VBGL_IOC_AG    266                         /** Flags (VBGL_IOC_AGC_FLAGS_XXX). */
267                         __u32 flags;              267                         __u32 flags;
268                         /** Capabilities to se    268                         /** Capabilities to set (VMMDEV_GUEST_SUPPORTS_XXX). */
269                         __u32 or_mask;            269                         __u32 or_mask;
270                         /** Capabilities to dr    270                         /** Capabilities to drop (VMMDEV_GUEST_SUPPORTS_XXX). */
271                         __u32 not_mask;           271                         __u32 not_mask;
272                 } in;                             272                 } in;
273         } u;                                      273         } u;
274 };                                                274 };
275 VMMDEV_ASSERT_SIZE(vbg_ioctl_acquire_guest_cap    275 VMMDEV_ASSERT_SIZE(vbg_ioctl_acquire_guest_caps, 24 + 12);
276                                                   276 
277 #define VBGL_IOC_AGC_FLAGS_CONFIG_ACQUIRE_MODE    277 #define VBGL_IOC_AGC_FLAGS_CONFIG_ACQUIRE_MODE          0x00000001
278 #define VBGL_IOC_AGC_FLAGS_VALID_MASK             278 #define VBGL_IOC_AGC_FLAGS_VALID_MASK                   0x00000001
279                                                   279 
280 #define VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES \    280 #define VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES \
281         _IOWR('V', 13, struct vbg_ioctl_acquir    281         _IOWR('V', 13, struct vbg_ioctl_acquire_guest_caps)
282                                                   282 
283                                                   283 
284 /** VBG_IOCTL_CHANGE_GUEST_CAPABILITIES data s    284 /** VBG_IOCTL_CHANGE_GUEST_CAPABILITIES data structure. */
285 struct vbg_ioctl_set_guest_caps {                 285 struct vbg_ioctl_set_guest_caps {
286         /** The header. */                        286         /** The header. */
287         struct vbg_ioctl_hdr hdr;                 287         struct vbg_ioctl_hdr hdr;
288         union {                                   288         union {
289                 struct {                          289                 struct {
290                         /** Capabilities to se    290                         /** Capabilities to set (VMMDEV_GUEST_SUPPORTS_XXX). */
291                         __u32 or_mask;            291                         __u32 or_mask;
292                         /** Capabilities to dr    292                         /** Capabilities to drop (VMMDEV_GUEST_SUPPORTS_XXX). */
293                         __u32 not_mask;           293                         __u32 not_mask;
294                 } in;                             294                 } in;
295                 struct {                          295                 struct {
296                         /** Capabilities held     296                         /** Capabilities held by the session after the call. */
297                         __u32 session_caps;       297                         __u32 session_caps;
298                         /** Capabilities for a    298                         /** Capabilities for all the sessions after the call. */
299                         __u32 global_caps;        299                         __u32 global_caps;
300                 } out;                            300                 } out;
301         } u;                                      301         } u;
302 };                                                302 };
303 VMMDEV_ASSERT_SIZE(vbg_ioctl_set_guest_caps, 2    303 VMMDEV_ASSERT_SIZE(vbg_ioctl_set_guest_caps, 24 + 8);
304                                                   304 
305 #define VBG_IOCTL_CHANGE_GUEST_CAPABILITIES \     305 #define VBG_IOCTL_CHANGE_GUEST_CAPABILITIES \
306         _IOWR('V', 14, struct vbg_ioctl_set_gu    306         _IOWR('V', 14, struct vbg_ioctl_set_guest_caps)
307                                                   307 
308                                                   308 
309 /** VBG_IOCTL_CHECK_BALLOON data structure. */    309 /** VBG_IOCTL_CHECK_BALLOON data structure. */
310 struct vbg_ioctl_check_balloon {                  310 struct vbg_ioctl_check_balloon {
311         /** The header. */                        311         /** The header. */
312         struct vbg_ioctl_hdr hdr;                 312         struct vbg_ioctl_hdr hdr;
313         union {                                   313         union {
314                 struct {                          314                 struct {
315                         /** The size of the ba    315                         /** The size of the balloon in chunks of 1MB. */
316                         __u32 balloon_chunks;     316                         __u32 balloon_chunks;
317                         /**                       317                         /**
318                          * false = handled in     318                          * false = handled in R0, no further action required.
319                          *  true = allocate ba    319                          *  true = allocate balloon memory in R3.
320                          */                       320                          */
321                         __u8 handle_in_r3;        321                         __u8 handle_in_r3;
322                         /** Explicit padding,     322                         /** Explicit padding, MBZ. */
323                         __u8 padding[3];          323                         __u8 padding[3];
324                 } out;                            324                 } out;
325         } u;                                      325         } u;
326 };                                                326 };
327 VMMDEV_ASSERT_SIZE(vbg_ioctl_check_balloon, 24    327 VMMDEV_ASSERT_SIZE(vbg_ioctl_check_balloon, 24 + 8);
328                                                   328 
329 /*                                                329 /*
330  * IOCTL to check memory ballooning.              330  * IOCTL to check memory ballooning.
331  *                                                331  *
332  * The guest kernel module will ask the host f    332  * The guest kernel module will ask the host for the current size of the
333  * balloon and adjust the size. Or it will set    333  * balloon and adjust the size. Or it will set handle_in_r3 = true and R3 is
334  * responsible for allocating memory and calli    334  * responsible for allocating memory and calling VBG_IOCTL_CHANGE_BALLOON.
335  */                                               335  */
336 #define VBG_IOCTL_CHECK_BALLOON \                 336 #define VBG_IOCTL_CHECK_BALLOON \
337         _IOWR('V', 17, struct vbg_ioctl_check_    337         _IOWR('V', 17, struct vbg_ioctl_check_balloon)
338                                                   338 
339                                                   339 
340 /** VBG_IOCTL_WRITE_CORE_DUMP data structure.     340 /** VBG_IOCTL_WRITE_CORE_DUMP data structure. */
341 struct vbg_ioctl_write_coredump {                 341 struct vbg_ioctl_write_coredump {
342         struct vbg_ioctl_hdr hdr;                 342         struct vbg_ioctl_hdr hdr;
343         union {                                   343         union {
344                 struct {                          344                 struct {
345                         __u32 flags; /** Flags    345                         __u32 flags; /** Flags (reserved, MBZ). */
346                 } in;                             346                 } in;
347         } u;                                      347         } u;
348 };                                                348 };
349 VMMDEV_ASSERT_SIZE(vbg_ioctl_write_coredump, 2    349 VMMDEV_ASSERT_SIZE(vbg_ioctl_write_coredump, 24 + 4);
350                                                   350 
351 #define VBG_IOCTL_WRITE_CORE_DUMP \               351 #define VBG_IOCTL_WRITE_CORE_DUMP \
352         _IOWR('V', 19, struct vbg_ioctl_write_    352         _IOWR('V', 19, struct vbg_ioctl_write_coredump)
353                                                   353 
354 #endif                                            354 #endif
355                                                   355 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php