summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Larkin <mlarkin@cvs.openbsd.org>2016-06-28 05:50:56 +0000
committerMike Larkin <mlarkin@cvs.openbsd.org>2016-06-28 05:50:56 +0000
commit1b12549c218f8ffa2d4dfdb15269dd8fb7292ed3 (patch)
tree73a65b9c3838da38e65cae208442a20b71db7ffd
parentdf7c6bccba2d98403f4ea3b1bbf95d394a13815b (diff)
Don't panic on null vmxon region or vmxon failure - this will be handled
in the calling function which will return EIO back up the stack to vmd(8). Fixes a panic when CPUs fail to spin up for other reasons during boot, noticed by reyk.
-rw-r--r--sys/arch/amd64/amd64/vmm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/vmm.c b/sys/arch/amd64/amd64/vmm.c
index f6c8ffdd2a6..d2cb5685080 100644
--- a/sys/arch/amd64/amd64/vmm.c
+++ b/sys/arch/amd64/amd64/vmm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmm.c,v 1.64 2016/06/10 16:37:16 stefan Exp $ */
+/* $OpenBSD: vmm.c,v 1.65 2016/06/28 05:50:55 mlarkin Exp $ */
/*
* Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
*
@@ -685,7 +685,7 @@ start_vmm_on_cpu(struct cpu_info *ci)
*/
if (ci->ci_vmm_flags & CI_VMM_VMX) {
if (ci->ci_vmxon_region == 0)
- panic("NULL vmxon region specified\n");
+ return;
else {
bzero(ci->ci_vmxon_region, PAGE_SIZE);
ci->ci_vmxon_region->vr_revision =
@@ -709,7 +709,7 @@ start_vmm_on_cpu(struct cpu_info *ci)
/* Enter VMX mode */
if (vmxon((uint64_t *)&ci->ci_vmxon_region_pa))
- panic("VMXON failed\n");
+ return;
}
}