diff options
author | Mike Larkin <mlarkin@cvs.openbsd.org> | 2016-04-05 09:33:06 +0000 |
---|---|---|
committer | Mike Larkin <mlarkin@cvs.openbsd.org> | 2016-04-05 09:33:06 +0000 |
commit | 152cc94c85ff5023f1e216380e8a0a0793f546da (patch) | |
tree | 079911e610494bd5b263850c75f28ee3540e73b5 /usr.sbin/vmd/vmm.c | |
parent | 13e05f1e6413704a4ce8e037ad3138141fa54493 (diff) |
Support processors without unrestricted guest capability.
ok stefan
Diffstat (limited to 'usr.sbin/vmd/vmm.c')
-rw-r--r-- | usr.sbin/vmd/vmm.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/vmd/vmm.c b/usr.sbin/vmd/vmm.c index 521a08beb7f..8c7eddf2df7 100644 --- a/usr.sbin/vmd/vmm.c +++ b/usr.sbin/vmd/vmm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmm.c,v 1.24 2016/04/04 17:13:54 stefan Exp $ */ +/* $OpenBSD: vmm.c,v 1.25 2016/04/05 09:33:05 mlarkin Exp $ */ /* * Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org> @@ -161,13 +161,16 @@ static struct privsep_proc procs[] = { * * Specific bootloaders should clone this structure and override * those fields as needed. + * + * Note - CR3 and various bits in CR0 may be overridden by vmm(4) based on + * features of the CPU in use. */ static const struct vcpu_init_state vcpu_init_flat32 = { 0x2, /* RFLAGS */ 0x0, /* RIP */ 0x0, /* RSP */ - CR0_CD | CR0_NW | CR0_ET | CR0_PE, /* CR0 */ - 0x0, /* CR3 */ + CR0_CD | CR0_NW | CR0_ET | CR0_PE | CR0_PG, /* CR0 */ + PML4_PAGE, /* CR3 */ { 0x8, 0xFFFFFFFF, 0xC09F, 0x0}, /* CS */ { 0x10, 0xFFFFFFFF, 0xC093, 0x0}, /* DS */ { 0x10, 0xFFFFFFFF, 0xC093, 0x0}, /* ES */ |