[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xentrace: trace interrupt window


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "George Dunlap" <George.Dunlap@xxxxxxxxxxxxx>
  • Date: Thu, 4 Dec 2008 17:39:38 +0000
  • Delivery-date: Thu, 04 Dec 2008 09:40:04 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition:x-google-sender-auth; b=SdCTfCTvkjq2f7KpoIv3nKWtagCsZPu2nVR+lDCaOPsyyOCEK86w4HCS9Cla+b2ilt 6Ae9NZFprTk2LfTDR39Xxi6sV+lZw6KlOXkjvRnRum4N9z2GeBUyJXGXB9tonlJdWqSq OBxVGEbCCen0zzps8QO+5n2ZcFPGJ/wEXkw+E=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Make a specific interrupt-window trace, with information about why the
interrupt in question can't be delivered.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>

diff -r 7338f6301067 xen/arch/x86/hvm/svm/intr.c
--- a/xen/arch/x86/hvm/svm/intr.c       Wed Dec 03 15:58:23 2008 +0000
+++ b/xen/arch/x86/hvm/svm/intr.c       Thu Dec 04 17:30:46 2008 +0000
@@ -80,7 +80,8 @@

     ASSERT(intack.source != hvm_intsrc_none);

-    HVMTRACE_2D(INJ_VIRQ, 0x0, /*fake=*/ 1);
+    HVMTRACE_3D(INTR_WINDOW, intack.vector, intack.source,
+                vmcb->eventinj.fields.v?vmcb->eventinj.fields.vector:-1);

     /*
      * Create a dummy virtual interrupt to intercept as soon as the
diff -r 7338f6301067 xen/arch/x86/hvm/vmx/intr.c
--- a/xen/arch/x86/hvm/vmx/intr.c       Wed Dec 03 15:58:23 2008 +0000
+++ b/xen/arch/x86/hvm/vmx/intr.c       Thu Dec 04 17:30:46 2008 +0000
@@ -73,6 +73,13 @@
     u32 ctl = CPU_BASED_VIRTUAL_INTR_PENDING;

     ASSERT(intack.source != hvm_intsrc_none);
+
+    if ( tb_init_done )
+    {
+        unsigned intr = __vmread(VM_ENTRY_INTR_INFO);
+        HVMTRACE_3D(INTR_WINDOW, intack.vector, intack.source,
+                    (intr & INTR_INFO_VALID_MASK) ? intr & 0xff : -1);
+    }

     if ( (intack.source == hvm_intsrc_nmi) && cpu_has_vmx_vnmi )
     {
diff -r 7338f6301067 xen/include/asm-x86/hvm/trace.h
--- a/xen/include/asm-x86/hvm/trace.h   Wed Dec 03 15:58:23 2008 +0000
+++ b/xen/include/asm-x86/hvm/trace.h   Thu Dec 04 17:30:46 2008 +0000
@@ -24,6 +24,7 @@
 #define DO_TRC_HVM_INJ_EXC     DEFAULT_HVM_INJECT
 #define DO_TRC_HVM_INJ_VIRQ    DEFAULT_HVM_INJECT
 #define DO_TRC_HVM_REINJ_VIRQ  DEFAULT_HVM_INJECT
+#define DO_TRC_HVM_INTR_WINDOW DEFAULT_HVM_INJECT
 #define DO_TRC_HVM_IO_READ     DEFAULT_HVM_IO
 #define DO_TRC_HVM_IO_WRITE    DEFAULT_HVM_IO
 #define DO_TRC_HVM_CR_READ     DEFAULT_HVM_REGACCESS
diff -r 7338f6301067 xen/include/public/trace.h
--- a/xen/include/public/trace.h        Wed Dec 03 15:58:23 2008 +0000
+++ b/xen/include/public/trace.h        Thu Dec 04 17:30:46 2008 +0000
@@ -148,6 +148,7 @@
 #define TRC_HVM_CLTS            (TRC_HVM_HANDLER + 0x18)
 #define TRC_HVM_LMSW            (TRC_HVM_HANDLER + 0x19)
 #define TRC_HVM_LMSW64          (TRC_HVM_HANDLER + TRC_64_FLAG + 0x19)
+#define TRC_HVM_INTR_WINDOW     (TRC_HVM_HANDLER + 0X20)

 /* trace subclasses for power management */
 #define TRC_PM_FREQ     0x00801000      /* xen cpu freq events */

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.