Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/hyperv/vmbus/hv_hv.c
Show First 20 Lines • Show All 202 Lines • ▼ Show 20 Lines | hv_vmbus_init(void) | ||||
hypercall_msr.as_uint64_t = 0; | hypercall_msr.as_uint64_t = 0; | ||||
hypercall_msr.as_uint64_t = rdmsr(HV_X64_MSR_HYPERCALL); | hypercall_msr.as_uint64_t = rdmsr(HV_X64_MSR_HYPERCALL); | ||||
if (!hypercall_msr.u.enable) | if (!hypercall_msr.u.enable) | ||||
goto cleanup; | goto cleanup; | ||||
hv_vmbus_g_context.hypercall_page = virt_addr; | hv_vmbus_g_context.hypercall_page = virt_addr; | ||||
hv_et_init(); | |||||
return (0); | return (0); | ||||
cleanup: | cleanup: | ||||
if (virt_addr != NULL) { | if (virt_addr != NULL) { | ||||
if (hypercall_msr.u.enable) { | if (hypercall_msr.u.enable) { | ||||
hypercall_msr.as_uint64_t = 0; | hypercall_msr.as_uint64_t = 0; | ||||
wrmsr(HV_X64_MSR_HYPERCALL, | wrmsr(HV_X64_MSR_HYPERCALL, | ||||
hypercall_msr.as_uint64_t); | hypercall_msr.as_uint64_t); | ||||
▲ Show 20 Lines • Show All 229 Lines • Show Last 20 Lines |