summaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv/hyperv.h
diff options
context:
space:
mode:
authorK. Y. Srinivasan2011-05-13 04:34:16 +0200
committerGreg Kroah-Hartman2011-05-17 20:46:13 +0200
commita363bf7bd23fb6ee3e1690bd300a5e285f9c88df (patch)
treeb74ae1bae44f04fb51eefcbf3a96b62cd13206a4 /drivers/staging/hv/hyperv.h
parentStaging: hv: Include the newly created header file in all of the relevant hyp... (diff)
downloadkernel-qcow2-linux-a363bf7bd23fb6ee3e1690bd300a5e285f9c88df.tar.gz
kernel-qcow2-linux-a363bf7bd23fb6ee3e1690bd300a5e285f9c88df.tar.xz
kernel-qcow2-linux-a363bf7bd23fb6ee3e1690bd300a5e285f9c88df.zip
Staging: hv: Add a subset of definitions from vmbus_api.h to hyperv.h
Add a subset of definitions from vmbus_api.h to hyperv.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>
Diffstat (limited to 'drivers/staging/hv/hyperv.h')
-rw-r--r--drivers/staging/hv/hyperv.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/staging/hv/hyperv.h b/drivers/staging/hv/hyperv.h
index 32193119de0c..22e434a55362 100644
--- a/drivers/staging/hv/hyperv.h
+++ b/drivers/staging/hv/hyperv.h
@@ -29,5 +29,35 @@ struct hv_guid {
unsigned char data[16];
};
+#define MAX_PAGE_BUFFER_COUNT 16
+#define MAX_MULTIPAGE_BUFFER_COUNT 32 /* 128K */
+
+#pragma pack(push, 1)
+
+/* Single-page buffer */
+struct hv_page_buffer {
+ u32 len;
+ u32 offset;
+ u64 pfn;
+};
+
+/* Multiple-page buffer */
+struct hv_multipage_buffer {
+ /* Length and Offset determines the # of pfns in the array */
+ u32 len;
+ u32 offset;
+ u64 pfn_array[MAX_MULTIPAGE_BUFFER_COUNT];
+};
+
+/* 0x18 includes the proprietary packet header */
+#define MAX_PAGE_BUFFER_PACKET (0x18 + \
+ (sizeof(struct hv_page_buffer) * \
+ MAX_PAGE_BUFFER_COUNT))
+#define MAX_MULTIPAGE_BUFFER_PACKET (0x18 + \
+ sizeof(struct hv_multipage_buffer))
+
+
+#pragma pack(pop)
+
#endif /* _HYPERV_H */