[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.7] x86/VT-x: Dump VMCS on VMLAUNCH/VMRESUME failure
commit d9dec4151a2ae2708c4b71f9e78257e5c874e6eb Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Mon Feb 20 16:00:20 2017 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Feb 20 16:00:20 2017 +0100 x86/VT-x: Dump VMCS on VMLAUNCH/VMRESUME failure If a VMLAUNCH/VMRESUME fails due to invalid control or host state, dump the VMCS before crashing the domain. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Kevin Tian <kevin.tian@xxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> master commit: d0fd9ae54491328b10dee4003656c14b3bf3d3e9 master date: 2016-07-04 10:51:48 +0100 --- xen/arch/x86/hvm/vmx/vmcs.c | 5 +++++ xen/include/asm-x86/hvm/vmx/vmcs.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c index 776b585..e2aa42a 100644 --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -1659,6 +1659,11 @@ void vmx_vmentry_failure(void) __vmread(VM_INSTRUCTION_ERROR, &error); gprintk(XENLOG_ERR, "VM%s error: %#lx\n", curr->arch.hvm_vmx.launched ? "RESUME" : "LAUNCH", error); + + if ( error == VMX_INSN_INVALID_CONTROL_STATE || + error == VMX_INSN_INVALID_HOST_STATE ) + vmcs_dump_vcpu(curr); + domain_crash_synchronous(); } diff --git a/xen/include/asm-x86/hvm/vmx/vmcs.h b/xen/include/asm-x86/hvm/vmx/vmcs.h index e82b34e..7e18a8f 100644 --- a/xen/include/asm-x86/hvm/vmx/vmcs.h +++ b/xen/include/asm-x86/hvm/vmx/vmcs.h @@ -577,6 +577,10 @@ extern const unsigned int vmx_introspection_force_enabled_msrs_size; #define VMX_GUEST_MSR 0 #define VMX_HOST_MSR 1 +/* VM Instruction error numbers. */ +#define VMX_INSN_INVALID_CONTROL_STATE 7 +#define VMX_INSN_INVALID_HOST_STATE 8 + void vmx_disable_intercept_for_msr(struct vcpu *v, u32 msr, int type); void vmx_enable_intercept_for_msr(struct vcpu *v, u32 msr, int type); int vmx_read_guest_msr(u32 msr, u64 *val); -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.7 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |