Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174283442
D5778.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
840 B
Referenced Files
None
Subscribers
None
D5778.id.diff
View Options
Index: head/sys/dev/hyperv/vmbus/hv_hv.c
===================================================================
--- head/sys/dev/hyperv/vmbus/hv_hv.c
+++ head/sys/dev/hyperv/vmbus/hv_hv.c
@@ -36,6 +36,7 @@
#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>
@@ -207,8 +208,6 @@
hv_vmbus_g_context.hypercall_page = virt_addr;
- tc_init(&hv_timecounter); /* register virtual timecount */
-
hv_et_init();
return (0);
@@ -437,3 +436,14 @@
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);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 3, 12:40 AM (1 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40106372
Default Alt Text
D5778.id.diff (840 B)
Attached To
Mode
D5778: hyperv: register hv_timecounter in SI_SUB_HYPERVISOR
Attached
Detach File
Event Timeline
Log In to Comment