summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormlarkin <mlarkin@openbsd.org>2017-01-09 06:28:27 +0000
committermlarkin <mlarkin@openbsd.org>2017-01-09 06:28:27 +0000
commit698d3c634c2477589e04daf45310938584195ea8 (patch)
treeee60e86b770bd99a627e96e46212a1997bdcf0bf /sys
parentWarnings and errors that occur during mdoc_validate() (diff)
downloadwireguard-openbsd-698d3c634c2477589e04daf45310938584195ea8.tar.xz
wireguard-openbsd-698d3c634c2477589e04daf45310938584195ea8.zip
i386 vmm requires PAE mode to be in use. don't match vmm(4) if ! PAE.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/vmm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/vmm.c b/sys/arch/i386/i386/vmm.c
index c8d2733405e..8322bd0ebf0 100644
--- a/sys/arch/i386/i386/vmm.c
+++ b/sys/arch/i386/i386/vmm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmm.c,v 1.8 2017/01/08 22:16:04 mlarkin Exp $ */
+/* $OpenBSD: vmm.c,v 1.9 2017/01/09 06:28:27 mlarkin Exp $ */
/*
* Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
*
@@ -245,6 +245,7 @@ extern struct gate_descriptor *idt;
/* CPU info (i386) */
extern char cpu_brandstr[];
extern uint32_t ecpu_eaxfeature;
+extern int cpu_pae;
/* Constants used in "CR access exit" */
#define CR_WRITE 0
@@ -270,6 +271,10 @@ vmm_probe(struct device *parent, void *match, void *aux)
if (strcmp(*busname, vmm_cd.cd_name) != 0)
return (0);
+ /* i386 must be using PAE */
+ if (!cpu_pae)
+ return (0);
+
found_vmx = 0;
found_svm = 0;
vmm_disabled = 0;