hyperv.h (307456) | hyperv.h (307457) |
---|---|
1/*- 2 * Copyright (c) 2009-2012,2016 Microsoft Corp. 3 * Copyright (c) 2012 NetApp Inc. 4 * Copyright (c) 2012 Citrix Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 2009-2012,2016 Microsoft Corp. 3 * Copyright (c) 2012 NetApp Inc. 4 * Copyright (c) 2012 Citrix Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $FreeBSD: stable/11/sys/dev/hyperv/include/hyperv.h 307456 2016-10-17 02:34:13Z sephe $ | 28 * $FreeBSD: stable/11/sys/dev/hyperv/include/hyperv.h 307457 2016-10-17 02:36:49Z sephe $ |
29 */ 30 31/** 32 * HyperV definitions for messages that are sent between instances of the 33 * Channel Management Library in separate partitions, or in some cases, 34 * back to itself. 35 */ 36 --- 48 unchanged lines hidden (view full) --- 85struct hyperv_guid { 86 uint8_t hv_guid[16]; 87} __packed; 88 89#define HYPERV_GUID_STRLEN 40 90 91int hyperv_guid2str(const struct hyperv_guid *, char *, size_t); 92 | 29 */ 30 31/** 32 * HyperV definitions for messages that are sent between instances of the 33 * Channel Management Library in separate partitions, or in some cases, 34 * back to itself. 35 */ 36 --- 48 unchanged lines hidden (view full) --- 85struct hyperv_guid { 86 uint8_t hv_guid[16]; 87} __packed; 88 89#define HYPERV_GUID_STRLEN 40 90 91int hyperv_guid2str(const struct hyperv_guid *, char *, size_t); 92 |
93typedef struct { 94 uint16_t type; 95 uint16_t data_offset8; 96 uint16_t length8; 97 uint16_t flags; 98 uint64_t transaction_id; 99} __packed hv_vm_packet_descriptor; 100 101typedef struct { 102 uint32_t byte_count; 103 uint32_t byte_offset; 104} __packed hv_vm_transfer_page; 105 106typedef struct { 107 hv_vm_packet_descriptor d; 108 uint16_t transfer_page_set_id; 109 hv_bool_uint8_t sender_owns_set; 110 uint8_t reserved; 111 uint32_t range_count; 112 hv_vm_transfer_page ranges[1]; 113} __packed hv_vm_transfer_page_packet_header; 114 | |
115#define HW_MACADDR_LEN 6 116 117/* 118 * Common defines for Hyper-V ICs 119 */ 120#define HV_ICMSGTYPE_NEGOTIATE 0 121#define HV_ICMSGTYPE_HEARTBEAT 1 122#define HV_ICMSGTYPE_KVPEXCHANGE 2 --- 170 unchanged lines hidden (view full) --- 293hv_set_channel_read_state(hv_vmbus_channel* channel, boolean_t on) 294{ 295 if (!on) 296 channel->ch_flags &= ~VMBUS_CHAN_FLAG_BATCHREAD; 297 else 298 channel->ch_flags |= VMBUS_CHAN_FLAG_BATCHREAD; 299} 300 | 93#define HW_MACADDR_LEN 6 94 95/* 96 * Common defines for Hyper-V ICs 97 */ 98#define HV_ICMSGTYPE_NEGOTIATE 0 99#define HV_ICMSGTYPE_HEARTBEAT 1 100#define HV_ICMSGTYPE_KVPEXCHANGE 2 --- 170 unchanged lines hidden (view full) --- 271hv_set_channel_read_state(hv_vmbus_channel* channel, boolean_t on) 272{ 273 if (!on) 274 channel->ch_flags &= ~VMBUS_CHAN_FLAG_BATCHREAD; 275 else 276 channel->ch_flags |= VMBUS_CHAN_FLAG_BATCHREAD; 277} 278 |
301int hv_vmbus_channel_recv_packet( 302 hv_vmbus_channel* channel, 303 void* buffer, 304 uint32_t buffer_len, 305 uint32_t* buffer_actual_len, 306 uint64_t* request_id); 307 308int hv_vmbus_channel_recv_packet_raw( 309 hv_vmbus_channel* channel, 310 void* buffer, 311 uint32_t buffer_len, 312 uint32_t* buffer_actual_len, 313 uint64_t* request_id); 314 | |
315int hv_vmbus_channel_open( 316 hv_vmbus_channel* channel, 317 uint32_t send_ring_buffer_size, 318 uint32_t recv_ring_buffer_size, 319 void* user_data, 320 uint32_t user_data_len, 321 vmbus_chan_callback_t cb, 322 void *cbarg); --- 45 unchanged lines hidden --- | 279int hv_vmbus_channel_open( 280 hv_vmbus_channel* channel, 281 uint32_t send_ring_buffer_size, 282 uint32_t recv_ring_buffer_size, 283 void* user_data, 284 uint32_t user_data_len, 285 vmbus_chan_callback_t cb, 286 void *cbarg); --- 45 unchanged lines hidden --- |