Date: Fri, 8 Apr 2016 09:20:47 +0000 (UTC) From: Sepherosa Ziehau <sephe@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297699 - head/sys/dev/hyperv/vmbus Message-ID: <201604080920.u389KliR048702@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604080920.u389KliR048702>