summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormlarkin <mlarkin@openbsd.org>2016-06-28 05:50:55 +0000
committermlarkin <mlarkin@openbsd.org>2016-06-28 05:50:55 +0000
commit864960f6a64571bd16216d6566f5dc6e5835d4ca (patch)
tree101e8eabe8ca7917fd66715c7db2af96cb2b463d /sys
parentEnable UMIP feature if present. miod originally pointed this out to me. (diff)
downloadwireguard-openbsd-864960f6a64571bd16216d6566f5dc6e5835d4ca.tar.xz
wireguard-openbsd-864960f6a64571bd16216d6566f5dc6e5835d4ca.zip
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.
Diffstat (limited to 'sys')
-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;
}
}