xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] x86/vmx: Print the problematic MSR if a vmentry fails
@ 2016-10-13 11:15 Andrew Cooper
  2016-10-13 11:15 ` [PATCH 2/2] x86/vmx: Reduce the verbosity of the vmentry failure error reporting Andrew Cooper
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Andrew Cooper @ 2016-10-13 11:15 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Kevin Tian, Jun Nakajima, Jan Beulich

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.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Jun Nakajima <jun.nakajima@intel.com>
CC: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/hvm/vmx/vmx.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index b9102ce..38cbcea 100644
--- 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;
+
+        printk("caused by MSR loading (entry %ld).\n", idx);
+
+        if ( idx > (PAGE_SIZE / sizeof(*msr)) )
+            printk("  Entry out of range\n");
+        else
+        {
+            msr = &curr->arch.hvm_vmx.msr_area[idx];
+
+            printk("  msr %08x, val %016"PRIx64", (mbz %#x)\n",
+                   msr->index, msr->data, msr->mbz);
+        }
         break;
+    }
     case EXIT_REASON_MCE_DURING_VMENTRY:
         printk("caused by machine check.\n");
         HVMTRACE_0D(MCE);
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-10-20 10:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-13 11:15 [PATCH 1/2] x86/vmx: Print the problematic MSR if a vmentry fails Andrew Cooper
2016-10-13 11:15 ` [PATCH 2/2] x86/vmx: Reduce the verbosity of the vmentry failure error reporting Andrew Cooper
2016-10-13 11:41   ` Jan Beulich
2016-10-13 11:38 ` [PATCH 1/2] x86/vmx: Print the problematic MSR if a vmentry fails Jan Beulich
2016-10-13 11:52   ` Andrew Cooper
2016-10-13 13:46 ` [PATCH v2 " Andrew Cooper
2016-10-13 13:46   ` [PATCH v2 2/2] x86/vmx: Reduce the verbosity of the vmentry failure error reporting Andrew Cooper
2016-10-20  9:41     ` Tian, Kevin
2016-10-14  6:39   ` [PATCH v2 1/2] x86/vmx: Print the problematic MSR if a vmentry fails Jan Beulich
2016-10-14  9:29     ` Andrew Cooper
2016-10-20  9:40       ` Tian, Kevin
2016-10-20 10:41         ` Andrew Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).