Module Name: src Committed By: maxv Date: Sun Jun 16 18:30:31 UTC 2019
Modified Files: src/sys/dev/nvmm/x86: nvmm_x86_vmx.c Log Message: Make sure VMX-outside-SMX is allowed. It may not be if the BIOS decided to disable VMX. Seen on an HP laptop, where NVMM would panic because of that. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/nvmm/x86/nvmm_x86_vmx.c diff -u src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.35 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.36 --- src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.35 Sat May 18 08:55:59 2019 +++ src/sys/dev/nvmm/x86/nvmm_x86_vmx.c Sun Jun 16 18:30:31 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nvmm_x86_vmx.c,v 1.35 2019/05/18 08:55:59 maxv Exp $ */ +/* $NetBSD: nvmm_x86_vmx.c,v 1.36 2019/06/16 18:30:31 maxv Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.35 2019/05/18 08:55:59 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.36 2019/06/16 18:30:31 maxv Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -2894,6 +2894,9 @@ vmx_ident(void) if ((msr & IA32_FEATURE_CONTROL_LOCK) == 0) { return false; } + if ((msr & IA32_FEATURE_CONTROL_OUT_SMX) == 0) { + return false; + } msr = rdmsr(MSR_IA32_VMX_BASIC); if ((msr & IA32_VMX_BASIC_IO_REPORT) == 0) {