diff options
author | 2016-09-05 07:50:04 +0000 | |
---|---|---|
committer | 2016-09-05 07:50:04 +0000 | |
commit | 4a86ff83f60ce65f5dd879eb19d69d2a13109621 (patch) | |
tree | fd77c785a282462498548121e241ced1fa3e70df | |
parent | move pppx red-black trees from tree.h code to subr_tree.c code (diff) | |
download | wireguard-openbsd-4a86ff83f60ce65f5dd879eb19d69d2a13109621.tar.xz wireguard-openbsd-4a86ff83f60ce65f5dd879eb19d69d2a13109621.zip |
Dump vcpu and vmcs info on various fail to enter scenarios
-rw-r--r-- | sys/arch/amd64/amd64/vmm.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/vmm.c b/sys/arch/amd64/amd64/vmm.c index ef6572591e4..b6cceb21515 100644 --- a/sys/arch/amd64/amd64/vmm.c +++ b/sys/arch/amd64/amd64/vmm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmm.c,v 1.77 2016/09/04 08:49:18 mlarkin Exp $ */ +/* $OpenBSD: vmm.c,v 1.78 2016/09/05 07:50:04 mlarkin Exp $ */ /* * Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org> * @@ -3165,16 +3165,28 @@ vcpu_run_vmx(struct vcpu *vcpu, struct vm_run_params *vrp) } else if (ret == VMX_FAIL_LAUNCH_INVALID_VMCS) { printf("vcpu_run_vmx: failed launch with invalid " "vmcs\n"); +#ifdef VMM_DEBUG + vmx_vcpu_dump_regs(vcpu); + dump_vcpu(vcpu); +#endif /* VMM_DEBUG */ ret = EINVAL; } else if (ret == VMX_FAIL_LAUNCH_VALID_VMCS) { exit_reason = vcpu->vc_gueststate.vg_exit_reason; printf("vcpu_run_vmx: failed launch with valid " "vmcs, code=%lld (%s)\n", exit_reason, vmx_instruction_error_decode(exit_reason)); +#ifdef VMM_DEBUG + vmx_vcpu_dump_regs(vcpu); + dump_vcpu(vcpu); +#endif /* VMM_DEBUG */ ret = EINVAL; } else { printf("vcpu_run_vmx: failed launch for unknown " "reason %d\n", ret); +#ifdef VMM_DEBUG + vmx_vcpu_dump_regs(vcpu); + dump_vcpu(vcpu); +#endif /* VMM_DEBUG */ ret = EINVAL; } } |