/* This routine is called normally during driver unloading or exiting.  */
void HvCleanup(void)
/* This routine is called normally during driver unloading or exiting.  */
void HvCleanup(void)
{
	union hv_x64_msr_hypercall_contents hypercallMsr;
	DPRINT_ENTER(VMBUS);
	if (gHvContext.SignalEventBuffer) {
		gHvContext.SignalEventBuffer = NULL;
		gHvContext.SignalEventParam = NULL;
		kfree(gHvContext.SignalEventBuffer);
	}
	if (gHvContext.GuestId == HV_LINUX_GUEST_ID) {
		if (gHvContext.HypercallPage) {
			hypercallMsr.AsUINT64 = 0;
			wrmsrl(HV_X64_MSR_HYPERCALL, hypercallMsr.AsUINT64);
			vfree(gHvContext.HypercallPage);
			gHvContext.HypercallPage = NULL;
		}
	}
	DPRINT_EXIT(VMBUS);
}