From b958c6e84f27534c79caffe162d6c75e729b8cb1 Mon Sep 17 00:00:00 2001 From: Mike Larkin Date: Tue, 10 Jan 2017 09:05:35 +0000 Subject: matching i386 diff from previous amd64 - ensure page walk length 4, as we don't support other ept depths --- sys/arch/i386/i386/vmm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/arch') diff --git a/sys/arch/i386/i386/vmm.c b/sys/arch/i386/i386/vmm.c index 8322bd0ebf0..7478a07ff03 100644 --- a/sys/arch/i386/i386/vmm.c +++ b/sys/arch/i386/i386/vmm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmm.c,v 1.9 2017/01/09 06:28:27 mlarkin Exp $ */ +/* $OpenBSD: vmm.c,v 1.10 2017/01/10 09:05:34 mlarkin Exp $ */ /* * Copyright (c) 2014 Mike Larkin * @@ -1793,6 +1793,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) { -- cgit v1.2.3