summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsephe <sephe@FreeBSD.org>2016-04-11 03:36:07 +0000
committersephe <sephe@FreeBSD.org>2016-04-11 03:36:07 +0000
commit28d2243294e521bd34a063a402382b21ad03b262 (patch)
tree76b533b0dff07593d201bfc43a38981800a754f4
parent297e2d2f528a41d9a9614e9b34049801f6935b31 (diff)
downloadFreeBSD-src-28d2243294e521bd34a063a402382b21ad03b262.zip
FreeBSD-src-28d2243294e521bd34a063a402382b21ad03b262.tar.gz
hyperv: Resurrect r297481
This time we make sure that the TIME_REF_COUNT MSR exists. Submitted by: Jun Su <junsu microsoft com> Reviewed by: sephe, Dexuan Cui <decui microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC
-rw-r--r--sys/dev/hyperv/vmbus/hv_hv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/hyperv/vmbus/hv_hv.c b/sys/dev/hyperv/vmbus/hv_hv.c
index 21ed04e..0e7bb76 100644
--- a/sys/dev/hyperv/vmbus/hv_hv.c
+++ b/sys/dev/hyperv/vmbus/hv_hv.c
@@ -167,8 +167,6 @@ hv_vmbus_init(void)
hv_vmbus_g_context.hypercall_page = virt_addr;
- tc_init(&hv_timecounter); /* register virtual timecount */
-
hv_et_init();
return (0);
@@ -480,5 +478,10 @@ hyperv_init(void *dummy __unused)
{
if (!hyperv_identify())
return;
+
+ if (hyperv_features & HV_FEATURE_MSR_TIME_REFCNT) {
+ /* Register virtual timecount */
+ tc_init(&hv_timecounter);
+ }
}
SYSINIT(hyperv_initialize, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, hyperv_init, NULL);
OpenPOWER on IntegriCloud