svn commit: r300122 - head/sys/dev/hyperv/vmbus
Sepherosa Ziehau
sephe at FreeBSD.org
Wed May 18 06:36:30 UTC 2016
Author: sephe
Date: Wed May 18 06:36:28 2016
New Revision: 300122
URL: https://svnweb.freebsd.org/changeset/base/300122
Log:
hyperv: Set vm_guest to VM_GUEST_VM, if hypervisor is not Hyper-V
Reviewed by: kib
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6412
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 Wed May 18 06:29:03 2016 (r300121)
+++ head/sys/dev/hyperv/vmbus/hv_hv.c Wed May 18 06:36:28 2016 (r300122)
@@ -501,8 +501,12 @@ hyperv_identify(void)
static void
hyperv_init(void *dummy __unused)
{
- if (!hyperv_identify())
+ if (!hyperv_identify()) {
+ /* Not Hyper-V; reset guest id to the generic one. */
+ if (vm_guest == VM_GUEST_HV)
+ vm_guest = VM_GUEST_VM;
return;
+ }
if (hyperv_features & HV_FEATURE_MSR_TIME_REFCNT) {
/* Register virtual timecount */
More information about the svn-src-head
mailing list