2011-05-13 04:34:14 +02:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Copyright (c) 2011, 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>
|
|
|
|
* K. Y. Srinivasan <kys@microsoft.com>
|
|
|
|
*
|
|
|
|
*/
|
2011-05-13 04:34:15 +02:00
|
|
|
|
|
|
|
#ifndef _HYPERV_H
|
|
|
|
#define _HYPERV_H
|
|
|
|
|
|
|
|
struct hv_guid {
|
|
|
|
unsigned char data[16];
|
|
|
|
};
|
|
|
|
|
2011-05-13 04:34:16 +02:00
|
|
|
#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)
|
|
|
|
|
2011-05-13 04:34:15 +02:00
|
|
|
|
|
|
|
#endif /* _HYPERV_H */
|