WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] xentrace: trace interrupt window
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
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:mime-version:content-type:content-transfer-encoding :content-disposition:x-google-sender-auth; bh=oj14xUSQD2Ib60/zMj30WRRgiDr6Vhdtzyb8zHty0RE=; b=rJfzjYS9CEq9zhAm+JFyMRzNT6QyB7a0EyKge4ydopB5YQzhOLJO0dQNBqYBm2QPDJ XYFKMVHIKOHGgZNBiUotxk3eBARcl1VyZjLMrHkoGtkf6d5OWS4Ba1tbzHfftu7ol58k TqSgeNf1/OUFZ7dcIJp+suk/Y/yom2lcJgTmM=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xentrace: trace interrupt window, George Dunlap <=