>>> On 13.10.16 at 13:15, <andrew.coop...@citrix.com> wrote: > Sample error looks like: > > (XEN) Failed vm entry (exit reason 0x80000022) caused by MSR loading (entry > 13). > (XEN) msr 0000068a, val 1fff800000102af0, (mbz 0) > (XEN) ************* VMCS Area ************** > > Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
Reviewed-by: Jan Beulich <jbeul...@suse.com> with > --- a/xen/arch/x86/hvm/vmx/vmx.c > +++ b/xen/arch/x86/hvm/vmx/vmx.c > @@ -3104,8 +3104,23 @@ static void vmx_failed_vmentry(unsigned int > exit_reason, > printk("caused by invalid guest state (%ld).\n", exit_qualification); > break; > case EXIT_REASON_MSR_LOADING: > - printk("caused by MSR entry %ld loading.\n", exit_qualification); > + { > + unsigned long idx = exit_qualification - 1; > + struct vmx_msr_entry *msr; ... preferably const here (and the declaration perhaps moved into the more narrow scope it's needed in), ... > + printk("caused by MSR loading (entry %ld).\n", idx); ... %lu (plus ideally the full stop dropped) here, and ... > + if ( idx > (PAGE_SIZE / sizeof(*msr)) ) ... >= here. > + printk(" Entry out of range\n"); > + else > + { > + msr = &curr->arch.hvm_vmx.msr_area[idx]; > + > + printk(" msr %08x, val %016"PRIx64", (mbz %#x)\n", I'm also unsure about the usefulness of the commas here - at least the second one seems a little strange with the value in parentheses. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel