2 * Copyright (c) 2009-2012 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))
62 * max channel count <== event_flags_dword_count * bit_of_dword
64 #define HV_CHANNEL_DWORD_LEN (32)
65 #define HV_CHANNEL_MAX_COUNT \
66 ((HV_EVENT_FLAGS_DWORD_COUNT) * HV_CHANNEL_DWORD_LEN)
68 * MessageId: HV_STATUS_INSUFFICIENT_BUFFERS
70 * You did not supply enough message buffers to send a message.
73 #define HV_STATUS_SUCCESS ((uint16_t)0)
74 #define HV_STATUS_INSUFFICIENT_BUFFERS ((uint16_t)0x0013)
76 typedef void (*hv_vmbus_channel_callback)(void *context);
81 } hv_vmbus_sg_buffer_list;
84 uint32_t current_interrupt_mask;
85 uint32_t current_read_index;
86 uint32_t current_write_index;
87 uint32_t bytes_avail_to_read;
88 uint32_t bytes_avail_to_write;
89 } hv_vmbus_ring_buffer_debug_info;
93 hv_vmbus_channel_state state;
94 hv_guid interface_type;
95 hv_guid interface_instance;
97 uint32_t server_monitor_pending;
98 uint32_t server_monitor_latency;
99 uint32_t server_monitor_connection_id;
100 uint32_t client_monitor_pending;
101 uint32_t client_monitor_latency;
102 uint32_t client_monitor_connection_id;
103 hv_vmbus_ring_buffer_debug_info inbound;
104 hv_vmbus_ring_buffer_debug_info outbound;
105 } hv_vmbus_channel_debug_info;
108 hv_vmbus_channel_version_supported version_supported;
109 hv_vmbus_channel_open_result open_result;
110 hv_vmbus_channel_gpadl_torndown gpadl_torndown;
111 hv_vmbus_channel_gpadl_created gpadl_created;
112 hv_vmbus_channel_version_response version_response;
113 } hv_vmbus_channel_msg_response;
116 * Represents each channel msg on the vmbus connection
117 * This is a variable-size data structure depending on
118 * the msg type itself
120 typedef struct hv_vmbus_channel_msg_info {
124 TAILQ_ENTRY(hv_vmbus_channel_msg_info) msg_list_entry;
126 * So far, this is only used to handle
129 TAILQ_HEAD(, hv_vmbus_channel_msg_info) sub_msg_list_anchor;
131 * Synchronize the request/response if
133 * KYS: Use a semaphore for now.
136 struct sema wait_sema;
137 hv_vmbus_channel_msg_response response;
138 uint32_t message_size;
140 * The channel message that goes out on
141 * the "wire". It will contain at
143 * hv_vmbus_channel_msg_header
146 unsigned char msg[0];
147 } hv_vmbus_channel_msg_info;
150 * The format must be the same as hv_vm_data_gpa_direct
152 typedef struct hv_vmbus_channel_packet_page_buffer {
154 uint16_t data_offset8;
157 uint64_t transaction_id;
159 uint32_t range_count;
160 hv_vmbus_page_buffer range[HV_MAX_PAGE_BUFFER_COUNT];
161 } __packed hv_vmbus_channel_packet_page_buffer;
164 * The format must be the same as hv_vm_data_gpa_direct
166 typedef struct hv_vmbus_channel_packet_multipage_buffer {
168 uint16_t data_offset8;
171 uint64_t transaction_id;
173 uint32_t range_count; /* Always 1 in this case */
174 hv_vmbus_multipage_buffer range;
175 } __packed hv_vmbus_channel_packet_multipage_buffer;
178 HV_VMBUS_MESSAGE_CONNECTION_ID = 1,
179 HV_VMBUS_MESSAGE_PORT_ID = 1,
180 HV_VMBUS_EVENT_CONNECTION_ID = 2,
181 HV_VMBUS_EVENT_PORT_ID = 2,
182 HV_VMBUS_MONITOR_CONNECTION_ID = 3,
183 HV_VMBUS_MONITOR_PORT_ID = 3,
184 HV_VMBUS_MESSAGE_SINT = 2,
185 HV_VMBUS_TIMER_SINT = 4,
188 #define HV_PRESENT_BIT 0x80000000
190 #define HV_HYPERCALL_PARAM_ALIGN sizeof(uint64_t)
194 void* hypercall_page;
195 hv_bool_uint8_t syn_ic_initialized;
197 hv_vmbus_handle syn_ic_msg_page[MAXCPU];
198 hv_vmbus_handle syn_ic_event_page[MAXCPU];
200 * For FreeBSD cpuid to Hyper-V vcpuid mapping.
202 uint32_t hv_vcpu_index[MAXCPU];
204 * Each cpu has its own software interrupt handler for channel
205 * event and msg handling.
207 struct taskqueue *hv_event_queue[MAXCPU];
208 struct taskqueue *hv_msg_tq[MAXCPU];
209 struct task hv_msg_task[MAXCPU];
211 * Host use this vector to intrrupt guest for vmbus channel
214 unsigned int hv_cb_vector;
218 * Define hypervisor message types
222 HV_MESSAGE_TYPE_NONE = 0x00000000,
225 * Memory access messages
227 HV_MESSAGE_TYPE_UNMAPPED_GPA = 0x80000000,
228 HV_MESSAGE_TYPE_GPA_INTERCEPT = 0x80000001,
231 * Timer notification messages
233 HV_MESSAGE_TIMER_EXPIRED = 0x80000010,
238 HV_MESSAGE_TYPE_INVALID_VP_REGISTER_VALUE = 0x80000020,
239 HV_MESSAGE_TYPE_UNRECOVERABLE_EXCEPTION = 0x80000021,
240 HV_MESSAGE_TYPE_UNSUPPORTED_FEATURE = 0x80000022,
243 * Trace buffer complete messages
245 HV_MESSAGE_TYPE_EVENT_LOG_BUFFER_COMPLETE = 0x80000040,
248 * Platform-specific processor intercept messages
250 HV_MESSAGE_TYPE_X64_IO_PORT_INTERCEPT = 0x80010000,
251 HV_MESSAGE_TYPE_X64_MSR_INTERCEPT = 0x80010001,
252 HV_MESSAGE_TYPE_X64_CPU_INTERCEPT = 0x80010002,
253 HV_MESSAGE_TYPE_X64_EXCEPTION_INTERCEPT = 0x80010003,
254 HV_MESSAGE_TYPE_X64_APIC_EOI = 0x80010004,
255 HV_MESSAGE_TYPE_X64_LEGACY_FP_ERROR = 0x80010005
260 * Define port identifier type
262 typedef union _hv_vmbus_port_id {
263 uint32_t as_uint32_t;
271 * Define synthetic interrupt controller message flag
276 uint8_t message_pending:1;
279 } hv_vmbus_msg_flags;
281 typedef uint64_t hv_vmbus_partition_id;
284 * Define synthetic interrupt controller message header
287 hv_vmbus_msg_type message_type;
288 uint8_t payload_size;
289 hv_vmbus_msg_flags message_flags;
292 hv_vmbus_partition_id sender;
293 hv_vmbus_port_id port;
295 } hv_vmbus_msg_header;
298 * Define synthetic interrupt controller message format
301 hv_vmbus_msg_header header;
303 uint64_t payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT];
308 * Maximum channels is determined by the size of the interrupt
309 * page which is PAGE_SIZE. 1/2 of PAGE_SIZE is for
310 * send endpoint interrupt and the other is receive
311 * endpoint interrupt.
313 * Note: (PAGE_SIZE >> 1) << 3 allocates 16348 channels
315 #define HV_MAX_NUM_CHANNELS (PAGE_SIZE >> 1) << 3
318 * (The value here must be in multiple of 32)
320 #define HV_MAX_NUM_CHANNELS_SUPPORTED 256
323 * VM Bus connection states
330 } hv_vmbus_connect_state;
332 #define HV_MAX_SIZE_CHANNEL_MESSAGE HV_MESSAGE_PAYLOAD_BYTE_COUNT
336 hv_vmbus_connect_state connect_state;
337 uint32_t next_gpadl_handle;
339 * Represents channel interrupts. Each bit position
340 * represents a channel.
341 * When a channel sends an interrupt via VMBUS, it
342 * finds its bit in the send_interrupt_page, set it and
343 * calls Hv to generate a port event. The other end
344 * receives the port event and parse the
345 * recv_interrupt_page to see which bit is set
347 void *interrupt_page;
348 void *send_interrupt_page;
349 void *recv_interrupt_page;
351 * 2 pages - 1st page for parent->child
352 * notification and 2nd is child->parent
355 void *monitor_page_1;
356 void *monitor_page_2;
357 TAILQ_HEAD(, hv_vmbus_channel_msg_info) channel_msg_anchor;
358 struct mtx channel_msg_lock;
360 * List of primary channels. Sub channels will be linked
361 * under their primary channel.
363 TAILQ_HEAD(, hv_vmbus_channel) channel_anchor;
364 struct mtx channel_lock;
367 * channel table for fast lookup through id.
369 hv_vmbus_channel **channels;
370 } hv_vmbus_connection;
373 uint64_t as_uint64_t;
375 uint64_t build_number : 16;
376 uint64_t service_version : 8; /* Service Pack, etc. */
377 uint64_t minor_version : 8;
378 uint64_t major_version : 8;
380 * HV_GUEST_OS_MICROSOFT_IDS (If Vendor=MS)
384 uint64_t vendor_id : 16;
386 } hv_vmbus_x64_msr_guest_os_id_contents;
390 uint64_t as_uint64_t;
393 uint64_t reserved :11;
394 uint64_t guest_physical_address :52;
396 } hv_vmbus_x64_msr_hypercall_contents;
399 uint32_t as_uint32_t;
401 uint32_t group_enable :4;
404 } hv_vmbus_monitor_trigger_state;
407 uint64_t as_uint64_t;
412 } hv_vmbus_monitor_trigger_group;
415 hv_vmbus_connection_id connection_id;
416 uint16_t flag_number;
418 } hv_vmbus_monitor_parameter;
421 * hv_vmbus_monitor_page Layout
422 * ------------------------------------------------------
423 * | 0 | trigger_state (4 bytes) | Rsvd1 (4 bytes) |
424 * | 8 | trigger_group[0] |
425 * | 10 | trigger_group[1] |
426 * | 18 | trigger_group[2] |
427 * | 20 | trigger_group[3] |
431 * | 40 | next_check_time[0][0] | next_check_time[0][1] |
433 * | 240 | latency[0][0..3] |
435 * | 440 | parameter[0][0] |
436 * | 448 | parameter[0][1] |
439 * ------------------------------------------------------
443 hv_vmbus_monitor_trigger_state trigger_state;
446 hv_vmbus_monitor_trigger_group trigger_group[4];
449 int32_t next_check_time[4][32];
451 uint16_t latency[4][32];
452 uint64_t rsvd_z3[32];
454 hv_vmbus_monitor_parameter parameter[4][32];
456 uint8_t rsvd_z4[1984];
457 } hv_vmbus_monitor_page;
460 * The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent
461 * is set by CPUID(HV_CPU_ID_FUNCTION_VERSION_AND_FEATURES).
464 HV_CPU_ID_FUNCTION_VERSION_AND_FEATURES = 0x00000001,
465 HV_CPU_ID_FUNCTION_HV_VENDOR_AND_MAX_FUNCTION = 0x40000000,
466 HV_CPU_ID_FUNCTION_HV_INTERFACE = 0x40000001,
468 * The remaining functions depend on the value
469 * of hv_cpu_id_function_interface
471 HV_CPU_ID_FUNCTION_MS_HV_VERSION = 0x40000002,
472 HV_CPU_ID_FUNCTION_MS_HV_FEATURES = 0x40000003,
473 HV_CPU_ID_FUNCTION_MS_HV_ENLIGHTENMENT_INFORMATION = 0x40000004,
474 HV_CPU_ID_FUNCTION_MS_HV_IMPLEMENTATION_LIMITS = 0x40000005,
475 HV_CPU_ID_FUNCTION_MS_HV_HARDWARE_FEATURE = 0x40000006
476 } hv_vmbus_cpuid_function;
478 #define HV_FEATURE_MSR_TIME_REFCNT (1 << 1)
479 #define HV_FEATURE_MSR_SYNCIC (1 << 2)
480 #define HV_FEATURE_MSR_STIMER (1 << 3)
481 #define HV_FEATURE_MSR_APIC (1 << 4)
482 #define HV_FEATURE_MSR_HYPERCALL (1 << 5)
483 #define HV_FEATURE_MSR_GUEST_IDLE (1 << 10)
486 * Define the format of the SIMP register
489 uint64_t as_uint64_t;
491 uint64_t simp_enabled : 1;
492 uint64_t preserved : 11;
493 uint64_t base_simp_gpa : 52;
495 } hv_vmbus_synic_simp;
498 * Define the format of the SIEFP register
501 uint64_t as_uint64_t;
503 uint64_t siefp_enabled : 1;
504 uint64_t preserved : 11;
505 uint64_t base_siefp_gpa : 52;
507 } hv_vmbus_synic_siefp;
510 * Define synthetic interrupt source
513 uint64_t as_uint64_t;
516 uint64_t reserved1 : 8;
518 uint64_t auto_eoi : 1;
519 uint64_t reserved2 : 46;
521 } hv_vmbus_synic_sint;
524 * Timer configuration register.
526 union hv_timer_config {
532 uint64_t auto_enable:1;
533 uint64_t reserved_z0:12;
535 uint64_t reserved_z1:44;
540 * Define syn_ic control register
542 typedef union _hv_vmbus_synic_scontrol {
543 uint64_t as_uint64_t;
546 uint64_t reserved : 63;
548 } hv_vmbus_synic_scontrol;
551 * Define the hv_vmbus_post_message hypercall input structure
554 hv_vmbus_connection_id connection_id;
556 hv_vmbus_msg_type message_type;
557 uint32_t payload_size;
558 uint64_t payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT];
559 } hv_vmbus_input_post_message;
562 * Define the synthetic interrupt controller event flags format
565 uint8_t flags8[HV_EVENT_FLAGS_BYTE_COUNT];
566 uint32_t flags32[HV_EVENT_FLAGS_DWORD_COUNT];
567 } hv_vmbus_synic_event_flags;
569 #define HV_X64_CPUID_MIN (0x40000005)
570 #define HV_X64_CPUID_MAX (0x4000ffff)
573 * Declare the MSR used to identify the guest OS
575 #define HV_X64_MSR_GUEST_OS_ID (0x40000000)
577 * Declare the MSR used to setup pages used to communicate with the hypervisor
579 #define HV_X64_MSR_HYPERCALL (0x40000001)
580 /* MSR used to provide vcpu index */
581 #define HV_X64_MSR_VP_INDEX (0x40000002)
583 #define HV_X64_MSR_TIME_REF_COUNT (0x40000020)
586 * Define synthetic interrupt controller model specific registers
588 #define HV_X64_MSR_SCONTROL (0x40000080)
589 #define HV_X64_MSR_SVERSION (0x40000081)
590 #define HV_X64_MSR_SIEFP (0x40000082)
591 #define HV_X64_MSR_SIMP (0x40000083)
592 #define HV_X64_MSR_EOM (0x40000084)
594 #define HV_X64_MSR_SINT0 (0x40000090)
595 #define HV_X64_MSR_SINT1 (0x40000091)
596 #define HV_X64_MSR_SINT2 (0x40000092)
597 #define HV_X64_MSR_SINT3 (0x40000093)
598 #define HV_X64_MSR_SINT4 (0x40000094)
599 #define HV_X64_MSR_SINT5 (0x40000095)
600 #define HV_X64_MSR_SINT6 (0x40000096)
601 #define HV_X64_MSR_SINT7 (0x40000097)
602 #define HV_X64_MSR_SINT8 (0x40000098)
603 #define HV_X64_MSR_SINT9 (0x40000099)
604 #define HV_X64_MSR_SINT10 (0x4000009A)
605 #define HV_X64_MSR_SINT11 (0x4000009B)
606 #define HV_X64_MSR_SINT12 (0x4000009C)
607 #define HV_X64_MSR_SINT13 (0x4000009D)
608 #define HV_X64_MSR_SINT14 (0x4000009E)
609 #define HV_X64_MSR_SINT15 (0x4000009F)
612 * Synthetic Timer MSRs. Four timers per vcpu.
614 #define HV_X64_MSR_STIMER0_CONFIG 0x400000B0
615 #define HV_X64_MSR_STIMER0_COUNT 0x400000B1
616 #define HV_X64_MSR_STIMER1_CONFIG 0x400000B2
617 #define HV_X64_MSR_STIMER1_COUNT 0x400000B3
618 #define HV_X64_MSR_STIMER2_CONFIG 0x400000B4
619 #define HV_X64_MSR_STIMER2_COUNT 0x400000B5
620 #define HV_X64_MSR_STIMER3_CONFIG 0x400000B6
621 #define HV_X64_MSR_STIMER3_COUNT 0x400000B7
624 * Declare the various hypercall operations
627 HV_CALL_POST_MESSAGE = 0x005c,
628 HV_CALL_SIGNAL_EVENT = 0x005d,
629 } hv_vmbus_call_code;
635 extern hv_vmbus_context hv_vmbus_g_context;
636 extern hv_vmbus_connection hv_vmbus_g_connection;
638 extern u_int hyperv_features;
639 extern u_int hyperv_recommends;
641 typedef void (*vmbus_msg_handler)(hv_vmbus_channel_msg_header *msg);
643 typedef struct hv_vmbus_channel_msg_table_entry {
644 hv_vmbus_channel_msg_type messageType;
646 vmbus_msg_handler messageHandler;
647 } hv_vmbus_channel_msg_table_entry;
649 extern hv_vmbus_channel_msg_table_entry g_channel_message_table[];
652 * Private, VM Bus functions
654 struct sysctl_ctx_list;
655 struct sysctl_oid_list;
657 void hv_ring_buffer_stat(
658 struct sysctl_ctx_list *ctx,
659 struct sysctl_oid_list *tree_node,
660 hv_vmbus_ring_buffer_info *rbi,
663 int hv_vmbus_ring_buffer_init(
664 hv_vmbus_ring_buffer_info *ring_info,
666 uint32_t buffer_len);
668 void hv_ring_buffer_cleanup(
669 hv_vmbus_ring_buffer_info *ring_info);
671 int hv_ring_buffer_write(
672 hv_vmbus_ring_buffer_info *ring_info,
673 hv_vmbus_sg_buffer_list sg_buffers[],
674 uint32_t sg_buff_count,
675 boolean_t *need_sig);
677 int hv_ring_buffer_peek(
678 hv_vmbus_ring_buffer_info *ring_info,
680 uint32_t buffer_len);
682 int hv_ring_buffer_read(
683 hv_vmbus_ring_buffer_info *ring_info,
688 uint32_t hv_vmbus_get_ring_buffer_interrupt_mask(
689 hv_vmbus_ring_buffer_info *ring_info);
691 void hv_vmbus_dump_ring_info(
692 hv_vmbus_ring_buffer_info *ring_info,
695 void hv_ring_buffer_read_begin(
696 hv_vmbus_ring_buffer_info *ring_info);
698 uint32_t hv_ring_buffer_read_end(
699 hv_vmbus_ring_buffer_info *ring_info);
701 hv_vmbus_channel* hv_vmbus_allocate_channel(void);
702 void hv_vmbus_free_vmbus_channel(hv_vmbus_channel *channel);
703 int hv_vmbus_request_channel_offers(void);
704 void hv_vmbus_release_unattached_channels(void);
705 int hv_vmbus_init(void);
706 void hv_vmbus_cleanup(void);
708 uint16_t hv_vmbus_post_msg_via_msg_ipc(
709 hv_vmbus_connection_id connection_id,
710 hv_vmbus_msg_type message_type,
712 size_t payload_size);
714 uint16_t hv_vmbus_signal_event(void *con_id);
715 void hv_vmbus_synic_init(void *irq_arg);
716 void hv_vmbus_synic_cleanup(void *arg);
717 int hv_vmbus_query_hypervisor_presence(void);
719 struct hv_device* hv_vmbus_child_device_create(
721 hv_guid device_instance,
722 hv_vmbus_channel *channel);
724 int hv_vmbus_child_device_register(
725 struct hv_device *child_dev);
726 int hv_vmbus_child_device_unregister(
727 struct hv_device *child_dev);
730 * Connection interfaces
732 int hv_vmbus_connect(void);
733 int hv_vmbus_disconnect(void);
734 int hv_vmbus_post_message(void *buffer, size_t buf_size);
735 int hv_vmbus_set_event(hv_vmbus_channel *channel);
736 void hv_vmbus_on_events(int cpu);
739 * Event Timer interfaces
741 void hv_et_init(void);
742 void hv_et_intr(struct trapframe*);
745 * The guest OS needs to register the guest ID with the hypervisor.
746 * The guest ID is a 64 bit entity and the structure of this ID is
747 * specified in the Hyper-V specification:
749 * http://msdn.microsoft.com/en-us/library/windows/
750 * hardware/ff542653%28v=vs.85%29.aspx
752 * While the current guideline does not specify how FreeBSD guest ID(s)
753 * need to be generated, our plan is to publish the guidelines for
754 * FreeBSD and other guest operating systems that currently are hosted
755 * on Hyper-V. The implementation here conforms to this yet
756 * unpublished guidelines.
759 * 63 - Indicates if the OS is Open Source or not; 1 is Open Source
760 * 62:56 - Os Type; Linux is 0x100, FreeBSD is 0x200
761 * 55:48 - Distro specific identification
762 * 47:16 - FreeBSD kernel version number
763 * 15:0 - Distro specific identification
767 #define HV_FREEBSD_VENDOR_ID 0x8200
768 #define HV_FREEBSD_GUEST_ID hv_generate_guest_id(0,0)
770 static inline uint64_t hv_generate_guest_id(
771 uint8_t distro_id_part1,
772 uint16_t distro_id_part2)
775 guest_id = (((uint64_t)HV_FREEBSD_VENDOR_ID) << 48);
776 guest_id |= (((uint64_t)(distro_id_part1)) << 48);
777 guest_id |= (((uint64_t)(__FreeBSD_version)) << 16); /* in param.h */
778 guest_id |= ((uint64_t)(distro_id_part2));
784 void *page_buffers[2 * MAXCPU];
787 #endif /* __HYPERV_PRIV_H__ */