2 * Copyright (c) 2009-2012,2016 Microsoft Corp.
3 * Copyright (c) 2012 NetApp Inc.
4 * Copyright (c) 2012 Citrix Inc.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice unmodified, this list of conditions, and the following
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
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.
31 #ifndef __HYPERV_PRIV_H__
32 #define __HYPERV_PRIV_H__
34 #include <sys/param.h>
36 #include <sys/mutex.h>
39 #include <dev/hyperv/include/hyperv.h>
43 * Status codes for hypervisor operations.
46 typedef uint16_t hv_vmbus_status;
48 #define HV_MESSAGE_SIZE (256)
49 #define HV_MESSAGE_PAYLOAD_BYTE_COUNT (240)
50 #define HV_MESSAGE_PAYLOAD_QWORD_COUNT (30)
51 #define HV_ANY_VP (0xFFFFFFFF)
54 * Synthetic interrupt controller flag constants.
57 #define HV_EVENT_FLAGS_COUNT (256 * 8)
58 #define HV_EVENT_FLAGS_BYTE_COUNT (256)
59 #define HV_EVENT_FLAGS_DWORD_COUNT (256 / sizeof(uint32_t))
60 #define HV_EVENT_FLAGS_ULONG_COUNT (256 / sizeof(unsigned long))
63 * max channel count <== event_flags_dword_count * bit_of_dword
66 #define HV_CHANNEL_ULONG_LEN (64)
67 #define HV_CHANNEL_ULONG_SHIFT (6)
69 #define HV_CHANNEL_ULONG_LEN (32)
70 #define HV_CHANNEL_ULONG_SHIFT (5)
72 #define HV_CHANNEL_DWORD_LEN (32)
73 #define HV_CHANNEL_MAX_COUNT \
74 ((HV_EVENT_FLAGS_DWORD_COUNT) * HV_CHANNEL_DWORD_LEN)
76 * MessageId: HV_STATUS_INSUFFICIENT_BUFFERS
78 * You did not supply enough message buffers to send a message.
81 #define HV_STATUS_SUCCESS ((uint16_t)0)
82 #define HV_STATUS_INSUFFICIENT_BUFFERS ((uint16_t)0x0013)
84 typedef void (*hv_vmbus_channel_callback)(void *context);
89 } hv_vmbus_sg_buffer_list;
92 uint32_t current_interrupt_mask;
93 uint32_t current_read_index;
94 uint32_t current_write_index;
95 uint32_t bytes_avail_to_read;
96 uint32_t bytes_avail_to_write;
97 } hv_vmbus_ring_buffer_debug_info;
101 hv_vmbus_channel_state state;
102 hv_guid interface_type;
103 hv_guid interface_instance;
105 uint32_t server_monitor_pending;
106 uint32_t server_monitor_latency;
107 uint32_t server_monitor_connection_id;
108 uint32_t client_monitor_pending;
109 uint32_t client_monitor_latency;
110 uint32_t client_monitor_connection_id;
111 hv_vmbus_ring_buffer_debug_info inbound;
112 hv_vmbus_ring_buffer_debug_info outbound;
113 } hv_vmbus_channel_debug_info;
116 hv_vmbus_channel_version_supported version_supported;
117 hv_vmbus_channel_open_result open_result;
118 hv_vmbus_channel_gpadl_torndown gpadl_torndown;
119 hv_vmbus_channel_gpadl_created gpadl_created;
120 hv_vmbus_channel_version_response version_response;
121 } hv_vmbus_channel_msg_response;
124 * Represents each channel msg on the vmbus connection
125 * This is a variable-size data structure depending on
126 * the msg type itself
128 typedef struct hv_vmbus_channel_msg_info {
132 TAILQ_ENTRY(hv_vmbus_channel_msg_info) msg_list_entry;
134 * So far, this is only used to handle
137 TAILQ_HEAD(, hv_vmbus_channel_msg_info) sub_msg_list_anchor;
139 * Synchronize the request/response if
141 * KYS: Use a semaphore for now.
144 struct sema wait_sema;
145 hv_vmbus_channel_msg_response response;
146 uint32_t message_size;
148 * The channel message that goes out on
149 * the "wire". It will contain at
151 * hv_vmbus_channel_msg_header
154 unsigned char msg[0];
155 } hv_vmbus_channel_msg_info;
158 * The format must be the same as hv_vm_data_gpa_direct
160 typedef struct hv_vmbus_channel_packet_page_buffer {
162 uint16_t data_offset8;
165 uint64_t transaction_id;
167 uint32_t range_count;
168 hv_vmbus_page_buffer range[HV_MAX_PAGE_BUFFER_COUNT];
169 } __packed hv_vmbus_channel_packet_page_buffer;
172 * The format must be the same as hv_vm_data_gpa_direct
174 typedef struct hv_vmbus_channel_packet_multipage_buffer {
176 uint16_t data_offset8;
179 uint64_t transaction_id;
181 uint32_t range_count; /* Always 1 in this case */
182 hv_vmbus_multipage_buffer range;
183 } __packed hv_vmbus_channel_packet_multipage_buffer;
186 HV_VMBUS_MESSAGE_CONNECTION_ID = 1,
187 HV_VMBUS_MESSAGE_PORT_ID = 1,
188 HV_VMBUS_EVENT_CONNECTION_ID = 2,
189 HV_VMBUS_EVENT_PORT_ID = 2,
190 HV_VMBUS_MONITOR_CONNECTION_ID = 3,
191 HV_VMBUS_MONITOR_PORT_ID = 3,
192 HV_VMBUS_MESSAGE_SINT = 2,
193 HV_VMBUS_TIMER_SINT = 4,
196 #define HV_PRESENT_BIT 0x80000000
198 #define HV_HYPERCALL_PARAM_ALIGN sizeof(uint64_t)
200 struct vmbus_message;
201 union vmbus_event_flags;
204 hv_bool_uint8_t syn_ic_initialized;
206 struct vmbus_message *syn_ic_msg_page[MAXCPU];
207 union vmbus_event_flags *syn_ic_event_page[MAXCPU];
209 * For FreeBSD cpuid to Hyper-V vcpuid mapping.
211 uint32_t hv_vcpu_index[MAXCPU];
213 * Each cpu has its own software interrupt handler for channel
214 * event and msg handling.
216 struct taskqueue *hv_event_queue[MAXCPU];
217 struct taskqueue *hv_msg_tq[MAXCPU];
218 struct task hv_msg_task[MAXCPU];
222 * Define hypervisor message types
226 HV_MESSAGE_TYPE_NONE = 0x00000000,
229 * Memory access messages
231 HV_MESSAGE_TYPE_UNMAPPED_GPA = 0x80000000,
232 HV_MESSAGE_TYPE_GPA_INTERCEPT = 0x80000001,
235 * Timer notification messages
237 HV_MESSAGE_TIMER_EXPIRED = 0x80000010,
242 HV_MESSAGE_TYPE_INVALID_VP_REGISTER_VALUE = 0x80000020,
243 HV_MESSAGE_TYPE_UNRECOVERABLE_EXCEPTION = 0x80000021,
244 HV_MESSAGE_TYPE_UNSUPPORTED_FEATURE = 0x80000022,
247 * Trace buffer complete messages
249 HV_MESSAGE_TYPE_EVENT_LOG_BUFFER_COMPLETE = 0x80000040,
252 * Platform-specific processor intercept messages
254 HV_MESSAGE_TYPE_X64_IO_PORT_INTERCEPT = 0x80010000,
255 HV_MESSAGE_TYPE_X64_MSR_INTERCEPT = 0x80010001,
256 HV_MESSAGE_TYPE_X64_CPU_INTERCEPT = 0x80010002,
257 HV_MESSAGE_TYPE_X64_EXCEPTION_INTERCEPT = 0x80010003,
258 HV_MESSAGE_TYPE_X64_APIC_EOI = 0x80010004,
259 HV_MESSAGE_TYPE_X64_LEGACY_FP_ERROR = 0x80010005
264 * Define port identifier type
266 typedef union _hv_vmbus_port_id {
267 uint32_t as_uint32_t;
275 * Define synthetic interrupt controller message flag
280 uint8_t message_pending:1;
283 } hv_vmbus_msg_flags;
285 typedef uint64_t hv_vmbus_partition_id;
288 * Define synthetic interrupt controller message header
291 hv_vmbus_msg_type message_type;
292 uint8_t payload_size;
293 hv_vmbus_msg_flags message_flags;
296 hv_vmbus_partition_id sender;
297 hv_vmbus_port_id port;
299 } hv_vmbus_msg_header;
302 * Define synthetic interrupt controller message format
304 typedef struct vmbus_message {
305 hv_vmbus_msg_header header;
307 uint64_t payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT];
312 * Maximum channels is determined by the size of the interrupt
313 * page which is PAGE_SIZE. 1/2 of PAGE_SIZE is for
314 * send endpoint interrupt and the other is receive
315 * endpoint interrupt.
317 * Note: (PAGE_SIZE >> 1) << 3 allocates 16348 channels
319 #define HV_MAX_NUM_CHANNELS (PAGE_SIZE >> 1) << 3
322 * (The value here must be in multiple of 32)
324 #define HV_MAX_NUM_CHANNELS_SUPPORTED 256
327 * VM Bus connection states
334 } hv_vmbus_connect_state;
336 #define HV_MAX_SIZE_CHANNEL_MESSAGE HV_MESSAGE_PAYLOAD_BYTE_COUNT
340 hv_vmbus_connect_state connect_state;
341 uint32_t next_gpadl_handle;
343 * Represents channel interrupts. Each bit position
344 * represents a channel.
345 * When a channel sends an interrupt via VMBUS, it
346 * finds its bit in the send_interrupt_page, set it and
347 * calls Hv to generate a port event. The other end
348 * receives the port event and parse the
349 * recv_interrupt_page to see which bit is set
351 void *interrupt_page;
352 void *send_interrupt_page;
353 void *recv_interrupt_page;
355 * 2 pages - 1st page for parent->child
356 * notification and 2nd is child->parent
359 void *monitor_page_1;
360 void *monitor_page_2;
361 TAILQ_HEAD(, hv_vmbus_channel_msg_info) channel_msg_anchor;
362 struct mtx channel_msg_lock;
364 * List of primary channels. Sub channels will be linked
365 * under their primary channel.
367 TAILQ_HEAD(, hv_vmbus_channel) channel_anchor;
368 struct mtx channel_lock;
371 * channel table for fast lookup through id.
373 hv_vmbus_channel **channels;
374 } hv_vmbus_connection;
377 uint64_t as_uint64_t;
379 uint64_t build_number : 16;
380 uint64_t service_version : 8; /* Service Pack, etc. */
381 uint64_t minor_version : 8;
382 uint64_t major_version : 8;
384 * HV_GUEST_OS_MICROSOFT_IDS (If Vendor=MS)
388 uint64_t vendor_id : 16;
390 } hv_vmbus_x64_msr_guest_os_id_contents;
394 uint64_t as_uint64_t;
397 uint64_t reserved :11;
398 uint64_t guest_physical_address :52;
400 } hv_vmbus_x64_msr_hypercall_contents;
403 uint32_t as_uint32_t;
405 uint32_t group_enable :4;
408 } hv_vmbus_monitor_trigger_state;
411 uint64_t as_uint64_t;
416 } hv_vmbus_monitor_trigger_group;
419 hv_vmbus_connection_id connection_id;
420 uint16_t flag_number;
422 } hv_vmbus_monitor_parameter;
425 * hv_vmbus_monitor_page Layout
426 * ------------------------------------------------------
427 * | 0 | trigger_state (4 bytes) | Rsvd1 (4 bytes) |
428 * | 8 | trigger_group[0] |
429 * | 10 | trigger_group[1] |
430 * | 18 | trigger_group[2] |
431 * | 20 | trigger_group[3] |
435 * | 40 | next_check_time[0][0] | next_check_time[0][1] |
437 * | 240 | latency[0][0..3] |
439 * | 440 | parameter[0][0] |
440 * | 448 | parameter[0][1] |
443 * ------------------------------------------------------
447 hv_vmbus_monitor_trigger_state trigger_state;
450 hv_vmbus_monitor_trigger_group trigger_group[4];
453 int32_t next_check_time[4][32];
455 uint16_t latency[4][32];
456 uint64_t rsvd_z3[32];
458 hv_vmbus_monitor_parameter parameter[4][32];
460 uint8_t rsvd_z4[1984];
461 } hv_vmbus_monitor_page;
464 * The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent
465 * is set by CPUID(HV_CPU_ID_FUNCTION_VERSION_AND_FEATURES).
468 HV_CPU_ID_FUNCTION_VERSION_AND_FEATURES = 0x00000001,
469 HV_CPU_ID_FUNCTION_HV_VENDOR_AND_MAX_FUNCTION = 0x40000000,
470 HV_CPU_ID_FUNCTION_HV_INTERFACE = 0x40000001,
472 * The remaining functions depend on the value
473 * of hv_cpu_id_function_interface
475 HV_CPU_ID_FUNCTION_MS_HV_VERSION = 0x40000002,
476 HV_CPU_ID_FUNCTION_MS_HV_FEATURES = 0x40000003,
477 HV_CPU_ID_FUNCTION_MS_HV_ENLIGHTENMENT_INFORMATION = 0x40000004,
478 HV_CPU_ID_FUNCTION_MS_HV_IMPLEMENTATION_LIMITS = 0x40000005,
479 HV_CPU_ID_FUNCTION_MS_HV_HARDWARE_FEATURE = 0x40000006
480 } hv_vmbus_cpuid_function;
482 #define HV_FEATURE_MSR_TIME_REFCNT 0x0002 /* MSR_TIME_REF_COUNT */
483 #define HV_FEATURE_MSR_SYNIC 0x0004 /* MSRs for SynIC */
484 #define HV_FEATURE_MSR_SYNTIMER 0x0008 /* MSRs for SynTimer */
485 #define HV_FEATURE_MSR_APIC 0x0010 /* MSR_{EOI,ICR,TPR} */
486 #define HV_FEATURE_MSR_HYPERCALL 0x0020 /* MSR_{GUEST_OS_ID,HYPERCALL} */
487 #define HV_FEATURE_MSR_GUEST_IDLE 0x0400 /* MSR_GUEST_IDLE */
489 #define HV_PM_FEATURE_CSTATE_MASK 0x000f
490 #define HV_PM_FEATURE_C3_HPET 0x0010 /* C3 requires HPET */
491 #define HV_PM_FEATURE_CSTATE(f) ((f) & HV_PM_FEATURE_CSTATE_MASK)
493 #define HV_FEATURE3_MWAIT 0x0001 /* MWAIT */
494 #define HV_FEATURE3_XMM_HYPERCALL 0x0010 /* hypercall input through XMM regs */
495 #define HV_FEATURE3_GUEST_IDLE 0x0020 /* guest idle support */
496 #define HV_FEATURE3_NUMA 0x0080 /* NUMA distance query support */
497 #define HV_FEATURE3_TIME_FREQ 0x0100 /* timer frequency query (TSC, LAPIC) */
498 #define HV_FEATURE3_MSR_CRASH 0x0400 /* MSRs for guest crash */
501 * Define the format of the SIMP register
504 uint64_t as_uint64_t;
506 uint64_t simp_enabled : 1;
507 uint64_t preserved : 11;
508 uint64_t base_simp_gpa : 52;
510 } hv_vmbus_synic_simp;
513 * Define the format of the SIEFP register
516 uint64_t as_uint64_t;
518 uint64_t siefp_enabled : 1;
519 uint64_t preserved : 11;
520 uint64_t base_siefp_gpa : 52;
522 } hv_vmbus_synic_siefp;
525 * Define synthetic interrupt source
528 uint64_t as_uint64_t;
531 uint64_t reserved1 : 8;
533 uint64_t auto_eoi : 1;
534 uint64_t reserved2 : 46;
536 } hv_vmbus_synic_sint;
539 * Timer configuration register.
541 union hv_timer_config {
547 uint64_t auto_enable:1;
548 uint64_t reserved_z0:12;
550 uint64_t reserved_z1:44;
555 * Define syn_ic control register
557 typedef union _hv_vmbus_synic_scontrol {
558 uint64_t as_uint64_t;
561 uint64_t reserved : 63;
563 } hv_vmbus_synic_scontrol;
566 * Define the hv_vmbus_post_message hypercall input structure
569 hv_vmbus_connection_id connection_id;
571 hv_vmbus_msg_type message_type;
572 uint32_t payload_size;
573 uint64_t payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT];
574 } hv_vmbus_input_post_message;
577 * Define the synthetic interrupt controller event flags format
579 typedef union vmbus_event_flags {
580 uint8_t flags8[HV_EVENT_FLAGS_BYTE_COUNT];
581 uint32_t flags32[HV_EVENT_FLAGS_DWORD_COUNT];
582 unsigned long flagsul[HV_EVENT_FLAGS_ULONG_COUNT];
583 } hv_vmbus_synic_event_flags;
584 CTASSERT(sizeof(hv_vmbus_synic_event_flags) == HV_EVENT_FLAGS_BYTE_COUNT);
586 #define HV_X64_CPUID_MIN (0x40000005)
587 #define HV_X64_CPUID_MAX (0x4000ffff)
590 * Declare the MSR used to identify the guest OS
592 #define HV_X64_MSR_GUEST_OS_ID (0x40000000)
594 * Declare the MSR used to setup pages used to communicate with the hypervisor
596 #define HV_X64_MSR_HYPERCALL (0x40000001)
597 /* MSR used to provide vcpu index */
598 #define HV_X64_MSR_VP_INDEX (0x40000002)
600 #define HV_X64_MSR_TIME_REF_COUNT (0x40000020)
603 * Define synthetic interrupt controller model specific registers
605 #define HV_X64_MSR_SCONTROL (0x40000080)
606 #define HV_X64_MSR_SVERSION (0x40000081)
607 #define HV_X64_MSR_SIEFP (0x40000082)
608 #define HV_X64_MSR_SIMP (0x40000083)
609 #define HV_X64_MSR_EOM (0x40000084)
611 #define HV_X64_MSR_SINT0 (0x40000090)
612 #define HV_X64_MSR_SINT1 (0x40000091)
613 #define HV_X64_MSR_SINT2 (0x40000092)
614 #define HV_X64_MSR_SINT3 (0x40000093)
615 #define HV_X64_MSR_SINT4 (0x40000094)
616 #define HV_X64_MSR_SINT5 (0x40000095)
617 #define HV_X64_MSR_SINT6 (0x40000096)
618 #define HV_X64_MSR_SINT7 (0x40000097)
619 #define HV_X64_MSR_SINT8 (0x40000098)
620 #define HV_X64_MSR_SINT9 (0x40000099)
621 #define HV_X64_MSR_SINT10 (0x4000009A)
622 #define HV_X64_MSR_SINT11 (0x4000009B)
623 #define HV_X64_MSR_SINT12 (0x4000009C)
624 #define HV_X64_MSR_SINT13 (0x4000009D)
625 #define HV_X64_MSR_SINT14 (0x4000009E)
626 #define HV_X64_MSR_SINT15 (0x4000009F)
629 * Synthetic Timer MSRs. Four timers per vcpu.
631 #define HV_X64_MSR_STIMER0_CONFIG 0x400000B0
632 #define HV_X64_MSR_STIMER0_COUNT 0x400000B1
633 #define HV_X64_MSR_STIMER1_CONFIG 0x400000B2
634 #define HV_X64_MSR_STIMER1_COUNT 0x400000B3
635 #define HV_X64_MSR_STIMER2_CONFIG 0x400000B4
636 #define HV_X64_MSR_STIMER2_COUNT 0x400000B5
637 #define HV_X64_MSR_STIMER3_CONFIG 0x400000B6
638 #define HV_X64_MSR_STIMER3_COUNT 0x400000B7
641 * Declare the various hypercall operations
644 HV_CALL_POST_MESSAGE = 0x005c,
645 HV_CALL_SIGNAL_EVENT = 0x005d,
646 } hv_vmbus_call_code;
652 extern hv_vmbus_context hv_vmbus_g_context;
653 extern hv_vmbus_connection hv_vmbus_g_connection;
655 extern u_int hyperv_features;
656 extern u_int hyperv_recommends;
658 typedef void (*vmbus_msg_handler)(hv_vmbus_channel_msg_header *msg);
660 typedef struct hv_vmbus_channel_msg_table_entry {
661 hv_vmbus_channel_msg_type messageType;
663 vmbus_msg_handler messageHandler;
664 } hv_vmbus_channel_msg_table_entry;
666 extern hv_vmbus_channel_msg_table_entry g_channel_message_table[];
669 * Private, VM Bus functions
671 struct sysctl_ctx_list;
672 struct sysctl_oid_list;
674 void hv_ring_buffer_stat(
675 struct sysctl_ctx_list *ctx,
676 struct sysctl_oid_list *tree_node,
677 hv_vmbus_ring_buffer_info *rbi,
680 int hv_vmbus_ring_buffer_init(
681 hv_vmbus_ring_buffer_info *ring_info,
683 uint32_t buffer_len);
685 void hv_ring_buffer_cleanup(
686 hv_vmbus_ring_buffer_info *ring_info);
688 int hv_ring_buffer_write(
689 hv_vmbus_ring_buffer_info *ring_info,
690 hv_vmbus_sg_buffer_list sg_buffers[],
691 uint32_t sg_buff_count,
692 boolean_t *need_sig);
694 int hv_ring_buffer_peek(
695 hv_vmbus_ring_buffer_info *ring_info,
697 uint32_t buffer_len);
699 int hv_ring_buffer_read(
700 hv_vmbus_ring_buffer_info *ring_info,
705 uint32_t hv_vmbus_get_ring_buffer_interrupt_mask(
706 hv_vmbus_ring_buffer_info *ring_info);
708 void hv_vmbus_dump_ring_info(
709 hv_vmbus_ring_buffer_info *ring_info,
712 void hv_ring_buffer_read_begin(
713 hv_vmbus_ring_buffer_info *ring_info);
715 uint32_t hv_ring_buffer_read_end(
716 hv_vmbus_ring_buffer_info *ring_info);
718 hv_vmbus_channel* hv_vmbus_allocate_channel(void);
719 void hv_vmbus_free_vmbus_channel(hv_vmbus_channel *channel);
720 int hv_vmbus_request_channel_offers(void);
721 void hv_vmbus_release_unattached_channels(void);
723 uint16_t hv_vmbus_post_msg_via_msg_ipc(
724 hv_vmbus_connection_id connection_id,
725 hv_vmbus_msg_type message_type,
727 size_t payload_size);
729 uint16_t hv_vmbus_signal_event(void *con_id);
730 void hv_vmbus_synic_init(void *irq_arg);
731 void hv_vmbus_synic_cleanup(void *arg);
733 struct hv_device* hv_vmbus_child_device_create(
735 hv_guid device_instance,
736 hv_vmbus_channel *channel);
738 int hv_vmbus_child_device_register(
739 struct hv_device *child_dev);
740 int hv_vmbus_child_device_unregister(
741 struct hv_device *child_dev);
744 * Connection interfaces
746 int hv_vmbus_connect(void);
747 int hv_vmbus_disconnect(void);
748 int hv_vmbus_post_message(void *buffer, size_t buf_size);
749 int hv_vmbus_set_event(hv_vmbus_channel *channel);
752 * Event Timer interfaces
754 void hv_et_init(void);
755 void hv_et_intr(struct trapframe*);
757 /* Wait for device creation */
758 void vmbus_scan(void);
761 void *page_buffers[2 * MAXCPU];
764 #endif /* __HYPERV_PRIV_H__ */