desc.Type = Type;//VmbusPacketTypeDataInBand;
desc.Flags = Flags;//VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
desc.DataOffset8 = sizeof(VMPACKET_DESCRIPTOR) >> 3; // in 8-bytes granularity
- desc.Length8 = (UINT16)(packetLenAligned >> 3);
+ desc.Length8 = (u16)(packetLenAligned >> 3);
desc.TransactionId = RequestId;
bufferList[0].Data = &desc;
desc.Type = VmbusPacketTypeDataUsingGpaDirect;
desc.Flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
desc.DataOffset8 = descSize >> 3; // in 8-bytes grandularity
- desc.Length8 = (UINT16)(packetLenAligned >> 3);
+ desc.Length8 = (u16)(packetLenAligned >> 3);
desc.TransactionId = RequestId;
desc.RangeCount = PageCount;
desc.Type = VmbusPacketTypeDataUsingGpaDirect;
desc.Flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
desc.DataOffset8 = descSize >> 3; // in 8-bytes grandularity
- desc.Length8 = (UINT16)(packetLenAligned >> 3);
+ desc.Length8 = (u16)(packetLenAligned >> 3);
desc.TransactionId = RequestId;
desc.RangeCount = 1;
// The format must be the same as VMDATA_GPA_DIRECT
typedef struct _VMBUS_CHANNEL_PACKET_PAGE_BUFFER {
- UINT16 Type;
- UINT16 DataOffset8;
- UINT16 Length8;
- UINT16 Flags;
+ u16 Type;
+ u16 DataOffset8;
+ u16 Length8;
+ u16 Flags;
UINT64 TransactionId;
UINT32 Reserved;
UINT32 RangeCount;
// The format must be the same as VMDATA_GPA_DIRECT
typedef struct _VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER {
- UINT16 Type;
- UINT16 DataOffset8;
- UINT16 Length8;
- UINT16 Flags;
+ u16 Type;
+ u16 DataOffset8;
+ u16 Length8;
+ u16 Flags;
UINT64 TransactionId;
UINT32 Reserved;
UINT32 RangeCount; // Always 1 in this case
VMBUS_CHANNEL_MESSAGE_HEADER Header;
UINT32 ChildRelId;
UINT32 Gpadl;
- UINT16 RangeBufLen;
- UINT16 RangeCount;
+ u16 RangeBufLen;
+ u16 RangeCount;
GPA_RANGE Range[0];
} VMBUS_CHANNEL_GPADL_HEADER, *PVMBUS_CHANNEL_GPADL_HEADER;
typedef struct _HV_INPUT_SIGNAL_EVENT
{
HV_CONNECTION_ID ConnectionId;
- UINT16 FlagNumber;
- UINT16 RsvdZ;
+ u16 FlagNumber;
+ u16 RsvdZ;
} HV_INPUT_SIGNAL_EVENT, *PHV_INPUT_SIGNAL_EVENT;
//
// Status codes for hypervisor operations.
//
-typedef UINT16 HV_STATUS, *PHV_STATUS;
+typedef u16 HV_STATUS, *PHV_STATUS;
//
// MessageId: HV_STATUS_SUCCESS
{
HV_SYNIC_SINT_INDEX TargetSint;
HV_VP_INDEX TargetVp;
- UINT16 BaseFlagNumber;
- UINT16 FlagCount;
+ u16 BaseFlagNumber;
+ u16 FlagCount;
UINT32 RsvdZ;
} EventPortInfo;
typedef struct _HV_MONITOR_PARAMETER
{
HV_CONNECTION_ID ConnectionId;
- UINT16 FlagNumber;
- UINT16 RsvdZ;
+ u16 FlagNumber;
+ u16 RsvdZ;
} HV_MONITOR_PARAMETER, *PHV_MONITOR_PARAMETER;
typedef union _HV_MONITOR_TRIGGER_STATE
INT32 NextCheckTime[4][32];
- UINT16 Latency[4][32];
+ u16 Latency[4][32];
UINT64 RsvdZ3[32];
HV_MONITOR_PARAMETER Parameter[4][32];
UINT64 InterruptLatencyIn100nsUnits;
UINT32 InterfaceRevision;
UINT32 ServerContextAreaSize; // in bytes
- UINT16 ChannelFlags;
- UINT16 MmioMegabytes; // in bytes * 1024 * 1024
+ u16 ChannelFlags;
+ u16 MmioMegabytes; // in bytes * 1024 * 1024
union
{
typedef struct
{
- UINT16 Type;
- UINT16 DataOffset8;
- UINT16 Length8;
- UINT16 Flags;
+ u16 Type;
+ u16 DataOffset8;
+ u16 Length8;
+ u16 Flags;
UINT64 TransactionId;
} VMPACKET_DESCRIPTOR, *PVMPACKET_DESCRIPTOR;
#endif
- UINT16 TransferPageSetId;
+ u16 TransferPageSetId;
BOOLEAN SenderOwnsSet;
u8 Reserved;
UINT32 RangeCount;
#endif
UINT32 Gpadl;
- UINT16 TransferPageSetId;
- UINT16 Reserved;
+ u16 TransferPageSetId;
+ u16 Reserved;
} VMADD_REMOVE_TRANSFER_PAGE_SET, *PVMADD_REMOVE_TRANSFER_PAGE_SET;
typedef struct _NVSP_1_MESSAGE_SEND_RECEIVE_BUFFER
{
GPADL_HANDLE GpadlHandle;
- UINT16 Id;
+ u16 Id;
} NVSP_1_MESSAGE_SEND_RECEIVE_BUFFER, *PNVSP_1_MESSAGE_SEND_RECEIVE_BUFFER;
typedef struct _NVSP_1_RECEIVE_BUFFER_SECTION
//
typedef struct _NVSP_1_MESSAGE_REVOKE_RECEIVE_BUFFER
{
- UINT16 Id;
+ u16 Id;
} NVSP_1_MESSAGE_REVOKE_RECEIVE_BUFFER, *PNVSP_1_MESSAGE_REVOKE_RECEIVE_BUFFER;
//
typedef struct _NVSP_1_MESSAGE_SEND_SEND_BUFFER
{
GPADL_HANDLE GpadlHandle;
- UINT16 Id;
+ u16 Id;
} NVSP_1_MESSAGE_SEND_SEND_BUFFER, *PNVSP_1_MESSAGE_SEND_SEND_BUFFER;
//
//
typedef struct _NVSP_1_MESSAGE_REVOKE_SEND_BUFFER
{
- UINT16 Id;
+ u16 Id;
} NVSP_1_MESSAGE_REVOKE_SEND_BUFFER, *PNVSP_1_MESSAGE_REVOKE_SEND_BUFFER;
//
//
// unsigned types
//
-typedef unsigned short UINT16;
typedef unsigned int UINT32;
#ifdef __x86_64__
typedef unsigned long UINT64;
//
// signed types
//
-typedef short INT16;
typedef int INT32;
#ifdef __x86_64__
typedef long INT64;