Author: sephe
Date: Mon Apr 11 03:36:07 2016
New Revision: 297803
URL: https://svnweb.freebsd.org/changeset/base/297803

Log:
  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

Modified:
  head/sys/dev/hyperv/vmbus/hv_hv.c

Modified: head/sys/dev/hyperv/vmbus/hv_hv.c
==============================================================================
--- head/sys/dev/hyperv/vmbus/hv_hv.c   Mon Apr 11 03:28:17 2016        
(r297802)
+++ head/sys/dev/hyperv/vmbus/hv_hv.c   Mon Apr 11 03:36:07 2016        
(r297803)
@@ -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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to