diff options
Diffstat (limited to 'drivers/staging/hv/include/ChannelMessages.h')
-rw-r--r-- | drivers/staging/hv/include/ChannelMessages.h | 135 |
1 files changed, 69 insertions, 66 deletions
diff --git a/drivers/staging/hv/include/ChannelMessages.h b/drivers/staging/hv/include/ChannelMessages.h index 6a6342ab4d7..097e1c11e91 100644 --- a/drivers/staging/hv/include/ChannelMessages.h +++ b/drivers/staging/hv/include/ChannelMessages.h @@ -31,9 +31,9 @@ typedef u32 NTSTATUS; #pragma pack(push,1) -// -// Version 1 messages -// + +/* Version 1 messages */ + typedef enum _VMBUS_CHANNEL_MESSAGE_TYPE { @@ -61,9 +61,9 @@ typedef enum _VMBUS_CHANNEL_MESSAGE_TYPE ChannelMessageCount } VMBUS_CHANNEL_MESSAGE_TYPE, *PVMBUS_CHANNEL_MESSAGE_TYPE; -// begin_wpp config -// CUSTOM_TYPE(ChannelMessageType, ItemEnum(_VMBUS_CHANNEL_MESSAGE_TYPE)); -// end_wpp +/* begin_wpp config */ +/* CUSTOM_TYPE(ChannelMessageType, ItemEnum(_VMBUS_CHANNEL_MESSAGE_TYPE)); */ +/* end_wpp */ typedef struct _VMBUS_CHANNEL_MESSAGE_HEADER { @@ -71,21 +71,21 @@ typedef struct _VMBUS_CHANNEL_MESSAGE_HEADER u32 Padding; } VMBUS_CHANNEL_MESSAGE_HEADER, *PVMBUS_CHANNEL_MESSAGE_HEADER; -// Query VMBus Version parameters +/* Query VMBus Version parameters */ typedef struct _VMBUS_CHANNEL_QUERY_VMBUS_VERSION { VMBUS_CHANNEL_MESSAGE_HEADER Header; u32 Version; } VMBUS_CHANNEL_QUERY_VMBUS_VERSION, *PVMBUS_CHANNEL_QUERY_VMBUS_VERSION; -// VMBus Version Supported parameters +/* VMBus Version Supported parameters */ typedef struct _VMBUS_CHANNEL_VERSION_SUPPORTED { VMBUS_CHANNEL_MESSAGE_HEADER Header; bool VersionSupported; } VMBUS_CHANNEL_VERSION_SUPPORTED, *PVMBUS_CHANNEL_VERSION_SUPPORTED; -// Offer Channel parameters +/* Offer Channel parameters */ typedef struct _VMBUS_CHANNEL_OFFER_CHANNEL { VMBUS_CHANNEL_MESSAGE_HEADER Header; @@ -95,67 +95,69 @@ typedef struct _VMBUS_CHANNEL_OFFER_CHANNEL bool MonitorAllocated; } VMBUS_CHANNEL_OFFER_CHANNEL, *PVMBUS_CHANNEL_OFFER_CHANNEL; -// -// Make sure VMBUS_CHANNEL_OFFER_CHANNEL fits into Synic message. -// + +/* Make sure VMBUS_CHANNEL_OFFER_CHANNEL fits into Synic message. */ + C_ASSERT(sizeof(VMBUS_CHANNEL_OFFER_CHANNEL) <= MAXIMUM_SYNIC_MESSAGE_BYTES); -// Rescind Offer parameters +/* Rescind Offer parameters */ typedef struct _VMBUS_CHANNEL_RESCIND_OFFER { VMBUS_CHANNEL_MESSAGE_HEADER Header; u32 ChildRelId; } VMBUS_CHANNEL_RESCIND_OFFER, *PVMBUS_CHANNEL_RESCIND_OFFER; -// Request Offer -- no parameters, SynIC message contains the partition ID -// Set Snoop -- no parameters, SynIC message contains the partition ID -// Clear Snoop -- no parameters, SynIC message contains the partition ID -// All Offers Delivered -- no parameters, SynIC message contains the partition ID -// Flush Client -- no parameters, SynIC message contains the partition ID +/* Request Offer -- no parameters, SynIC message contains the partition ID */ +/* Set Snoop -- no parameters, SynIC message contains the partition ID */ +/* Clear Snoop -- no parameters, SynIC message contains the partition ID */ +/* All Offers Delivered -- no parameters, SynIC message contains the partition ID */ +/* Flush Client -- no parameters, SynIC message contains the partition ID */ -// Open Channel parameters +/* Open Channel parameters */ typedef struct _VMBUS_CHANNEL_OPEN_CHANNEL { VMBUS_CHANNEL_MESSAGE_HEADER Header; - // - // Identifies the specific VMBus channel that is being opened. - // + + /* Identifies the specific VMBus channel that is being opened. */ + u32 ChildRelId; - // - // ID making a particular open request at a channel offer unique. - // + + /* ID making a particular open request at a channel offer unique. */ + u32 OpenId; - // - // GPADL for the channel's ring buffer. - // + + /* GPADL for the channel's ring buffer. */ + GPADL_HANDLE RingBufferGpadlHandle; - // - // GPADL for the channel's server context save area. - // + + /* GPADL for the channel's server context save area. */ + GPADL_HANDLE ServerContextAreaGpadlHandle; - // - // The upstream ring buffer begins at offset zero in the memory described - // by RingBufferGpadlHandle. The downstream ring buffer follows it at this - // offset (in pages). - // + + /* + * The upstream ring buffer begins at offset zero in the memory + * described by RingBufferGpadlHandle. The downstream ring buffer + * follows it at this offset (in pages). + */ + u32 DownstreamRingBufferPageOffset; - // - // User-specific data to be passed along to the server endpoint. - // + + /* User-specific data to be passed along to the server endpoint. */ + unsigned char UserData[MAX_USER_DEFINED_BYTES]; } VMBUS_CHANNEL_OPEN_CHANNEL, *PVMBUS_CHANNEL_OPEN_CHANNEL; -// Reopen Channel parameters; +/* Reopen Channel parameters; */ typedef VMBUS_CHANNEL_OPEN_CHANNEL VMBUS_CHANNEL_REOPEN_CHANNEL, *PVMBUS_CHANNEL_REOPEN_CHANNEL; -// Open Channel Result parameters +/* Open Channel Result parameters */ typedef struct _VMBUS_CHANNEL_OPEN_RESULT { VMBUS_CHANNEL_MESSAGE_HEADER Header; @@ -164,24 +166,26 @@ typedef struct _VMBUS_CHANNEL_OPEN_RESULT NTSTATUS Status; } VMBUS_CHANNEL_OPEN_RESULT, *PVMBUS_CHANNEL_OPEN_RESULT; -// Close channel parameters; +/* Close channel parameters; */ typedef struct _VMBUS_CHANNEL_CLOSE_CHANNEL { VMBUS_CHANNEL_MESSAGE_HEADER Header; u32 ChildRelId; } VMBUS_CHANNEL_CLOSE_CHANNEL, *PVMBUS_CHANNEL_CLOSE_CHANNEL; -// Channel Message GPADL +/* Channel Message GPADL */ #define GPADL_TYPE_RING_BUFFER 1 #define GPADL_TYPE_SERVER_SAVE_AREA 2 #define GPADL_TYPE_TRANSACTION 8 -// -// The number of PFNs in a GPADL message is defined by the number of pages -// that would be spanned by ByteCount and ByteOffset. If the implied number -// of PFNs won't fit in this packet, there will be a follow-up packet that -// contains more. -// + +/* + * The number of PFNs in a GPADL message is defined by the number of + * pages that would be spanned by ByteCount and ByteOffset. If the + * implied number of PFNs won't fit in this packet, there will be a + * follow-up packet that contains more. + */ + typedef struct _VMBUS_CHANNEL_GPADL_HEADER { @@ -194,9 +198,9 @@ typedef struct _VMBUS_CHANNEL_GPADL_HEADER } VMBUS_CHANNEL_GPADL_HEADER, *PVMBUS_CHANNEL_GPADL_HEADER; -// -// This is the followup packet that contains more PFNs. -// + +/* This is the followup packet that contains more PFNs. */ + typedef struct _VMBUS_CHANNEL_GPADL_BODY { @@ -269,10 +273,10 @@ typedef struct _VMBUS_CHANNEL_VERSION_RESPONSE typedef VMBUS_CHANNEL_MESSAGE_HEADER VMBUS_CHANNEL_UNLOAD, *PVMBUS_CHANNEL_UNLOAD; -// -// Kind of a table to use the preprocessor to get us the right type for a -// specified message ID. Used with ChAllocateSendMessage() -// + +/* Kind of a table to use the preprocessor to get us the right type for a */ +/* specified message ID. Used with ChAllocateSendMessage() */ + #define ChannelMessageQueryVmbusVersion_TYPE VMBUS_CHANNEL_MESSAGE_HEADER #define ChannelMessageVmbusVersionSupported_TYPE VMBUS_CHANNEL_VERSION_SUPPORTED #define ChannelMessageOfferChannel_TYPE VMBUS_CHANNEL_OFFER_CHANNEL @@ -295,18 +299,17 @@ typedef VMBUS_CHANNEL_MESSAGE_HEADER VMBUS_CHANNEL_UNLOAD, *PVMBUS_CHANNEL_UNLOA #define ChannelMessageVersionResponse_TYPE VMBUS_CHANNEL_VERSION_RESPONSE #define ChannelMessageUnload_TYPE VMBUS_CHANNEL_UNLOAD -// -// Preprocessor wrapper to ChAllocateSendMessageSize() converting the return -// value to the correct pointer and calculate the needed size. -// -// Argument: -// -// Id - the numberic ID (type VMBUS_CHANNEL_MESSAGE_TYPE) of the message to -// send. -// + +/* Preprocessor wrapper to ChAllocateSendMessageSize() converting the return */ +/* value to the correct pointer and calculate the needed size. */ + +/* Argument: */ + +/* Id - the numberic ID (type VMBUS_CHANNEL_MESSAGE_TYPE) of the message to */ +/* send. */ + #define ChAllocateSendMessage(Id, Fn, Context) \ (Id##_TYPE*)ChAllocateSendMessageSized(sizeof(Id##_TYPE), Id, Fn, Context) #pragma pack(pop) - |