summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormlarkin <mlarkin@openbsd.org>2017-01-10 09:02:29 +0000
committermlarkin <mlarkin@openbsd.org>2017-01-10 09:02:29 +0000
commit656cab957e5b7253f869de3c435b6f443bbcb07d (patch)
tree815e4c9758bb4303d6d0b37e9eb2100b7abf8e52
parentRemove NULL checks before m_free(9), it deals with it. (diff)
downloadwireguard-openbsd-656cab957e5b7253f869de3c435b6f443bbcb07d.tar.xz
wireguard-openbsd-656cab957e5b7253f869de3c435b6f443bbcb07d.zip
ensure EPT page walk length 4. We don't support other page walk lengths
-rw-r--r--sys/arch/amd64/amd64/vmm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/vmm.c b/sys/arch/amd64/amd64/vmm.c
index 0eedcb17d2b..592bbb01b74 100644
--- a/sys/arch/amd64/amd64/vmm.c
+++ b/sys/arch/amd64/amd64/vmm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmm.c,v 1.102 2017/01/08 22:16:04 mlarkin Exp $ */
+/* $OpenBSD: vmm.c,v 1.103 2017/01/10 09:02:29 mlarkin Exp $ */
/*
* Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
*
@@ -1808,6 +1808,10 @@ vcpu_reset_regs_vmx(struct vcpu *vcpu, struct vcpu_reg_state *vrs)
if (msr & IA32_EPT_VPID_CAP_PAGE_WALK_4) {
/* Page walk length 4 supported */
eptp |= ((IA32_EPT_PAGE_WALK_LENGTH - 1) << 3);
+ } else {
+ DPRINTF("EPT page walk length 4 not supported");
+ ret = EINVAL;
+ goto exit;
}
if (msr & IA32_EPT_VPID_CAP_WB) {