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
This commit is contained in:
Sepherosa Ziehau 2016-05-18 06:36:28 +00:00
parent 9627a270d2
commit 27ba130d14

View File

@ -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 */