/* Globals */
/* The one and only */
-HV_CONTEXT gHvContext={
- .SynICInitialized = false,
- .HypercallPage = NULL,
- .SignalEventParam = NULL,
- .SignalEventBuffer = NULL,
+struct hv_context gHvContext = {
+ .SynICInitialized = false,
+ .HypercallPage = NULL,
+ .SignalEventParam = NULL,
+ .SignalEventBuffer = NULL,
};
(u64)hypercallMsr.GuestPhysicalAddress << PAGE_SHIFT);
/* Setup the global signal event param for the signal event hypercall */
- gHvContext.SignalEventBuffer = kmalloc(sizeof(HV_INPUT_SIGNAL_EVENT_BUFFER), GFP_KERNEL);
+ gHvContext.SignalEventBuffer = kmalloc(sizeof(struct hv_input_signal_event_buffer), GFP_KERNEL);
if (!gHvContext.SignalEventBuffer)
{
goto Cleanup;
#define MAX_NUM_CPUS 1
-typedef struct {
+struct hv_input_signal_event_buffer {
u64 Align8;
HV_INPUT_SIGNAL_EVENT Event;
-} HV_INPUT_SIGNAL_EVENT_BUFFER;
+};
-typedef struct {
+struct hv_context {
/* XenLinux or native Linux. If XenLinux, the hypercall and synic pages
* has already been initialized */
u64 GuestId;
* This is used as an input param to HvCallSignalEvent hypercall. The
* input param is immutable in our usage and must be dynamic mem (vs
* stack or global). */
- HV_INPUT_SIGNAL_EVENT_BUFFER *SignalEventBuffer;
+ struct hv_input_signal_event_buffer *SignalEventBuffer;
/* 8-bytes aligned of the buffer above */
HV_INPUT_SIGNAL_EVENT *SignalEventParam;
void *synICMessagePage[MAX_NUM_CPUS];
void *synICEventPage[MAX_NUM_CPUS];
-} HV_CONTEXT;
+};
-extern HV_CONTEXT gHvContext;
+extern struct hv_context gHvContext;
/* Hv Interface */