]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: hv: vmbus_drv: Include the contents of hv_api.h in hyperv_vmbus.h
authorK. Y. Srinivasan <kys@microsoft.com>
Fri, 13 May 2011 02:34:29 +0000 (19:34 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 May 2011 19:27:03 +0000 (12:27 -0700)
Include the contents of hv_api.h in hyperv_vmbus.h.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 files changed:
drivers/staging/hv/blkvsc_drv.c
drivers/staging/hv/channel.c
drivers/staging/hv/channel_mgmt.c
drivers/staging/hv/connection.c
drivers/staging/hv/hv.c
drivers/staging/hv/hv.h
drivers/staging/hv/hv_api.h [deleted file]
drivers/staging/hv/hv_kvp.c
drivers/staging/hv/hv_mouse.c
drivers/staging/hv/hv_util.c
drivers/staging/hv/hyperv_vmbus.h
drivers/staging/hv/netvsc.c
drivers/staging/hv/netvsc_drv.c
drivers/staging/hv/rndis_filter.c
drivers/staging/hv/storvsc.c
drivers/staging/hv/storvsc_drv.c
drivers/staging/hv/vmbus_drv.c

index 44de4887e85c9ee5ffbfc2511eee64c093dbeb41..8cc0b8dbc9301c2ca7d8523df4160d37b94b7155 100644 (file)
@@ -33,7 +33,6 @@
 #include <scsi/scsi_dbg.h>
 
 #include "hyperv.h"
-#include "hv_api.h"
 #include "storvsc_api.h"
 
 
index aac59fa2a2d57746738148b2e2f5c4cac94ed458..fb7ace679362b9dcc8524a0b52898f6a73297542 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "hyperv.h"
 #include "hyperv_vmbus.h"
-#include "hv_api.h"
 #include "vmbus_private.h"
 
 #define NUM_PAGES_SPANNED(addr, len) \
index c73ae5fead6ea541dd81e27b0aad342c1e5f9ce8..6433ae1b0e8a22cfe0416e61f8c36e9aea6cc652 100644 (file)
@@ -31,7 +31,6 @@
 
 #include "hyperv.h"
 #include "hyperv_vmbus.h"
-#include "hv_api.h"
 #include "vmbus_private.h"
 
 struct vmbus_channel_message_table_entry {
index 663aeed15eb22c0bb73e4e409aff394991527d10..fda90189962268b7a5cf8fa4fb7e7947f35fae3c 100644 (file)
@@ -31,7 +31,6 @@
 
 #include "hyperv.h"
 #include "hyperv_vmbus.h"
-#include "hv_api.h"
 #include "vmbus_private.h"
 
 
index dede9ced6978376341e6a00b7255feaf70ce546c..489504b5b89fa162cff0b9e01bb79f88d1560f8b 100644 (file)
@@ -28,7 +28,6 @@
 
 #include "hyperv.h"
 #include "hyperv_vmbus.h"
-#include "hv_api.h"
 #include "vmbus_private.h"
 
 /* The one and only */
index 829aff81bb30de3b2bd7cd52c067d5431fc9cfe6..9b50dc6556db370d34b3adca002bbb72cbf706f5 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef __HV_H__
 #define __HV_H__
 
-#include "hv_api.h"
+#include "hyperv_vmbus.h"
 
 enum {
        VMBUS_MESSAGE_CONNECTION_ID     = 1,
diff --git a/drivers/staging/hv/hv_api.h b/drivers/staging/hv/hv_api.h
deleted file mode 100644 (file)
index 2bc4003..0000000
+++ /dev/null
@@ -1,391 +0,0 @@
-/*
- *
- * Copyright (c) 2009, Microsoft Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307 USA.
- *
- * Authors:
- *   Haiyang Zhang <haiyangz@microsoft.com>
- *   Hank Janssen  <hjanssen@microsoft.com>
- *
- */
-#ifndef __HV_API_H
-#define __HV_API_H
-
-/*
- * The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent
- * is set by CPUID(HVCPUID_VERSION_FEATURES).
- */
-enum hv_cpuid_function {
-       HVCPUID_VERSION_FEATURES                = 0x00000001,
-       HVCPUID_VENDOR_MAXFUNCTION              = 0x40000000,
-       HVCPUID_INTERFACE                       = 0x40000001,
-
-       /*
-        * The remaining functions depend on the value of
-        * HVCPUID_INTERFACE
-        */
-       HVCPUID_VERSION                 = 0x40000002,
-       HVCPUID_FEATURES                        = 0x40000003,
-       HVCPUID_ENLIGHTENMENT_INFO      = 0x40000004,
-       HVCPUID_IMPLEMENTATION_LIMITS           = 0x40000005,
-};
-
-/* Define version of the synthetic interrupt controller. */
-#define HV_SYNIC_VERSION               (1)
-
-/* Define the expected SynIC version. */
-#define HV_SYNIC_VERSION_1             (0x1)
-
-/* Define synthetic interrupt controller message constants. */
-#define HV_MESSAGE_SIZE                        (256)
-#define HV_MESSAGE_PAYLOAD_BYTE_COUNT  (240)
-#define HV_MESSAGE_PAYLOAD_QWORD_COUNT (30)
-#define HV_ANY_VP                      (0xFFFFFFFF)
-
-/* Define synthetic interrupt controller flag constants. */
-#define HV_EVENT_FLAGS_COUNT           (256 * 8)
-#define HV_EVENT_FLAGS_BYTE_COUNT      (256)
-#define HV_EVENT_FLAGS_DWORD_COUNT     (256 / sizeof(u32))
-
-/* Define hypervisor message types. */
-enum hv_message_type {
-       HVMSG_NONE                      = 0x00000000,
-
-       /* Memory access messages. */
-       HVMSG_UNMAPPED_GPA              = 0x80000000,
-       HVMSG_GPA_INTERCEPT             = 0x80000001,
-
-       /* Timer notification messages. */
-       HVMSG_TIMER_EXPIRED                     = 0x80000010,
-
-       /* Error messages. */
-       HVMSG_INVALID_VP_REGISTER_VALUE = 0x80000020,
-       HVMSG_UNRECOVERABLE_EXCEPTION   = 0x80000021,
-       HVMSG_UNSUPPORTED_FEATURE               = 0x80000022,
-
-       /* Trace buffer complete messages. */
-       HVMSG_EVENTLOG_BUFFERCOMPLETE   = 0x80000040,
-
-       /* Platform-specific processor intercept messages. */
-       HVMSG_X64_IOPORT_INTERCEPT              = 0x80010000,
-       HVMSG_X64_MSR_INTERCEPT         = 0x80010001,
-       HVMSG_X64_CPUID_INTERCEPT               = 0x80010002,
-       HVMSG_X64_EXCEPTION_INTERCEPT   = 0x80010003,
-       HVMSG_X64_APIC_EOI                      = 0x80010004,
-       HVMSG_X64_LEGACY_FP_ERROR               = 0x80010005
-};
-
-/* Define the number of synthetic interrupt sources. */
-#define HV_SYNIC_SINT_COUNT            (16)
-#define HV_SYNIC_STIMER_COUNT          (4)
-
-/* Define invalid partition identifier. */
-#define HV_PARTITION_ID_INVALID                ((u64)0x0)
-
-/* Define connection identifier type. */
-union hv_connection_id {
-       u32 asu32;
-       struct {
-               u32 id:24;
-               u32 reserved:8;
-       } u;
-};
-
-/* Define port identifier type. */
-union hv_port_id {
-       u32 asu32;
-       struct {
-               u32 id:24;
-               u32 reserved:8;
-       } u ;
-};
-
-/* Define port type. */
-enum hv_port_type {
-       HVPORT_MSG      = 1,
-       HVPORT_EVENT            = 2,
-       HVPORT_MONITOR  = 3
-};
-
-/* Define port information structure. */
-struct hv_port_info {
-       enum hv_port_type port_type;
-       u32 padding;
-       union {
-               struct {
-                       u32 target_sint;
-                       u32 target_vp;
-                       u64 rsvdz;
-               } message_port_info;
-               struct {
-                       u32 target_sint;
-                       u32 target_vp;
-                       u16 base_flag_bumber;
-                       u16 flag_count;
-                       u32 rsvdz;
-               } event_port_info;
-               struct {
-                       u64 monitor_address;
-                       u64 rsvdz;
-               } monitor_port_info;
-       };
-};
-
-struct hv_connection_info {
-       enum hv_port_type port_type;
-       u32 padding;
-       union {
-               struct {
-                       u64 rsvdz;
-               } message_connection_info;
-               struct {
-                       u64 rsvdz;
-               } event_connection_info;
-               struct {
-                       u64 monitor_address;
-               } monitor_connection_info;
-       };
-};
-
-/* Define synthetic interrupt controller message flags. */
-union hv_message_flags {
-       u8 asu8;
-       struct {
-               u8 msg_pending:1;
-               u8 reserved:7;
-       };
-};
-
-/* Define synthetic interrupt controller message header. */
-struct hv_message_header {
-       enum hv_message_type message_type;
-       u8 payload_size;
-       union hv_message_flags message_flags;
-       u8 reserved[2];
-       union {
-               u64 sender;
-               union hv_port_id port;
-       };
-};
-
-/* Define timer message payload structure. */
-struct hv_timer_message_payload {
-       u32 timer_index;
-       u32 reserved;
-       u64 expiration_time;    /* When the timer expired */
-       u64 delivery_time;      /* When the message was delivered */
-};
-
-/* Define synthetic interrupt controller message format. */
-struct hv_message {
-       struct hv_message_header header;
-       union {
-               u64 payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT];
-       } u ;
-};
-
-/* Define the number of message buffers associated with each port. */
-#define HV_PORT_MESSAGE_BUFFER_COUNT   (16)
-
-/* Define the synthetic interrupt message page layout. */
-struct hv_message_page {
-       struct hv_message sint_message[HV_SYNIC_SINT_COUNT];
-};
-
-/* Define the synthetic interrupt controller event flags format. */
-union hv_synic_event_flags {
-       u8 flags8[HV_EVENT_FLAGS_BYTE_COUNT];
-       u32 flags32[HV_EVENT_FLAGS_DWORD_COUNT];
-};
-
-/* Define the synthetic interrupt flags page layout. */
-struct hv_synic_event_flags_page {
-       union hv_synic_event_flags sintevent_flags[HV_SYNIC_SINT_COUNT];
-};
-
-/* Define SynIC control register. */
-union hv_synic_scontrol {
-       u64 as_uint64;
-       struct {
-               u64 enable:1;
-               u64 reserved:63;
-       };
-};
-
-/* Define synthetic interrupt source. */
-union hv_synic_sint {
-       u64 as_uint64;
-       struct {
-               u64 vector:8;
-               u64 reserved1:8;
-               u64 masked:1;
-               u64 auto_eoi:1;
-               u64 reserved2:46;
-       };
-};
-
-/* Define the format of the SIMP register */
-union hv_synic_simp {
-       u64 as_uint64;
-       struct {
-               u64 simp_enabled:1;
-               u64 preserved:11;
-               u64 base_simp_gpa:52;
-       };
-};
-
-/* Define the format of the SIEFP register */
-union hv_synic_siefp {
-       u64 as_uint64;
-       struct {
-               u64 siefp_enabled:1;
-               u64 preserved:11;
-               u64 base_siefp_gpa:52;
-       };
-};
-
-/* Definitions for the monitored notification facility */
-union hv_monitor_trigger_group {
-       u64 as_uint64;
-       struct {
-               u32 pending;
-               u32 armed;
-       };
-};
-
-struct hv_monitor_parameter {
-       union hv_connection_id connectionid;
-       u16 flagnumber;
-       u16 rsvdz;
-};
-
-union hv_monitor_trigger_state {
-       u32 asu32;
-
-       struct {
-               u32 group_enable:4;
-               u32 rsvdz:28;
-       };
-};
-
-/* struct hv_monitor_page Layout */
-/* ------------------------------------------------------ */
-/* | 0   | TriggerState (4 bytes) | Rsvd1 (4 bytes)     | */
-/* | 8   | TriggerGroup[0]                              | */
-/* | 10  | TriggerGroup[1]                              | */
-/* | 18  | TriggerGroup[2]                              | */
-/* | 20  | TriggerGroup[3]                              | */
-/* | 28  | Rsvd2[0]                                     | */
-/* | 30  | Rsvd2[1]                                     | */
-/* | 38  | Rsvd2[2]                                     | */
-/* | 40  | NextCheckTime[0][0]    | NextCheckTime[0][1] | */
-/* | ...                                                | */
-/* | 240 | Latency[0][0..3]                             | */
-/* | 340 | Rsvz3[0]                                     | */
-/* | 440 | Parameter[0][0]                              | */
-/* | 448 | Parameter[0][1]                              | */
-/* | ...                                                | */
-/* | 840 | Rsvd4[0]                                     | */
-/* ------------------------------------------------------ */
-struct hv_monitor_page {
-       union hv_monitor_trigger_state trigger_state;
-       u32 rsvdz1;
-
-       union hv_monitor_trigger_group trigger_group[4];
-       u64 rsvdz2[3];
-
-       s32 next_checktime[4][32];
-
-       u16 latency[4][32];
-       u64 rsvdz3[32];
-
-       struct hv_monitor_parameter parameter[4][32];
-
-       u8 rsvdz4[1984];
-};
-
-/* Declare the various hypercall operations. */
-enum hv_call_code {
-       HVCALL_POST_MESSAGE     = 0x005c,
-       HVCALL_SIGNAL_EVENT     = 0x005d,
-};
-
-/* Definition of the hv_post_message hypercall input structure. */
-struct hv_input_post_message {
-       union hv_connection_id connectionid;
-       u32 reserved;
-       enum hv_message_type message_type;
-       u32 payload_size;
-       u64 payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT];
-};
-
-/* Definition of the hv_signal_event hypercall input structure. */
-struct hv_input_signal_event {
-       union hv_connection_id connectionid;
-       u16 flag_number;
-       u16 rsvdz;
-};
-
-/*
- * Versioning definitions used for guests reporting themselves to the
- * hypervisor, and visa versa.
- */
-
-/* Version info reported by guest OS's */
-enum hv_guest_os_vendor {
-       HVGUESTOS_VENDOR_MICROSOFT      = 0x0001
-};
-
-enum hv_guest_os_microsoft_ids {
-       HVGUESTOS_MICROSOFT_UNDEFINED   = 0x00,
-       HVGUESTOS_MICROSOFT_MSDOS               = 0x01,
-       HVGUESTOS_MICROSOFT_WINDOWS3X   = 0x02,
-       HVGUESTOS_MICROSOFT_WINDOWS9X   = 0x03,
-       HVGUESTOS_MICROSOFT_WINDOWSNT   = 0x04,
-       HVGUESTOS_MICROSOFT_WINDOWSCE   = 0x05
-};
-
-/*
- * Declare the MSR used to identify the guest OS.
- */
-#define HV_X64_MSR_GUEST_OS_ID 0x40000000
-
-union hv_x64_msr_guest_os_id_contents {
-       u64 as_uint64;
-       struct {
-               u64 build_number:16;
-               u64 service_version:8; /* Service Pack, etc. */
-               u64 minor_version:8;
-               u64 major_version:8;
-               u64 os_id:8; /* enum hv_guest_os_microsoft_ids (if Vendor=MS) */
-               u64 vendor_id:16; /* enum hv_guest_os_vendor */
-       };
-};
-
-/*
- * Declare the MSR used to setup pages used to communicate with the hypervisor.
- */
-#define HV_X64_MSR_HYPERCALL   0x40000001
-
-union hv_x64_msr_hypercall_contents {
-       u64 as_uint64;
-       struct {
-               u64 enable:1;
-               u64 reserved:11;
-               u64 guest_physical_address:52;
-       };
-};
-
-#endif
index 8b74d11ea12308d13cedd60881d999fb81f0ea4b..35342cbf4288b39c506467c3bb55a605d3a23b08 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/workqueue.h>
 
 #include "hyperv.h"
-#include "hv_api.h"
 #include "vmbus_private.h"
 #include "hv_kvp.h"
 
index 68bb8d2529611f8670ca9b483b650374909e9959..f4f512c3083051744ae1c75a095f702c27f57995 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/delay.h>
 
 #include "hyperv.h"
-#include "hv_api.h"
 
 
 /*
index 7e0dc27ca4f321de8031f5b34d7232ac4f4cb1c6..981a19a5c627f3f87efd01c0bd61bb4e59ce0509 100644 (file)
@@ -30,7 +30,6 @@
 #include <linux/pci.h>
 
 #include "hyperv.h"
-#include "hv_api.h"
 #include "vmbus_private.h"
 #include "hv_kvp.h"
 
index dafd13b24d67e8418c6b0b77130bfd3212d59930..359d7c9ae81f8eb696181ff784882a8d05761c6c 100644 (file)
 #ifndef _HYPERV_VMBUS_H
 #define _HYPERV_VMBUS_H
 
+/*
+ * The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent
+ * is set by CPUID(HVCPUID_VERSION_FEATURES).
+ */
+enum hv_cpuid_function {
+       HVCPUID_VERSION_FEATURES                = 0x00000001,
+       HVCPUID_VENDOR_MAXFUNCTION              = 0x40000000,
+       HVCPUID_INTERFACE                       = 0x40000001,
+
+       /*
+        * The remaining functions depend on the value of
+        * HVCPUID_INTERFACE
+        */
+       HVCPUID_VERSION                 = 0x40000002,
+       HVCPUID_FEATURES                        = 0x40000003,
+       HVCPUID_ENLIGHTENMENT_INFO      = 0x40000004,
+       HVCPUID_IMPLEMENTATION_LIMITS           = 0x40000005,
+};
+
+/* Define version of the synthetic interrupt controller. */
+#define HV_SYNIC_VERSION               (1)
+
+/* Define the expected SynIC version. */
+#define HV_SYNIC_VERSION_1             (0x1)
+
+/* Define synthetic interrupt controller message constants. */
+#define HV_MESSAGE_SIZE                        (256)
+#define HV_MESSAGE_PAYLOAD_BYTE_COUNT  (240)
+#define HV_MESSAGE_PAYLOAD_QWORD_COUNT (30)
+#define HV_ANY_VP                      (0xFFFFFFFF)
+
+/* Define synthetic interrupt controller flag constants. */
+#define HV_EVENT_FLAGS_COUNT           (256 * 8)
+#define HV_EVENT_FLAGS_BYTE_COUNT      (256)
+#define HV_EVENT_FLAGS_DWORD_COUNT     (256 / sizeof(u32))
+
+/* Define hypervisor message types. */
+enum hv_message_type {
+       HVMSG_NONE                      = 0x00000000,
+
+       /* Memory access messages. */
+       HVMSG_UNMAPPED_GPA              = 0x80000000,
+       HVMSG_GPA_INTERCEPT             = 0x80000001,
+
+       /* Timer notification messages. */
+       HVMSG_TIMER_EXPIRED                     = 0x80000010,
+
+       /* Error messages. */
+       HVMSG_INVALID_VP_REGISTER_VALUE = 0x80000020,
+       HVMSG_UNRECOVERABLE_EXCEPTION   = 0x80000021,
+       HVMSG_UNSUPPORTED_FEATURE               = 0x80000022,
+
+       /* Trace buffer complete messages. */
+       HVMSG_EVENTLOG_BUFFERCOMPLETE   = 0x80000040,
+
+       /* Platform-specific processor intercept messages. */
+       HVMSG_X64_IOPORT_INTERCEPT              = 0x80010000,
+       HVMSG_X64_MSR_INTERCEPT         = 0x80010001,
+       HVMSG_X64_CPUID_INTERCEPT               = 0x80010002,
+       HVMSG_X64_EXCEPTION_INTERCEPT   = 0x80010003,
+       HVMSG_X64_APIC_EOI                      = 0x80010004,
+       HVMSG_X64_LEGACY_FP_ERROR               = 0x80010005
+};
+
+/* Define the number of synthetic interrupt sources. */
+#define HV_SYNIC_SINT_COUNT            (16)
+#define HV_SYNIC_STIMER_COUNT          (4)
+
+/* Define invalid partition identifier. */
+#define HV_PARTITION_ID_INVALID                ((u64)0x0)
+
+/* Define connection identifier type. */
+union hv_connection_id {
+       u32 asu32;
+       struct {
+               u32 id:24;
+               u32 reserved:8;
+       } u;
+};
+
+/* Define port identifier type. */
+union hv_port_id {
+       u32 asu32;
+       struct {
+               u32 id:24;
+               u32 reserved:8;
+       } u ;
+};
+
+/* Define port type. */
+enum hv_port_type {
+       HVPORT_MSG      = 1,
+       HVPORT_EVENT            = 2,
+       HVPORT_MONITOR  = 3
+};
+
+/* Define port information structure. */
+struct hv_port_info {
+       enum hv_port_type port_type;
+       u32 padding;
+       union {
+               struct {
+                       u32 target_sint;
+                       u32 target_vp;
+                       u64 rsvdz;
+               } message_port_info;
+               struct {
+                       u32 target_sint;
+                       u32 target_vp;
+                       u16 base_flag_bumber;
+                       u16 flag_count;
+                       u32 rsvdz;
+               } event_port_info;
+               struct {
+                       u64 monitor_address;
+                       u64 rsvdz;
+               } monitor_port_info;
+       };
+};
+
+struct hv_connection_info {
+       enum hv_port_type port_type;
+       u32 padding;
+       union {
+               struct {
+                       u64 rsvdz;
+               } message_connection_info;
+               struct {
+                       u64 rsvdz;
+               } event_connection_info;
+               struct {
+                       u64 monitor_address;
+               } monitor_connection_info;
+       };
+};
+
+/* Define synthetic interrupt controller message flags. */
+union hv_message_flags {
+       u8 asu8;
+       struct {
+               u8 msg_pending:1;
+               u8 reserved:7;
+       };
+};
+
+/* Define synthetic interrupt controller message header. */
+struct hv_message_header {
+       enum hv_message_type message_type;
+       u8 payload_size;
+       union hv_message_flags message_flags;
+       u8 reserved[2];
+       union {
+               u64 sender;
+               union hv_port_id port;
+       };
+};
+
+/* Define timer message payload structure. */
+struct hv_timer_message_payload {
+       u32 timer_index;
+       u32 reserved;
+       u64 expiration_time;    /* When the timer expired */
+       u64 delivery_time;      /* When the message was delivered */
+};
+
+/* Define synthetic interrupt controller message format. */
+struct hv_message {
+       struct hv_message_header header;
+       union {
+               u64 payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT];
+       } u ;
+};
+
+/* Define the number of message buffers associated with each port. */
+#define HV_PORT_MESSAGE_BUFFER_COUNT   (16)
+
+/* Define the synthetic interrupt message page layout. */
+struct hv_message_page {
+       struct hv_message sint_message[HV_SYNIC_SINT_COUNT];
+};
+
+/* Define the synthetic interrupt controller event flags format. */
+union hv_synic_event_flags {
+       u8 flags8[HV_EVENT_FLAGS_BYTE_COUNT];
+       u32 flags32[HV_EVENT_FLAGS_DWORD_COUNT];
+};
+
+/* Define the synthetic interrupt flags page layout. */
+struct hv_synic_event_flags_page {
+       union hv_synic_event_flags sintevent_flags[HV_SYNIC_SINT_COUNT];
+};
+
+/* Define SynIC control register. */
+union hv_synic_scontrol {
+       u64 as_uint64;
+       struct {
+               u64 enable:1;
+               u64 reserved:63;
+       };
+};
+
+/* Define synthetic interrupt source. */
+union hv_synic_sint {
+       u64 as_uint64;
+       struct {
+               u64 vector:8;
+               u64 reserved1:8;
+               u64 masked:1;
+               u64 auto_eoi:1;
+               u64 reserved2:46;
+       };
+};
+
+/* Define the format of the SIMP register */
+union hv_synic_simp {
+       u64 as_uint64;
+       struct {
+               u64 simp_enabled:1;
+               u64 preserved:11;
+               u64 base_simp_gpa:52;
+       };
+};
+
+/* Define the format of the SIEFP register */
+union hv_synic_siefp {
+       u64 as_uint64;
+       struct {
+               u64 siefp_enabled:1;
+               u64 preserved:11;
+               u64 base_siefp_gpa:52;
+       };
+};
+
+/* Definitions for the monitored notification facility */
+union hv_monitor_trigger_group {
+       u64 as_uint64;
+       struct {
+               u32 pending;
+               u32 armed;
+       };
+};
+
+struct hv_monitor_parameter {
+       union hv_connection_id connectionid;
+       u16 flagnumber;
+       u16 rsvdz;
+};
+
+union hv_monitor_trigger_state {
+       u32 asu32;
+
+       struct {
+               u32 group_enable:4;
+               u32 rsvdz:28;
+       };
+};
+
+/* struct hv_monitor_page Layout */
+/* ------------------------------------------------------ */
+/* | 0   | TriggerState (4 bytes) | Rsvd1 (4 bytes)     | */
+/* | 8   | TriggerGroup[0]                              | */
+/* | 10  | TriggerGroup[1]                              | */
+/* | 18  | TriggerGroup[2]                              | */
+/* | 20  | TriggerGroup[3]                              | */
+/* | 28  | Rsvd2[0]                                     | */
+/* | 30  | Rsvd2[1]                                     | */
+/* | 38  | Rsvd2[2]                                     | */
+/* | 40  | NextCheckTime[0][0]    | NextCheckTime[0][1] | */
+/* | ...                                                | */
+/* | 240 | Latency[0][0..3]                             | */
+/* | 340 | Rsvz3[0]                                     | */
+/* | 440 | Parameter[0][0]                              | */
+/* | 448 | Parameter[0][1]                              | */
+/* | ...                                                | */
+/* | 840 | Rsvd4[0]                                     | */
+/* ------------------------------------------------------ */
+struct hv_monitor_page {
+       union hv_monitor_trigger_state trigger_state;
+       u32 rsvdz1;
+
+       union hv_monitor_trigger_group trigger_group[4];
+       u64 rsvdz2[3];
+
+       s32 next_checktime[4][32];
+
+       u16 latency[4][32];
+       u64 rsvdz3[32];
+
+       struct hv_monitor_parameter parameter[4][32];
+
+       u8 rsvdz4[1984];
+};
+
+/* Declare the various hypercall operations. */
+enum hv_call_code {
+       HVCALL_POST_MESSAGE     = 0x005c,
+       HVCALL_SIGNAL_EVENT     = 0x005d,
+};
+
+/* Definition of the hv_post_message hypercall input structure. */
+struct hv_input_post_message {
+       union hv_connection_id connectionid;
+       u32 reserved;
+       enum hv_message_type message_type;
+       u32 payload_size;
+       u64 payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT];
+};
+
+/* Definition of the hv_signal_event hypercall input structure. */
+struct hv_input_signal_event {
+       union hv_connection_id connectionid;
+       u16 flag_number;
+       u16 rsvdz;
+};
+
+/*
+ * Versioning definitions used for guests reporting themselves to the
+ * hypervisor, and visa versa.
+ */
+
+/* Version info reported by guest OS's */
+enum hv_guest_os_vendor {
+       HVGUESTOS_VENDOR_MICROSOFT      = 0x0001
+};
+
+enum hv_guest_os_microsoft_ids {
+       HVGUESTOS_MICROSOFT_UNDEFINED   = 0x00,
+       HVGUESTOS_MICROSOFT_MSDOS               = 0x01,
+       HVGUESTOS_MICROSOFT_WINDOWS3X   = 0x02,
+       HVGUESTOS_MICROSOFT_WINDOWS9X   = 0x03,
+       HVGUESTOS_MICROSOFT_WINDOWSNT   = 0x04,
+       HVGUESTOS_MICROSOFT_WINDOWSCE   = 0x05
+};
+
+/*
+ * Declare the MSR used to identify the guest OS.
+ */
+#define HV_X64_MSR_GUEST_OS_ID 0x40000000
+
+union hv_x64_msr_guest_os_id_contents {
+       u64 as_uint64;
+       struct {
+               u64 build_number:16;
+               u64 service_version:8; /* Service Pack, etc. */
+               u64 minor_version:8;
+               u64 major_version:8;
+               u64 os_id:8; /* enum hv_guest_os_microsoft_ids (if Vendor=MS) */
+               u64 vendor_id:16; /* enum hv_guest_os_vendor */
+       };
+};
+
+/*
+ * Declare the MSR used to setup pages used to communicate with the hypervisor.
+ */
+#define HV_X64_MSR_HYPERCALL   0x40000001
+
+union hv_x64_msr_hypercall_contents {
+       u64 as_uint64;
+       struct {
+               u64 enable:1;
+               u64 reserved:11;
+               u64 guest_physical_address:52;
+       };
+};
+
 #endif /* _HYPERV_VMBUS_H */
index 447cca75ea7f47fa0cc33973f4a78f0a32381058..c665d8891aa08a29d3f009535d1ce56984f77ac6 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/slab.h>
 
 #include "hyperv.h"
-#include "hv_api.h"
 #include "netvsc.h"
 #include "rndis_filter.h"
 
index b732d06d706faf1f8145acd0d8d9233b11faaf79..4e2995249db830e060ad6aa209a45e718ea94140 100644 (file)
@@ -40,7 +40,6 @@
 #include <net/pkt_sched.h>
 
 #include "hyperv.h"
-#include "hv_api.h"
 #include "netvsc_api.h"
 
 struct net_device_context {
index c6cb810a511c3d27f0ef46be4151e0b967da50e0..21818e206434fdd2cea37dd27f37fc0f32317469 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/netdevice.h>
 
 #include "hyperv.h"
-#include "hv_api.h"
 #include "netvsc_api.h"
 #include "rndis_filter.h"
 
index b594fbf397200be0c1d79175d99a9bae55c5dec9..dc8bb539d6505dd895512746205b56c0926382b2 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/delay.h>
 
 #include "hyperv.h"
-#include "hv_api.h"
 #include "storvsc_api.h"
 #include "vstorage.h"
 
index 0a3035bc3a2a066f23d5ca650f4b2550cf559f48..3a0b28446f865bb0192b5e99e1d9b52f84692684 100644 (file)
@@ -34,7 +34,6 @@
 #include <scsi/scsi_dbg.h>
 
 #include "hyperv.h"
-#include "hv_api.h"
 #include "storvsc_api.h"
 #include "vstorage.h"
 
index d12c88d4c95c2df8d61758e58ee15fd4ccb69304..25183cddb48fb116ae507ac8376405e9ecdddc80 100644 (file)
@@ -37,7 +37,6 @@
 
 #include "hyperv.h"
 #include "hyperv_vmbus.h"
-#include "hv_api.h"
 #include "vmbus_private.h"