Staging: hv: coding style cleanups for VmbusChannelInterface.h
typedefs still need to be fixed up. Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
65452d1f72
commit
1aa2383b14
1 changed files with 50 additions and 80 deletions
|
@ -21,101 +21,71 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef __VMBUSCHANNELINTERFACE_H
|
||||
#define __VMBUSCHANNELINTERFACE_H
|
||||
|
||||
#pragma once
|
||||
/* allow nameless unions */
|
||||
/* #pragma warning(disable : 4201) */
|
||||
|
||||
|
||||
/* A revision number of vmbus that is used for ensuring both ends on a */
|
||||
/* partition are using compatible versions. */
|
||||
|
||||
#define VMBUS_REVISION_NUMBER 13
|
||||
|
||||
/*
|
||||
* A revision number of vmbus that is used for ensuring both ends on a
|
||||
* partition are using compatible versions.
|
||||
*/
|
||||
#define VMBUS_REVISION_NUMBER 13
|
||||
|
||||
/* Make maximum size of pipe payload of 16K */
|
||||
|
||||
#define MAX_PIPE_DATA_PAYLOAD (sizeof(BYTE) * 16384)
|
||||
|
||||
#define MAX_PIPE_DATA_PAYLOAD (sizeof(u8) * 16384)
|
||||
|
||||
/* Define PipeMode values. */
|
||||
|
||||
#define VMBUS_PIPE_TYPE_BYTE 0x00000000
|
||||
#define VMBUS_PIPE_TYPE_MESSAGE 0x00000004
|
||||
|
||||
#define VMBUS_PIPE_TYPE_BYTE 0x00000000
|
||||
#define VMBUS_PIPE_TYPE_MESSAGE 0x00000004
|
||||
|
||||
/* The size of the user defined data buffer for non-pipe offers. */
|
||||
|
||||
#define MAX_USER_DEFINED_BYTES 120
|
||||
|
||||
#define MAX_USER_DEFINED_BYTES 120
|
||||
|
||||
/* The size of the user defined data buffer for pipe offers. */
|
||||
#define MAX_PIPE_USER_DEFINED_BYTES 116
|
||||
|
||||
#define MAX_PIPE_USER_DEFINED_BYTES 116
|
||||
/*
|
||||
* At the center of the Channel Management library is the Channel Offer. This
|
||||
* struct contains the fundamental information about an offer.
|
||||
*/
|
||||
typedef struct {
|
||||
struct hv_guid InterfaceType;
|
||||
struct hv_guid InterfaceInstance;
|
||||
u64 InterruptLatencyIn100nsUnits;
|
||||
u32 InterfaceRevision;
|
||||
u32 ServerContextAreaSize; /* in bytes */
|
||||
u16 ChannelFlags;
|
||||
u16 MmioMegabytes; /* in bytes * 1024 * 1024 */
|
||||
|
||||
union {
|
||||
/* Non-pipes: The user has MAX_USER_DEFINED_BYTES bytes. */
|
||||
struct {
|
||||
unsigned char UserDefined[MAX_USER_DEFINED_BYTES];
|
||||
} Standard;
|
||||
|
||||
|
||||
/* At the center of the Channel Management library is */
|
||||
/* the Channel Offer. This struct contains the */
|
||||
/* fundamental information about an offer. */
|
||||
|
||||
#pragma pack(push,1)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
||||
struct hv_guid InterfaceType;
|
||||
struct hv_guid InterfaceInstance;
|
||||
u64 InterruptLatencyIn100nsUnits;
|
||||
u32 InterfaceRevision;
|
||||
u32 ServerContextAreaSize; /* in bytes */
|
||||
u16 ChannelFlags;
|
||||
u16 MmioMegabytes; /* in bytes * 1024 * 1024 */
|
||||
|
||||
union
|
||||
{
|
||||
|
||||
/* Non-pipes: The user has MAX_USER_DEFINED_BYTES bytes. */
|
||||
|
||||
struct
|
||||
{
|
||||
unsigned char UserDefined[MAX_USER_DEFINED_BYTES];
|
||||
} Standard;
|
||||
|
||||
|
||||
/* Pipes: The following sructure is an integrated pipe protocol, which */
|
||||
/* is implemented on top of standard user-defined data. Pipe clients */
|
||||
/* have MAX_PIPE_USER_DEFINED_BYTES left for their own use. */
|
||||
|
||||
struct
|
||||
{
|
||||
u32 PipeMode;
|
||||
unsigned char UserDefined[MAX_PIPE_USER_DEFINED_BYTES];
|
||||
} Pipe;
|
||||
} u;
|
||||
u32 Padding;
|
||||
} VMBUS_CHANNEL_OFFER, *PVMBUS_CHANNEL_OFFER;
|
||||
#pragma pack(pop)
|
||||
|
||||
/*
|
||||
* Pipes:
|
||||
* The following sructure is an integrated pipe protocol, which
|
||||
* is implemented on top of standard user-defined data. Pipe
|
||||
* clients have MAX_PIPE_USER_DEFINED_BYTES left for their own
|
||||
* use.
|
||||
*/
|
||||
struct {
|
||||
u32 PipeMode;
|
||||
unsigned char UserDefined[MAX_PIPE_USER_DEFINED_BYTES];
|
||||
} Pipe;
|
||||
} u;
|
||||
u32 Padding;
|
||||
} __attribute__((packed)) VMBUS_CHANNEL_OFFER, *PVMBUS_CHANNEL_OFFER;
|
||||
|
||||
typedef u32 GPADL_HANDLE;
|
||||
|
||||
|
||||
/* Server Flags */
|
||||
#define VMBUS_CHANNEL_ENUMERATE_DEVICE_INTERFACE 1
|
||||
#define VMBUS_CHANNEL_SERVER_SUPPORTS_TRANSFER_PAGES 2
|
||||
#define VMBUS_CHANNEL_SERVER_SUPPORTS_GPADLS 4
|
||||
#define VMBUS_CHANNEL_NAMED_PIPE_MODE 0x10
|
||||
#define VMBUS_CHANNEL_LOOPBACK_OFFER 0x100
|
||||
#define VMBUS_CHANNEL_PARENT_OFFER 0x200
|
||||
#define VMBUS_CHANNEL_REQUEST_MONITORED_NOTIFICATION 0x400
|
||||
|
||||
|
||||
#define VMBUS_CHANNEL_ENUMERATE_DEVICE_INTERFACE 1
|
||||
#define VMBUS_CHANNEL_SERVER_SUPPORTS_TRANSFER_PAGES 2
|
||||
#define VMBUS_CHANNEL_SERVER_SUPPORTS_GPADLS 4
|
||||
#define VMBUS_CHANNEL_NAMED_PIPE_MODE 0x10
|
||||
#define VMBUS_CHANNEL_LOOPBACK_OFFER 0x100
|
||||
#define VMBUS_CHANNEL_PARENT_OFFER 0x200
|
||||
#define VMBUS_CHANNEL_REQUEST_MONITORED_NOTIFICATION 0x400
|
||||
|
||||
|
||||
/* TEMPTEMP -- move this next define to devioctl.h some day */
|
||||
|
||||
|
||||
#ifndef FILE_DEVICE_VMBUS
|
||||
#define FILE_DEVICE_VMBUS 0x0000003E
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue