diff options
author | Sepherosa Ziehau <sephe@FreeBSD.org> | 2017-10-10 08:23:19 +0000 |
---|---|---|
committer | Sepherosa Ziehau <sephe@FreeBSD.org> | 2017-10-10 08:23:19 +0000 |
commit | 6bf331af5df0294bfe37e0393d23b66e105ee53e (patch) | |
tree | 3f86e2f86354beec660f40be65e606a7d647b4f0 /sys/dev/hyperv | |
parent | 8dc07838dbfd1f4b9a9fef6df2ce73829bb834ce (diff) |
Notes
Diffstat (limited to 'sys/dev/hyperv')
-rw-r--r-- | sys/dev/hyperv/include/hyperv.h | 1 | ||||
-rw-r--r-- | sys/dev/hyperv/vmbus/hyperv.c | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/hyperv/include/hyperv.h b/sys/dev/hyperv/include/hyperv.h index d3536a1289d3d..dcd91bd035a63 100644 --- a/sys/dev/hyperv/include/hyperv.h +++ b/sys/dev/hyperv/include/hyperv.h @@ -90,6 +90,7 @@ int hyperv_guid2str(const struct hyperv_guid *, char *, */ extern hyperv_tc64_t hyperv_tc64; extern u_int hyperv_features; /* CPUID_HV_MSR_ */ +extern u_int hyperv_ver_major; #endif /* _KERNEL */ diff --git a/sys/dev/hyperv/vmbus/hyperv.c b/sys/dev/hyperv/vmbus/hyperv.c index 2d00b45cebb49..dfc85f12f49d9 100644 --- a/sys/dev/hyperv/vmbus/hyperv.c +++ b/sys/dev/hyperv/vmbus/hyperv.c @@ -77,6 +77,8 @@ static u_int hyperv_get_timecount(struct timecounter *); static bool hyperv_identify(void); static void hypercall_memfree(void); +u_int hyperv_ver_major; + u_int hyperv_features; u_int hyperv_recommends; @@ -169,8 +171,9 @@ hyperv_identify(void) hyperv_features3 = regs[3]; do_cpuid(CPUID_LEAF_HV_IDENTITY, regs); + hyperv_ver_major = regs[1] >> 16; printf("Hyper-V Version: %d.%d.%d [SP%d]\n", - regs[1] >> 16, regs[1] & 0xffff, regs[0], regs[2]); + hyperv_ver_major, regs[1] & 0xffff, regs[0], regs[2]); printf(" Features=0x%b\n", hyperv_features, "\020" |