Deleted Added
full compact
hv_vmbus_priv.h (255524) hv_vmbus_priv.h (256276)
1/*-
2 * Copyright (c) 2009-2012 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

--- 10 unchanged lines hidden (view full) ---

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.
1/*-
2 * Copyright (c) 2009-2012 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

--- 10 unchanged lines hidden (view full) ---

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.
27 *
28 * $FreeBSD: head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h 256276 2013-10-10 16:25:53Z dim $
27 */
28
29#ifndef __HYPERV_PRIV_H__
30#define __HYPERV_PRIV_H__
31
32#include <sys/param.h>
33#include <sys/lock.h>
34#include <sys/mutex.h>

--- 245 unchanged lines hidden (view full) ---

280/*
281 * Define synthetic interrupt controller message flag
282 */
283typedef union {
284 uint8_t as_uint8_t;
285 struct {
286 uint8_t message_pending:1;
287 uint8_t reserved:7;
29 */
30
31#ifndef __HYPERV_PRIV_H__
32#define __HYPERV_PRIV_H__
33
34#include <sys/param.h>
35#include <sys/lock.h>
36#include <sys/mutex.h>

--- 245 unchanged lines hidden (view full) ---

282/*
283 * Define synthetic interrupt controller message flag
284 */
285typedef union {
286 uint8_t as_uint8_t;
287 struct {
288 uint8_t message_pending:1;
289 uint8_t reserved:7;
288 };
290 } u;
289} hv_vmbus_msg_flags;
290
291typedef uint64_t hv_vmbus_partition_id;
292
293/*
294 * Define synthetic interrupt controller message header
295 */
296typedef struct {

--- 91 unchanged lines hidden (view full) ---

388 uint64_t minor_version : 8;
389 uint64_t major_version : 8;
390 /*
391 * HV_GUEST_OS_MICROSOFT_IDS (If Vendor=MS)
392 * HV_GUEST_OS_VENDOR
393 */
394 uint64_t os_id : 8;
395 uint64_t vendor_id : 16;
291} hv_vmbus_msg_flags;
292
293typedef uint64_t hv_vmbus_partition_id;
294
295/*
296 * Define synthetic interrupt controller message header
297 */
298typedef struct {

--- 91 unchanged lines hidden (view full) ---

390 uint64_t minor_version : 8;
391 uint64_t major_version : 8;
392 /*
393 * HV_GUEST_OS_MICROSOFT_IDS (If Vendor=MS)
394 * HV_GUEST_OS_VENDOR
395 */
396 uint64_t os_id : 8;
397 uint64_t vendor_id : 16;
396 };
398 } u;
397} hv_vmbus_x64_msr_guest_os_id_contents;
398
399/*
400 * Declare the MSR used to setup pages used to communicate with the hypervisor
401 */
402#define HV_X64_MSR_HYPERCALL 0x40000001
403
404typedef union {
405 uint64_t as_uint64_t;
406 struct {
407 uint64_t enable :1;
408 uint64_t reserved :11;
409 uint64_t guest_physical_address :52;
399} hv_vmbus_x64_msr_guest_os_id_contents;
400
401/*
402 * Declare the MSR used to setup pages used to communicate with the hypervisor
403 */
404#define HV_X64_MSR_HYPERCALL 0x40000001
405
406typedef union {
407 uint64_t as_uint64_t;
408 struct {
409 uint64_t enable :1;
410 uint64_t reserved :11;
411 uint64_t guest_physical_address :52;
410 };
412 } u;
411} hv_vmbus_x64_msr_hypercall_contents;
412
413typedef union {
414 uint32_t as_uint32_t;
415 struct {
416 uint32_t group_enable :4;
417 uint32_t rsvd_z :28;
413} hv_vmbus_x64_msr_hypercall_contents;
414
415typedef union {
416 uint32_t as_uint32_t;
417 struct {
418 uint32_t group_enable :4;
419 uint32_t rsvd_z :28;
418 };
420 } u;
419} hv_vmbus_monitor_trigger_state;
420
421typedef union {
422 uint64_t as_uint64_t;
423 struct {
424 uint32_t pending;
425 uint32_t armed;
421} hv_vmbus_monitor_trigger_state;
422
423typedef union {
424 uint64_t as_uint64_t;
425 struct {
426 uint32_t pending;
427 uint32_t armed;
426 };
428 } u;
427} hv_vmbus_monitor_trigger_group;
428
429typedef struct {
430 hv_vmbus_connection_id connection_id;
431 uint16_t flag_number;
432 uint16_t rsvd_z;
433} hv_vmbus_monitor_parameter;
434

--- 59 unchanged lines hidden (view full) ---

494 * Define the format of the SIMP register
495 */
496typedef union {
497 uint64_t as_uint64_t;
498 struct {
499 uint64_t simp_enabled : 1;
500 uint64_t preserved : 11;
501 uint64_t base_simp_gpa : 52;
429} hv_vmbus_monitor_trigger_group;
430
431typedef struct {
432 hv_vmbus_connection_id connection_id;
433 uint16_t flag_number;
434 uint16_t rsvd_z;
435} hv_vmbus_monitor_parameter;
436

--- 59 unchanged lines hidden (view full) ---

496 * Define the format of the SIMP register
497 */
498typedef union {
499 uint64_t as_uint64_t;
500 struct {
501 uint64_t simp_enabled : 1;
502 uint64_t preserved : 11;
503 uint64_t base_simp_gpa : 52;
502 };
504 } u;
503} hv_vmbus_synic_simp;
504
505/*
506 * Define the format of the SIEFP register
507 */
508typedef union {
509 uint64_t as_uint64_t;
510 struct {
511 uint64_t siefp_enabled : 1;
512 uint64_t preserved : 11;
513 uint64_t base_siefp_gpa : 52;
505} hv_vmbus_synic_simp;
506
507/*
508 * Define the format of the SIEFP register
509 */
510typedef union {
511 uint64_t as_uint64_t;
512 struct {
513 uint64_t siefp_enabled : 1;
514 uint64_t preserved : 11;
515 uint64_t base_siefp_gpa : 52;
514 };
516 } u;
515} hv_vmbus_synic_siefp;
516
517/*
518 * Define synthetic interrupt source
519 */
520typedef union {
521 uint64_t as_uint64_t;
522 struct {
523 uint64_t vector : 8;
524 uint64_t reserved1 : 8;
525 uint64_t masked : 1;
526 uint64_t auto_eoi : 1;
527 uint64_t reserved2 : 46;
517} hv_vmbus_synic_siefp;
518
519/*
520 * Define synthetic interrupt source
521 */
522typedef union {
523 uint64_t as_uint64_t;
524 struct {
525 uint64_t vector : 8;
526 uint64_t reserved1 : 8;
527 uint64_t masked : 1;
528 uint64_t auto_eoi : 1;
529 uint64_t reserved2 : 46;
528 };
530 } u;
529} hv_vmbus_synic_sint;
530
531/*
532 * Define syn_ic control register
533 */
534typedef union _hv_vmbus_synic_scontrol {
535 uint64_t as_uint64_t;
536 struct {
537 uint64_t enable : 1;
538 uint64_t reserved : 63;
531} hv_vmbus_synic_sint;
532
533/*
534 * Define syn_ic control register
535 */
536typedef union _hv_vmbus_synic_scontrol {
537 uint64_t as_uint64_t;
538 struct {
539 uint64_t enable : 1;
540 uint64_t reserved : 63;
539 };
541 } u;
540} hv_vmbus_synic_scontrol;
541
542/*
543 * Define the hv_vmbus_post_message hypercall input structure
544 */
545typedef struct {
546 hv_vmbus_connection_id connection_id;
547 uint32_t reserved;

--- 175 unchanged lines hidden ---
542} hv_vmbus_synic_scontrol;
543
544/*
545 * Define the hv_vmbus_post_message hypercall input structure
546 */
547typedef struct {
548 hv_vmbus_connection_id connection_id;
549 uint32_t reserved;

--- 175 unchanged lines hidden ---