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