Commit eacb1b4d authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: hv: typdef fixes for HvSynicApi.h

Still some volatile mis-usages left to fix.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c786a84e
...@@ -42,7 +42,7 @@ static void VmbusChannelSetEvent(struct vmbus_channel *channel); ...@@ -42,7 +42,7 @@ static void VmbusChannelSetEvent(struct vmbus_channel *channel);
#if 0 #if 0
static void static void
DumpMonitorPage( DumpMonitorPage(
HV_MONITOR_PAGE *MonitorPage struct hv_monitor_page *MonitorPage
) )
{ {
int i=0; int i=0;
...@@ -85,7 +85,7 @@ Description: ...@@ -85,7 +85,7 @@ Description:
--*/ --*/
static void VmbusChannelSetEvent(struct vmbus_channel *Channel) static void VmbusChannelSetEvent(struct vmbus_channel *Channel)
{ {
HV_MONITOR_PAGE *monitorPage; struct hv_monitor_page *monitorPage;
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
...@@ -96,7 +96,7 @@ static void VmbusChannelSetEvent(struct vmbus_channel *Channel) ...@@ -96,7 +96,7 @@ static void VmbusChannelSetEvent(struct vmbus_channel *Channel)
(unsigned long *) gVmbusConnection.SendInterruptPage + (unsigned long *) gVmbusConnection.SendInterruptPage +
(Channel->OfferMsg.ChildRelId >> 5) ); (Channel->OfferMsg.ChildRelId >> 5) );
monitorPage = (HV_MONITOR_PAGE*)gVmbusConnection.MonitorPages; monitorPage = (struct hv_monitor_page *)gVmbusConnection.MonitorPages;
monitorPage++; /* Get the child to parent monitor page */ monitorPage++; /* Get the child to parent monitor page */
set_bit(Channel->MonitorBit, set_bit(Channel->MonitorBit,
...@@ -114,7 +114,7 @@ static void VmbusChannelSetEvent(struct vmbus_channel *Channel) ...@@ -114,7 +114,7 @@ static void VmbusChannelSetEvent(struct vmbus_channel *Channel)
#if 0 #if 0
static void VmbusChannelClearEvent(struct vmbus_channel *channel) static void VmbusChannelClearEvent(struct vmbus_channel *channel)
{ {
HV_MONITOR_PAGE *monitorPage; struct hv_monitor_page *monitorPage;
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
...@@ -124,7 +124,7 @@ static void VmbusChannelClearEvent(struct vmbus_channel *channel) ...@@ -124,7 +124,7 @@ static void VmbusChannelClearEvent(struct vmbus_channel *channel)
clear_bit(Channel->OfferMsg.ChildRelId & 31, clear_bit(Channel->OfferMsg.ChildRelId & 31,
(unsigned long *) gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5)); (unsigned long *) gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5));
monitorPage = (HV_MONITOR_PAGE*)gVmbusConnection.MonitorPages; monitorPage = (struct hv_monitor_page *)gVmbusConnection.MonitorPages;
monitorPage++; /* Get the child to parent monitor page */ monitorPage++; /* Get the child to parent monitor page */
clear_bit(Channel->MonitorBit, clear_bit(Channel->MonitorBit,
...@@ -147,7 +147,7 @@ Description: ...@@ -147,7 +147,7 @@ Description:
void VmbusChannelGetDebugInfo(struct vmbus_channel *Channel, void VmbusChannelGetDebugInfo(struct vmbus_channel *Channel,
struct vmbus_channel_debug_info *DebugInfo) struct vmbus_channel_debug_info *DebugInfo)
{ {
HV_MONITOR_PAGE *monitorPage; struct hv_monitor_page *monitorPage;
u8 monitorGroup = (u8)Channel->OfferMsg.MonitorId / 32; u8 monitorGroup = (u8)Channel->OfferMsg.MonitorId / 32;
u8 monitorOffset = (u8)Channel->OfferMsg.MonitorId % 32; u8 monitorOffset = (u8)Channel->OfferMsg.MonitorId % 32;
/* u32 monitorBit = 1 << monitorOffset; */ /* u32 monitorBit = 1 << monitorOffset; */
...@@ -157,7 +157,7 @@ void VmbusChannelGetDebugInfo(struct vmbus_channel *Channel, ...@@ -157,7 +157,7 @@ void VmbusChannelGetDebugInfo(struct vmbus_channel *Channel,
memcpy(&DebugInfo->InterfaceType, &Channel->OfferMsg.Offer.InterfaceType, sizeof(struct hv_guid)); memcpy(&DebugInfo->InterfaceType, &Channel->OfferMsg.Offer.InterfaceType, sizeof(struct hv_guid));
memcpy(&DebugInfo->InterfaceInstance, &Channel->OfferMsg.Offer.InterfaceInstance, sizeof(struct hv_guid)); memcpy(&DebugInfo->InterfaceInstance, &Channel->OfferMsg.Offer.InterfaceInstance, sizeof(struct hv_guid));
monitorPage = (HV_MONITOR_PAGE*)gVmbusConnection.MonitorPages; monitorPage = (struct hv_monitor_page *)gVmbusConnection.MonitorPages;
DebugInfo->MonitorId = Channel->OfferMsg.MonitorId; DebugInfo->MonitorId = Channel->OfferMsg.MonitorId;
......
...@@ -701,7 +701,7 @@ Description: ...@@ -701,7 +701,7 @@ Description:
--*/ --*/
void VmbusOnChannelMessage(void *Context) void VmbusOnChannelMessage(void *Context)
{ {
HV_MESSAGE *msg=(HV_MESSAGE*)Context; struct hv_message *msg = Context;
VMBUS_CHANNEL_MESSAGE_HEADER* hdr; VMBUS_CHANNEL_MESSAGE_HEADER* hdr;
int size; int size;
......
...@@ -390,7 +390,7 @@ Description: ...@@ -390,7 +390,7 @@ Description:
int VmbusPostMessage(void *buffer, size_t bufferLen) int VmbusPostMessage(void *buffer, size_t bufferLen)
{ {
int ret=0; int ret=0;
HV_CONNECTION_ID connId; union hv_connection_id connId;
connId.Asu32 =0; connId.Asu32 =0;
......
...@@ -385,8 +385,8 @@ Description: ...@@ -385,8 +385,8 @@ Description:
--*/ --*/
HV_STATUS HvPostMessage( HV_STATUS HvPostMessage(
HV_CONNECTION_ID connectionId, union hv_connection_id connectionId,
HV_MESSAGE_TYPE messageType, enum hv_message_type messageType,
void * payload, void * payload,
size_t payloadSize size_t payloadSize
) )
...@@ -461,10 +461,10 @@ Description: ...@@ -461,10 +461,10 @@ Description:
int HvSynicInit (u32 irqVector) int HvSynicInit (u32 irqVector)
{ {
u64 version; u64 version;
HV_SYNIC_SIMP simp; union hv_synic_simp simp;
HV_SYNIC_SIEFP siefp; union hv_synic_siefp siefp;
HV_SYNIC_SINT sharedSint; union hv_synic_sint sharedSint;
HV_SYNIC_SCONTROL sctrl; union hv_synic_scontrol sctrl;
u64 guestID; u64 guestID;
int ret=0; int ret=0;
...@@ -600,9 +600,9 @@ Description: ...@@ -600,9 +600,9 @@ Description:
--*/ --*/
void HvSynicCleanup(void) void HvSynicCleanup(void)
{ {
HV_SYNIC_SINT sharedSint; union hv_synic_sint sharedSint;
HV_SYNIC_SIMP simp; union hv_synic_simp simp;
HV_SYNIC_SIEFP siefp; union hv_synic_siefp siefp;
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
......
...@@ -135,8 +135,8 @@ extern int HvInit(void); ...@@ -135,8 +135,8 @@ extern int HvInit(void);
extern void HvCleanup(void); extern void HvCleanup(void);
extern HV_STATUS HvPostMessage(HV_CONNECTION_ID connectionId, extern HV_STATUS HvPostMessage(union hv_connection_id connectionId,
HV_MESSAGE_TYPE messageType, enum hv_message_type messageType,
void *payload, void *payload,
size_t payloadSize); size_t payloadSize);
......
...@@ -407,8 +407,8 @@ VmbusOnMsgDPC( ...@@ -407,8 +407,8 @@ VmbusOnMsgDPC(
{ {
void *page_addr = gHvContext.synICMessagePage[0]; void *page_addr = gHvContext.synICMessagePage[0];
HV_MESSAGE* msg = (HV_MESSAGE*)page_addr + VMBUS_MESSAGE_SINT; struct hv_message *msg = (struct hv_message *)page_addr + VMBUS_MESSAGE_SINT;
HV_MESSAGE *copied; struct hv_message *copied;
while (1) while (1)
{ {
if (msg->Header.MessageType == HvMessageTypeNone) /* no msg */ if (msg->Header.MessageType == HvMessageTypeNone) /* no msg */
...@@ -417,13 +417,13 @@ VmbusOnMsgDPC( ...@@ -417,13 +417,13 @@ VmbusOnMsgDPC(
} }
else else
{ {
copied = kmalloc(sizeof(HV_MESSAGE), GFP_ATOMIC); copied = kmalloc(sizeof(*copied), GFP_ATOMIC);
if (copied == NULL) if (copied == NULL)
{ {
continue; continue;
} }
memcpy(copied, msg, sizeof(HV_MESSAGE)); memcpy(copied, msg, sizeof(*copied));
osd_schedule_callback(gVmbusConnection.WorkQueue, osd_schedule_callback(gVmbusConnection.WorkQueue,
VmbusOnChannelMessage, VmbusOnChannelMessage,
(void *)copied); (void *)copied);
...@@ -490,13 +490,13 @@ VmbusOnISR( ...@@ -490,13 +490,13 @@ VmbusOnISR(
int ret=0; int ret=0;
/* struct page* page; */ /* struct page* page; */
void *page_addr; void *page_addr;
HV_MESSAGE* msg; struct hv_message *msg;
HV_SYNIC_EVENT_FLAGS* event; union hv_synic_event_flags *event;
/* page = SynICMessagePage[0]; */ /* page = SynICMessagePage[0]; */
/* page_addr = page_address(page); */ /* page_addr = page_address(page); */
page_addr = gHvContext.synICMessagePage[0]; page_addr = gHvContext.synICMessagePage[0];
msg = (HV_MESSAGE*)page_addr + VMBUS_MESSAGE_SINT; msg = (struct hv_message *)page_addr + VMBUS_MESSAGE_SINT;
DPRINT_ENTER(VMBUS); DPRINT_ENTER(VMBUS);
...@@ -509,7 +509,7 @@ VmbusOnISR( ...@@ -509,7 +509,7 @@ VmbusOnISR(
/* TODO: Check if there are events to be process */ /* TODO: Check if there are events to be process */
page_addr = gHvContext.synICEventPage[0]; page_addr = gHvContext.synICEventPage[0];
event = (HV_SYNIC_EVENT_FLAGS*)page_addr + VMBUS_MESSAGE_SINT; event = (union hv_synic_event_flags *)page_addr + VMBUS_MESSAGE_SINT;
/* Since we are a child, we only need to check bit 0 */ /* Since we are a child, we only need to check bit 0 */
if (test_and_clear_bit(0, (unsigned long *) &event->Flags32[0])) if (test_and_clear_bit(0, (unsigned long *) &event->Flags32[0]))
......
...@@ -32,16 +32,16 @@ enum hv_call_code { ...@@ -32,16 +32,16 @@ enum hv_call_code {
/* Definition of the HvPostMessage hypercall input structure. */ /* Definition of the HvPostMessage hypercall input structure. */
struct hv_input_post_message { struct hv_input_post_message {
HV_CONNECTION_ID ConnectionId; union hv_connection_id ConnectionId;
u32 Reserved; u32 Reserved;
HV_MESSAGE_TYPE MessageType; enum hv_message_type MessageType;
u32 PayloadSize; u32 PayloadSize;
u64 Payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT]; u64 Payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT];
}; };
/* Definition of the HvSignalEvent hypercall input structure. */ /* Definition of the HvSignalEvent hypercall input structure. */
struct hv_input_signal_event { struct hv_input_signal_event {
HV_CONNECTION_ID ConnectionId; union hv_connection_id ConnectionId;
u16 FlagNumber; u16 FlagNumber;
u16 RsvdZ; u16 RsvdZ;
}; };
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
#define HV_EVENT_FLAGS_DWORD_COUNT (256 / sizeof(u32)) #define HV_EVENT_FLAGS_DWORD_COUNT (256 / sizeof(u32))
/* Define hypervisor message types. */ /* Define hypervisor message types. */
typedef enum _HV_MESSAGE_TYPE { enum hv_message_type {
HvMessageTypeNone = 0x00000000, HvMessageTypeNone = 0x00000000,
/* Memory access messages. */ /* Memory access messages. */
...@@ -96,58 +96,52 @@ typedef enum _HV_MESSAGE_TYPE { ...@@ -96,58 +96,52 @@ typedef enum _HV_MESSAGE_TYPE {
HvMessageTypeX64ExceptionIntercept = 0x80010003, HvMessageTypeX64ExceptionIntercept = 0x80010003,
HvMessageTypeX64ApicEoi = 0x80010004, HvMessageTypeX64ApicEoi = 0x80010004,
HvMessageTypeX64LegacyFpError = 0x80010005 HvMessageTypeX64LegacyFpError = 0x80010005
} HV_MESSAGE_TYPE, *PHV_MESSAGE_TYPE; };
/* Define the number of synthetic interrupt sources. */ /* Define the number of synthetic interrupt sources. */
#define HV_SYNIC_SINT_COUNT (16) #define HV_SYNIC_SINT_COUNT (16)
#define HV_SYNIC_STIMER_COUNT (4) #define HV_SYNIC_STIMER_COUNT (4)
/* Define the synthetic interrupt source index type. */
typedef u32 HV_SYNIC_SINT_INDEX, *PHV_SYNIC_SINT_INDEX;
/* Define partition identifier type. */
typedef u64 HV_PARTITION_ID, *PHV_PARTITION_ID;
/* Define invalid partition identifier. */ /* Define invalid partition identifier. */
#define HV_PARTITION_ID_INVALID ((HV_PARTITION_ID) 0x0) #define HV_PARTITION_ID_INVALID ((u64)0x0)
/* Define connection identifier type. */ /* Define connection identifier type. */
typedef union _HV_CONNECTION_ID { union hv_connection_id {
u32 Asu32; u32 Asu32;
struct { struct {
u32 Id:24; u32 Id:24;
u32 Reserved:8; u32 Reserved:8;
} u; } u;
} HV_CONNECTION_ID, *PHV_CONNECTION_ID; };
/* Define port identifier type. */ /* Define port identifier type. */
typedef union _HV_PORT_ID { union hv_port_id {
u32 Asu32; u32 Asu32;
struct { struct {
u32 Id:24; u32 Id:24;
u32 Reserved:8; u32 Reserved:8;
} u ; } u ;
} HV_PORT_ID, *PHV_PORT_ID; };
/* Define port type. */ /* Define port type. */
typedef enum _HV_PORT_TYPE { enum hv_port_type {
HvPortTypeMessage = 1, HvPortTypeMessage = 1,
HvPortTypeEvent = 2, HvPortTypeEvent = 2,
HvPortTypeMonitor = 3 HvPortTypeMonitor = 3
} HV_PORT_TYPE, *PHV_PORT_TYPE; };
/* Define port information structure. */ /* Define port information structure. */
typedef struct _HV_PORT_INFO { struct hv_port_info {
HV_PORT_TYPE PortType; enum hv_port_type PortType;
u32 Padding; u32 Padding;
union { union {
struct { struct {
HV_SYNIC_SINT_INDEX TargetSint; u32 TargetSint;
u32 TargetVp; u32 TargetVp;
u64 RsvdZ; u64 RsvdZ;
} MessagePortInfo; } MessagePortInfo;
struct { struct {
HV_SYNIC_SINT_INDEX TargetSint; u32 TargetSint;
u32 TargetVp; u32 TargetVp;
u16 BaseFlagNumber; u16 BaseFlagNumber;
u16 FlagCount; u16 FlagCount;
...@@ -158,11 +152,10 @@ typedef struct _HV_PORT_INFO { ...@@ -158,11 +152,10 @@ typedef struct _HV_PORT_INFO {
u64 RsvdZ; u64 RsvdZ;
} MonitorPortInfo; } MonitorPortInfo;
}; };
} HV_PORT_INFO, *PHV_PORT_INFO; };
typedef const HV_PORT_INFO *PCHV_PORT_INFO;
typedef struct _HV_CONNECTION_INFO { struct hv_connection_info {
HV_PORT_TYPE PortType; enum hv_port_type PortType;
u32 Padding; u32 Padding;
union { union {
struct { struct {
...@@ -175,76 +168,75 @@ typedef struct _HV_CONNECTION_INFO { ...@@ -175,76 +168,75 @@ typedef struct _HV_CONNECTION_INFO {
u64 MonitorAddress; u64 MonitorAddress;
} MonitorConnectionInfo; } MonitorConnectionInfo;
}; };
} HV_CONNECTION_INFO, *PHV_CONNECTION_INFO; };
typedef const HV_CONNECTION_INFO *PCHV_CONNECTION_INFO;
/* Define synthetic interrupt controller message flags. */ /* Define synthetic interrupt controller message flags. */
typedef union _HV_MESSAGE_FLAGS { union hv_message_flags {
u8 Asu8; u8 Asu8;
struct { struct {
u8 MessagePending:1; u8 MessagePending:1;
u8 Reserved:7; u8 Reserved:7;
}; };
} HV_MESSAGE_FLAGS, *PHV_MESSAGE_FLAGS; };
/* Define synthetic interrupt controller message header. */ /* Define synthetic interrupt controller message header. */
typedef struct _HV_MESSAGE_HEADER { struct hv_message_header {
HV_MESSAGE_TYPE MessageType; enum hv_message_type MessageType;
u8 PayloadSize; u8 PayloadSize;
HV_MESSAGE_FLAGS MessageFlags; union hv_message_flags MessageFlags;
u8 Reserved[2]; u8 Reserved[2];
union { union {
HV_PARTITION_ID Sender; u64 Sender;
HV_PORT_ID Port; union hv_port_id Port;
}; };
} HV_MESSAGE_HEADER, *PHV_MESSAGE_HEADER; };
/* Define timer message payload structure. */ /* Define timer message payload structure. */
typedef struct _HV_TIMER_MESSAGE_PAYLOAD { struct hv_timer_message_payload {
u32 TimerIndex; u32 TimerIndex;
u32 Reserved; u32 Reserved;
u64 ExpirationTime; /* When the timer expired */ u64 ExpirationTime; /* When the timer expired */
u64 DeliveryTime; /* When the message was delivered */ u64 DeliveryTime; /* When the message was delivered */
} HV_TIMER_MESSAGE_PAYLOAD, *PHV_TIMER_MESSAGE_PAYLOAD; };
/* Define synthetic interrupt controller message format. */ /* Define synthetic interrupt controller message format. */
typedef struct _HV_MESSAGE { struct hv_message {
HV_MESSAGE_HEADER Header; struct hv_message_header Header;
union { union {
u64 Payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT]; u64 Payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT];
} u ; } u ;
} HV_MESSAGE, *PHV_MESSAGE; };
/* Define the number of message buffers associated with each port. */ /* Define the number of message buffers associated with each port. */
#define HV_PORT_MESSAGE_BUFFER_COUNT (16) #define HV_PORT_MESSAGE_BUFFER_COUNT (16)
/* Define the synthetic interrupt message page layout. */ /* Define the synthetic interrupt message page layout. */
typedef struct _HV_MESSAGE_PAGE { struct hv_message_page {
volatile HV_MESSAGE SintMessage[HV_SYNIC_SINT_COUNT]; volatile struct hv_message SintMessage[HV_SYNIC_SINT_COUNT];
} HV_MESSAGE_PAGE, *PHV_MESSAGE_PAGE; };
/* Define the synthetic interrupt controller event flags format. */ /* Define the synthetic interrupt controller event flags format. */
typedef union _HV_SYNIC_EVENT_FLAGS { union hv_synic_event_flags {
u8 Flags8[HV_EVENT_FLAGS_BYTE_COUNT]; u8 Flags8[HV_EVENT_FLAGS_BYTE_COUNT];
u32 Flags32[HV_EVENT_FLAGS_DWORD_COUNT]; u32 Flags32[HV_EVENT_FLAGS_DWORD_COUNT];
} HV_SYNIC_EVENT_FLAGS, *PHV_SYNIC_EVENT_FLAGS; };
/* Define the synthetic interrupt flags page layout. */ /* Define the synthetic interrupt flags page layout. */
typedef struct _HV_SYNIC_EVENT_FLAGS_PAGE { struct hv_synic_event_flags_page {
volatile HV_SYNIC_EVENT_FLAGS SintEventFlags[HV_SYNIC_SINT_COUNT]; volatile union hv_synic_event_flags SintEventFlags[HV_SYNIC_SINT_COUNT];
} HV_SYNIC_EVENT_FLAGS_PAGE, *PHV_SYNIC_EVENT_FLAGS_PAGE; };
/* Define SynIC control register. */ /* Define SynIC control register. */
typedef union _HV_SYNIC_SCONTROL { union hv_synic_scontrol {
u64 AsUINT64; u64 AsUINT64;
struct { struct {
u64 Enable:1; u64 Enable:1;
u64 Reserved:63; u64 Reserved:63;
}; };
} HV_SYNIC_SCONTROL, *PHV_SYNIC_SCONTROL; };
/* Define synthetic interrupt source. */ /* Define synthetic interrupt source. */
typedef union _HV_SYNIC_SINT { union hv_synic_sint {
u64 AsUINT64; u64 AsUINT64;
struct { struct {
u64 Vector:8; u64 Vector:8;
...@@ -253,54 +245,53 @@ typedef union _HV_SYNIC_SINT { ...@@ -253,54 +245,53 @@ typedef union _HV_SYNIC_SINT {
u64 AutoEoi:1; u64 AutoEoi:1;
u64 Reserved2:46; u64 Reserved2:46;
}; };
} HV_SYNIC_SINT, *PHV_SYNIC_SINT; };
/* Define the format of the SIMP register */ /* Define the format of the SIMP register */
typedef union _HV_SYNIC_SIMP { union hv_synic_simp {
u64 AsUINT64; u64 AsUINT64;
struct { struct {
u64 SimpEnabled:1; u64 SimpEnabled:1;
u64 Preserved:11; u64 Preserved:11;
u64 BaseSimpGpa:52; u64 BaseSimpGpa:52;
}; };
} HV_SYNIC_SIMP, *PHV_SYNIC_SIMP; };
/* Define the format of the SIEFP register */ /* Define the format of the SIEFP register */
typedef union _HV_SYNIC_SIEFP { union hv_synic_siefp {
u64 AsUINT64; u64 AsUINT64;
struct { struct {
u64 SiefpEnabled:1; u64 SiefpEnabled:1;
u64 Preserved:11; u64 Preserved:11;
u64 BaseSiefpGpa:52; u64 BaseSiefpGpa:52;
}; };
} HV_SYNIC_SIEFP, *PHV_SYNIC_SIEFP; };
/* Definitions for the monitored notification facility */ /* Definitions for the monitored notification facility */
typedef union _HV_MONITOR_TRIGGER_GROUP { union hv_monitor_trigger_group {
u64 AsUINT64; u64 AsUINT64;
struct { struct {
u32 Pending; u32 Pending;
u32 Armed; u32 Armed;
}; };
} HV_MONITOR_TRIGGER_GROUP, *PHV_MONITOR_TRIGGER_GROUP; };
typedef struct _HV_MONITOR_PARAMETER { struct hv_monitor_parameter {
HV_CONNECTION_ID ConnectionId; union hv_connection_id ConnectionId;
u16 FlagNumber; u16 FlagNumber;
u16 RsvdZ; u16 RsvdZ;
} HV_MONITOR_PARAMETER, *PHV_MONITOR_PARAMETER; };
typedef union _HV_MONITOR_TRIGGER_STATE { union hv_monitor_trigger_state {
u32 Asu32; u32 Asu32;
struct { struct {
u32 GroupEnable:4; u32 GroupEnable:4;
u32 RsvdZ:28; u32 RsvdZ:28;
}; };
} HV_MONITOR_TRIGGER_STATE, *PHV_MONITOR_TRIGGER_STATE; };
/* HV_MONITOR_PAGE Layout */ /* struct hv_monitor_page Layout */
/* ------------------------------------------------------ */ /* ------------------------------------------------------ */
/* | 0 | TriggerState (4 bytes) | Rsvd1 (4 bytes) | */ /* | 0 | TriggerState (4 bytes) | Rsvd1 (4 bytes) | */
/* | 8 | TriggerGroup[0] | */ /* | 8 | TriggerGroup[0] | */
...@@ -319,11 +310,11 @@ typedef union _HV_MONITOR_TRIGGER_STATE { ...@@ -319,11 +310,11 @@ typedef union _HV_MONITOR_TRIGGER_STATE {
/* | ... | */ /* | ... | */
/* | 840 | Rsvd4[0] | */ /* | 840 | Rsvd4[0] | */
/* ------------------------------------------------------ */ /* ------------------------------------------------------ */
typedef struct _HV_MONITOR_PAGE { struct hv_monitor_page {
HV_MONITOR_TRIGGER_STATE TriggerState; union hv_monitor_trigger_state TriggerState;
u32 RsvdZ1; u32 RsvdZ1;
HV_MONITOR_TRIGGER_GROUP TriggerGroup[4]; union hv_monitor_trigger_group TriggerGroup[4];
u64 RsvdZ2[3]; u64 RsvdZ2[3];
s32 NextCheckTime[4][32]; s32 NextCheckTime[4][32];
...@@ -331,10 +322,9 @@ typedef struct _HV_MONITOR_PAGE { ...@@ -331,10 +322,9 @@ typedef struct _HV_MONITOR_PAGE {
u16 Latency[4][32]; u16 Latency[4][32];
u64 RsvdZ3[32]; u64 RsvdZ3[32];
HV_MONITOR_PARAMETER Parameter[4][32]; struct hv_monitor_parameter Parameter[4][32];
u8 RsvdZ4[1984]; u8 RsvdZ4[1984];
} HV_MONITOR_PAGE, *PHV_MONITOR_PAGE; };
typedef volatile HV_MONITOR_PAGE* PVHV_MONITOR_PAGE;
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment