From: mlarkin Date: Tue, 28 Jun 2016 05:50:55 +0000 (+0000) Subject: Don't panic on null vmxon region or vmxon failure - this will be handled X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=864960f6a64571bd16216d6566f5dc6e5835d4ca;p=openbsd 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. --- 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 * @@ -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; } }