[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1/2] x86/vmx: dump MSR load area
From: Matt Wilson <msw@xxxxxxxxxx> ... as it is very helpful to diagnose VM entry failures due to MSR loading. Signed-off-by: Matt Wilson <msw@xxxxxxxxxx> --- xen/arch/x86/hvm/vmx/vmcs.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c index 1bd875a..a540d4e 100644 --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -1740,6 +1740,20 @@ static void vmx_dump_sel2(char *name, uint32_t lim) printk("%s: %08x %016"PRIx64"\n", name, limit, base); } +static void vmx_dump_vcpu_msr_area(struct vcpu *v) +{ + const struct vmx_msr_entry *msr_area = v->arch.hvm_vmx.msr_area; + unsigned int i, msr_count = v->arch.hvm_vmx.msr_count; + + printk(" msr_count = %d\n", v->arch.hvm_vmx.msr_count); + for ( i = 0; i < msr_count; i++ ) + { + printk(" msr_area[%d].index=0x%08x .data=0x%016lx\n", + i, msr_area[i].index, msr_area[i].data); + } +} + + void vmcs_dump_vcpu(struct vcpu *v) { struct cpu_user_regs *regs = &v->arch.user_regs; @@ -1879,6 +1893,13 @@ void vmcs_dump_vcpu(struct vcpu *v) (SECONDARY_EXEC_ENABLE_VPID | SECONDARY_EXEC_ENABLE_VM_FUNCTIONS) ) printk("Virtual processor ID = 0x%04x VMfunc controls = %016lx\n", vmr16(VIRTUAL_PROCESSOR_ID), vmr(VM_FUNCTION_CONTROL)); + printk("EXIT MSR load count = 0x%04x\n", + (uint32_t)vmr(VM_EXIT_MSR_LOAD_COUNT)); + printk("EXIT MSR store count = 0x%04x\n", + (uint32_t)vmr(VM_EXIT_MSR_STORE_COUNT)); + printk("ENTRY MSR load count = 0x%04x\n", + (uint32_t)vmr(VM_ENTRY_MSR_LOAD_COUNT)); + vmx_dump_vcpu_msr_area(v); vmx_vmcs_exit(v); } -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |