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_HYPERV_H 20#define _UAPI_HYPERV_H 21#include <linux/uuid.h> 22#define UTIL_FW_MINOR 0 23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24#define UTIL_WS2K8_FW_MAJOR 1 25#define UTIL_WS2K8_FW_VERSION (UTIL_WS2K8_FW_MAJOR << 16 | UTIL_FW_MINOR) 26#define UTIL_FW_MAJOR 3 27#define UTIL_FW_VERSION (UTIL_FW_MAJOR << 16 | UTIL_FW_MINOR) 28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29#define VSS_OP_REGISTER 128 30#define VSS_OP_REGISTER1 129 31enum hv_vss_op { 32 VSS_OP_CREATE = 0, 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 VSS_OP_DELETE, 35 VSS_OP_HOT_BACKUP, 36 VSS_OP_GET_DM_INFO, 37 VSS_OP_BU_COMPLETE, 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 VSS_OP_FREEZE, 40 VSS_OP_THAW, 41 VSS_OP_AUTO_RECOVER, 42 VSS_OP_COUNT 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44}; 45struct hv_vss_hdr { 46 __u8 operation; 47 __u8 reserved[7]; 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49} __attribute__((packed)); 50#define VSS_HBU_NO_AUTO_RECOVERY 0x00000005 51struct hv_vss_check_feature { 52 __u32 flags; 53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54} __attribute__((packed)); 55struct hv_vss_check_dm_info { 56 __u32 flags; 57} __attribute__((packed)); 58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59struct hv_vss_msg { 60 union { 61 struct hv_vss_hdr vss_hdr; 62 int error; 63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 }; 65 union { 66 struct hv_vss_check_feature vss_cf; 67 struct hv_vss_check_dm_info dm_info; 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 }; 70} __attribute__((packed)); 71#define FCOPY_VERSION_0 0 72#define FCOPY_VERSION_1 1 73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74#define FCOPY_CURRENT_VERSION FCOPY_VERSION_1 75#define W_MAX_PATH 260 76enum hv_fcopy_op { 77 START_FILE_COPY = 0, 78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 WRITE_TO_FILE, 80 COMPLETE_FCOPY, 81 CANCEL_FCOPY, 82}; 83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84struct hv_fcopy_hdr { 85 __u32 operation; 86 uuid_le service_id0; 87 uuid_le service_id1; 88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89} __attribute__((packed)); 90#define OVER_WRITE 0x1 91#define CREATE_PATH 0x2 92struct hv_start_fcopy { 93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 struct hv_fcopy_hdr hdr; 95 __u16 file_name[W_MAX_PATH]; 96 __u16 path_name[W_MAX_PATH]; 97 __u32 copy_flags; 98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 __u64 file_size; 100} __attribute__((packed)); 101#define DATA_FRAGMENT (6 * 1024) 102struct hv_do_fcopy { 103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 struct hv_fcopy_hdr hdr; 105 __u32 pad; 106 __u64 offset; 107 __u32 size; 108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 __u8 data[DATA_FRAGMENT]; 110} __attribute__((packed)); 111#define HV_KVP_EXCHANGE_MAX_VALUE_SIZE (2048) 112#define HV_KVP_EXCHANGE_MAX_KEY_SIZE (512) 113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114#define REG_SZ 1 115#define REG_U32 4 116#define REG_U64 8 117#define KVP_OP_REGISTER 4 118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119#define KVP_OP_REGISTER1 100 120enum hv_kvp_exchg_op { 121 KVP_OP_GET = 0, 122 KVP_OP_SET, 123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 KVP_OP_DELETE, 125 KVP_OP_ENUMERATE, 126 KVP_OP_GET_IP_INFO, 127 KVP_OP_SET_IP_INFO, 128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 KVP_OP_COUNT 130}; 131enum hv_kvp_exchg_pool { 132 KVP_POOL_EXTERNAL = 0, 133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 KVP_POOL_GUEST, 135 KVP_POOL_AUTO, 136 KVP_POOL_AUTO_EXTERNAL, 137 KVP_POOL_AUTO_INTERNAL, 138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139 KVP_POOL_COUNT 140}; 141#define HV_S_OK 0x00000000 142#define HV_E_FAIL 0x80004005 143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144#define HV_S_CONT 0x80070103 145#define HV_ERROR_NOT_SUPPORTED 0x80070032 146#define HV_ERROR_MACHINE_LOCKED 0x800704F7 147#define HV_ERROR_DEVICE_NOT_CONNECTED 0x8007048F 148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149#define HV_INVALIDARG 0x80070057 150#define HV_GUID_NOTFOUND 0x80041002 151#define HV_ERROR_ALREADY_EXISTS 0x80070050 152#define ADDR_FAMILY_NONE 0x00 153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154#define ADDR_FAMILY_IPV4 0x01 155#define ADDR_FAMILY_IPV6 0x02 156#define MAX_ADAPTER_ID_SIZE 128 157#define MAX_IP_ADDR_SIZE 1024 158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159#define MAX_GATEWAY_SIZE 512 160struct hv_kvp_ipaddr_value { 161 __u16 adapter_id[MAX_ADAPTER_ID_SIZE]; 162 __u8 addr_family; 163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164 __u8 dhcp_enabled; 165 __u16 ip_addr[MAX_IP_ADDR_SIZE]; 166 __u16 sub_net[MAX_IP_ADDR_SIZE]; 167 __u16 gate_way[MAX_GATEWAY_SIZE]; 168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169 __u16 dns_addr[MAX_IP_ADDR_SIZE]; 170} __attribute__((packed)); 171struct hv_kvp_hdr { 172 __u8 operation; 173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 174 __u8 pool; 175 __u16 pad; 176} __attribute__((packed)); 177struct hv_kvp_exchg_msg_value { 178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 179 __u32 value_type; 180 __u32 key_size; 181 __u32 value_size; 182 __u8 key[HV_KVP_EXCHANGE_MAX_KEY_SIZE]; 183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 184 union { 185 __u8 value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE]; 186 __u32 value_u32; 187 __u64 value_u64; 188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 189 }; 190} __attribute__((packed)); 191struct hv_kvp_msg_enumerate { 192 __u32 index; 193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 194 struct hv_kvp_exchg_msg_value data; 195} __attribute__((packed)); 196struct hv_kvp_msg_get { 197 struct hv_kvp_exchg_msg_value data; 198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 199}; 200struct hv_kvp_msg_set { 201 struct hv_kvp_exchg_msg_value data; 202}; 203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 204struct hv_kvp_msg_delete { 205 __u32 key_size; 206 __u8 key[HV_KVP_EXCHANGE_MAX_KEY_SIZE]; 207}; 208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 209struct hv_kvp_register { 210 __u8 version[HV_KVP_EXCHANGE_MAX_KEY_SIZE]; 211}; 212struct hv_kvp_msg { 213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 214 union { 215 struct hv_kvp_hdr kvp_hdr; 216 int error; 217 }; 218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 219 union { 220 struct hv_kvp_msg_get kvp_get; 221 struct hv_kvp_msg_set kvp_set; 222 struct hv_kvp_msg_delete kvp_delete; 223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 224 struct hv_kvp_msg_enumerate kvp_enum_data; 225 struct hv_kvp_ipaddr_value kvp_ip_val; 226 struct hv_kvp_register kvp_register; 227 } body; 228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 229} __attribute__((packed)); 230struct hv_kvp_ip_msg { 231 __u8 operation; 232 __u8 pool; 233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 234 struct hv_kvp_ipaddr_value kvp_ip_val; 235} __attribute__((packed)); 236#endif 237