Author: sephe Date: Fri Apr 8 09:20:46 2016 New Revision: 297699 URL: https://svnweb.freebsd.org/changeset/base/297699
Log: hyperv: Revert r297481 Use vm_guest == VM_GUEST_HV is not enough to determine whether FreeBSD is running on Hyper-V or not. What a mess. Reported by: smokehydration tutanota com 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 Fri Apr 8 08:43:25 2016 (r297698) +++ head/sys/dev/hyperv/vmbus/hv_hv.c Fri Apr 8 09:20:46 2016 (r297699) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include <sys/malloc.h> #include <sys/pcpu.h> #include <sys/timetc.h> -#include <sys/kernel.h> #include <machine/bus.h> #include <machine/md_var.h> #include <vm/vm.h> @@ -208,6 +207,8 @@ hv_vmbus_init(void) hv_vmbus_g_context.hypercall_page = virt_addr; + tc_init(&hv_timecounter); /* register virtual timecount */ + hv_et_init(); return (0); @@ -436,14 +437,3 @@ void hv_vmbus_synic_cleanup(void *arg) wrmsr(HV_X64_MSR_SIEFP, siefp.as_uint64_t); } -static void -hv_tc_init(void) -{ - if (vm_guest != VM_GUEST_HV) - return; - - /* register virtual timecounter */ - tc_init(&hv_timecounter); -} - -SYSINIT(hv_tc_init, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, hv_tc_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"