Andrea Falcone | 1c4977f | 2020-07-23 10:58:25 -0400 | [diff] [blame^] | 1 | /**************************************************************************** |
| 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 __UAPI_VBOXGUEST_H__ |
| 20 | #define __UAPI_VBOXGUEST_H__ |
| 21 | #include <asm/bitsperlong.h> |
| 22 | #include <linux/ioctl.h> |
| 23 | #include <linux/vbox_err.h> |
| 24 | #include <linux/vbox_vmmdev_types.h> |
| 25 | #define VBG_IOCTL_HDR_VERSION 0x10001 |
| 26 | #define VBG_IOCTL_HDR_TYPE_DEFAULT 0 |
| 27 | struct vbg_ioctl_hdr { |
| 28 | __u32 size_in; |
| 29 | __u32 version; |
| 30 | __u32 type; |
| 31 | __s32 rc; |
| 32 | __u32 size_out; |
| 33 | __u32 reserved; |
| 34 | }; |
| 35 | #define VBG_IOC_VERSION 0x00010000u |
| 36 | struct vbg_ioctl_driver_version_info { |
| 37 | struct vbg_ioctl_hdr hdr; |
| 38 | union { |
| 39 | struct { |
| 40 | __u32 req_version; |
| 41 | __u32 min_version; |
| 42 | __u32 reserved1; |
| 43 | __u32 reserved2; |
| 44 | } in; |
| 45 | struct { |
| 46 | __u32 session_version; |
| 47 | __u32 driver_version; |
| 48 | __u32 driver_revision; |
| 49 | __u32 reserved1; |
| 50 | __u32 reserved2; |
| 51 | } out; |
| 52 | } u; |
| 53 | }; |
| 54 | #define VBG_IOCTL_DRIVER_VERSION_INFO _IOWR('V', 0, struct vbg_ioctl_driver_version_info) |
| 55 | #define VBG_IOCTL_VMMDEV_REQUEST(s) _IOC(_IOC_READ | _IOC_WRITE, 'V', 2, s) |
| 56 | #define VBG_IOCTL_VMMDEV_REQUEST_BIG _IOC(_IOC_READ | _IOC_WRITE, 'V', 3, 0) |
| 57 | struct vbg_ioctl_hgcm_connect { |
| 58 | struct vbg_ioctl_hdr hdr; |
| 59 | union { |
| 60 | struct { |
| 61 | struct vmmdev_hgcm_service_location loc; |
| 62 | } in; |
| 63 | struct { |
| 64 | __u32 client_id; |
| 65 | } out; |
| 66 | } u; |
| 67 | }; |
| 68 | #define VBG_IOCTL_HGCM_CONNECT _IOWR('V', 4, struct vbg_ioctl_hgcm_connect) |
| 69 | struct vbg_ioctl_hgcm_disconnect { |
| 70 | struct vbg_ioctl_hdr hdr; |
| 71 | union { |
| 72 | struct { |
| 73 | __u32 client_id; |
| 74 | } in; |
| 75 | } u; |
| 76 | }; |
| 77 | #define VBG_IOCTL_HGCM_DISCONNECT _IOWR('V', 5, struct vbg_ioctl_hgcm_disconnect) |
| 78 | struct vbg_ioctl_hgcm_call { |
| 79 | struct vbg_ioctl_hdr hdr; |
| 80 | __u32 client_id; |
| 81 | __u32 function; |
| 82 | __u32 timeout_ms; |
| 83 | __u8 interruptible; |
| 84 | __u8 reserved; |
| 85 | __u16 parm_count; |
| 86 | }; |
| 87 | #define VBG_IOCTL_HGCM_CALL_32(s) _IOC(_IOC_READ | _IOC_WRITE, 'V', 6, s) |
| 88 | #define VBG_IOCTL_HGCM_CALL_64(s) _IOC(_IOC_READ | _IOC_WRITE, 'V', 7, s) |
| 89 | #if __BITS_PER_LONG == 64 |
| 90 | #define VBG_IOCTL_HGCM_CALL(s) VBG_IOCTL_HGCM_CALL_64(s) |
| 91 | #else |
| 92 | #define VBG_IOCTL_HGCM_CALL(s) VBG_IOCTL_HGCM_CALL_32(s) |
| 93 | #endif |
| 94 | struct vbg_ioctl_log { |
| 95 | struct vbg_ioctl_hdr hdr; |
| 96 | union { |
| 97 | struct { |
| 98 | char msg[1]; |
| 99 | } in; |
| 100 | } u; |
| 101 | }; |
| 102 | #define VBG_IOCTL_LOG(s) _IOC(_IOC_READ | _IOC_WRITE, 'V', 9, s) |
| 103 | struct vbg_ioctl_wait_for_events { |
| 104 | struct vbg_ioctl_hdr hdr; |
| 105 | union { |
| 106 | struct { |
| 107 | __u32 timeout_ms; |
| 108 | __u32 events; |
| 109 | } in; |
| 110 | struct { |
| 111 | __u32 events; |
| 112 | } out; |
| 113 | } u; |
| 114 | }; |
| 115 | #define VBG_IOCTL_WAIT_FOR_EVENTS _IOWR('V', 10, struct vbg_ioctl_wait_for_events) |
| 116 | #define VBG_IOCTL_INTERRUPT_ALL_WAIT_FOR_EVENTS _IOWR('V', 11, struct vbg_ioctl_hdr) |
| 117 | struct vbg_ioctl_change_filter { |
| 118 | struct vbg_ioctl_hdr hdr; |
| 119 | union { |
| 120 | struct { |
| 121 | __u32 or_mask; |
| 122 | __u32 not_mask; |
| 123 | } in; |
| 124 | } u; |
| 125 | }; |
| 126 | #define VBG_IOCTL_CHANGE_FILTER_MASK _IOWR('V', 12, struct vbg_ioctl_change_filter) |
| 127 | struct vbg_ioctl_set_guest_caps { |
| 128 | struct vbg_ioctl_hdr hdr; |
| 129 | union { |
| 130 | struct { |
| 131 | __u32 or_mask; |
| 132 | __u32 not_mask; |
| 133 | } in; |
| 134 | struct { |
| 135 | __u32 session_caps; |
| 136 | __u32 global_caps; |
| 137 | } out; |
| 138 | } u; |
| 139 | }; |
| 140 | #define VBG_IOCTL_CHANGE_GUEST_CAPABILITIES _IOWR('V', 14, struct vbg_ioctl_set_guest_caps) |
| 141 | struct vbg_ioctl_check_balloon { |
| 142 | struct vbg_ioctl_hdr hdr; |
| 143 | union { |
| 144 | struct { |
| 145 | __u32 balloon_chunks; |
| 146 | __u8 handle_in_r3; |
| 147 | __u8 padding[3]; |
| 148 | } out; |
| 149 | } u; |
| 150 | }; |
| 151 | #define VBG_IOCTL_CHECK_BALLOON _IOWR('V', 17, struct vbg_ioctl_check_balloon) |
| 152 | struct vbg_ioctl_write_coredump { |
| 153 | struct vbg_ioctl_hdr hdr; |
| 154 | union { |
| 155 | struct { |
| 156 | __u32 flags; |
| 157 | } in; |
| 158 | } u; |
| 159 | }; |
| 160 | #define VBG_IOCTL_WRITE_CORE_DUMP _IOWR('V', 19, struct vbg_ioctl_write_coredump) |
| 161 | #endif |