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-changelog

[Xen-changelog] [xen-unstable] hvm, xentrace: Extend HVMTRACE_ND so that

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hvm, xentrace: Extend HVMTRACE_ND so that a modifier to the basic
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Fri, 15 Apr 2011 02:50:37 +0100
Delivery-date: Thu, 14 Apr 2011 18:51:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1302789264 -3600
# Node ID 757460e1ec487a5c2b78e6f7d667db826fa5a4a0
# Parent  3f00c5faa12aed4d0993391f71b7f12cf92f0208
hvm, xentrace: Extend HVMTRACE_ND so that a modifier to the basic
event reason can be ORed into the trace record.

Signed-off-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 3f00c5faa12a -r 757460e1ec48 xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Wed Apr 13 16:10:26 2011 +0100
+++ b/xen/arch/x86/hvm/svm/svm.c        Thu Apr 14 14:54:24 2011 +0100
@@ -1729,11 +1729,11 @@
     }
 
     if ( hvm_long_mode_enabled(v) )
-        HVMTRACE_ND(VMEXIT64, 1/*cycles*/, 3, exit_reason,
+        HVMTRACE_ND(VMEXIT64, 0, 1/*cycles*/, 3, exit_reason,
                     (uint32_t)regs->eip, (uint32_t)((uint64_t)regs->eip >> 32),
                     0, 0, 0);
     else
-        HVMTRACE_ND(VMEXIT, 1/*cycles*/, 2, exit_reason,
+        HVMTRACE_ND(VMEXIT, 0, 1/*cycles*/, 2, exit_reason,
                     (uint32_t)regs->eip, 
                     0, 0, 0, 0);
 
@@ -2014,7 +2014,7 @@
 
 asmlinkage void svm_trace_vmentry(void)
 {
-    HVMTRACE_ND (VMENTRY, 1/*cycles*/, 0, 0, 0, 0, 0, 0, 0);
+    HVMTRACE_ND(VMENTRY, 0, 1/*cycles*/, 0, 0, 0, 0, 0, 0, 0);
 }
   
 /*
diff -r 3f00c5faa12a -r 757460e1ec48 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Wed Apr 13 16:10:26 2011 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Thu Apr 14 14:54:24 2011 +0100
@@ -2251,11 +2251,11 @@
     exit_reason = __vmread(VM_EXIT_REASON);
 
     if ( hvm_long_mode_enabled(v) )
-        HVMTRACE_ND(VMEXIT64, 1/*cycles*/, 3, exit_reason,
+        HVMTRACE_ND(VMEXIT64, 0, 1/*cycles*/, 3, exit_reason,
                     (uint32_t)regs->eip, (uint32_t)((uint64_t)regs->eip >> 32),
                     0, 0, 0);
     else
-        HVMTRACE_ND(VMEXIT, 1/*cycles*/, 2, exit_reason,
+        HVMTRACE_ND(VMEXIT, 0, 1/*cycles*/, 2, exit_reason,
                     (uint32_t)regs->eip, 
                     0, 0, 0, 0);
 
@@ -2699,7 +2699,7 @@
         vpid_sync_all();
 
  out:
-    HVMTRACE_ND (VMENTRY, 1/*cycles*/, 0, 0, 0, 0, 0, 0, 0);
+    HVMTRACE_ND(VMENTRY, 0, 1/*cycles*/, 0, 0, 0, 0, 0, 0, 0);
 }
 
 /*
diff -r 3f00c5faa12a -r 757460e1ec48 xen/include/asm-x86/hvm/trace.h
--- a/xen/include/asm-x86/hvm/trace.h   Wed Apr 13 16:10:26 2011 +0100
+++ b/xen/include/asm-x86/hvm/trace.h   Thu Apr 14 14:54:24 2011 +0100
@@ -58,38 +58,38 @@
 #define TRC_PAR_LONG(par) (par)
 #endif
 
-#define HVMTRACE_ND(evt, cycles, count, d1, d2, d3, d4, d5, d6)         \
-    do {                                                                \
-        if ( unlikely(tb_init_done) && DO_TRC_HVM_ ## evt )             \
-        {                                                               \
-            struct {                                                    \
-                u32 d[6];                                               \
-            } _d;                                                       \
-            _d.d[0]=(d1);                                               \
-            _d.d[1]=(d2);                                               \
-            _d.d[2]=(d3);                                               \
-            _d.d[3]=(d4);                                               \
-            _d.d[4]=(d5);                                               \
-            _d.d[5]=(d6);                                               \
-            __trace_var(TRC_HVM_ ## evt, cycles,                        \
-                        sizeof(*_d.d) * count, &_d);                    \
-        }                                                               \
+#define HVMTRACE_ND(evt, modifier, cycles, count, d1, d2, d3, d4, d5, d6) \
+    do {                                                                  \
+        if ( unlikely(tb_init_done) && DO_TRC_HVM_ ## evt )               \
+        {                                                                 \
+            struct {                                                      \
+                u32 d[6];                                                 \
+            } _d;                                                         \
+            _d.d[0]=(d1);                                                 \
+            _d.d[1]=(d2);                                                 \
+            _d.d[2]=(d3);                                                 \
+            _d.d[3]=(d4);                                                 \
+            _d.d[4]=(d5);                                                 \
+            _d.d[5]=(d6);                                                 \
+            __trace_var(TRC_HVM_ ## evt | (modifier), cycles,             \
+                        sizeof(*_d.d) * count, &_d);                      \
+        }                                                                 \
     } while(0)
 
 #define HVMTRACE_6D(evt, d1, d2, d3, d4, d5, d6)    \
-                      HVMTRACE_ND(evt, 0, 6, d1, d2, d3,  d4, d5, d6)
+    HVMTRACE_ND(evt, 0, 0, 6, d1, d2, d3, d4, d5, d6)
 #define HVMTRACE_5D(evt, d1, d2, d3, d4, d5)        \
-                      HVMTRACE_ND(evt, 0, 5, d1, d2, d3,  d4, d5, 0)
-#define HVMTRACE_4D(evt, d1, d2, d3, d4)               \
-                      HVMTRACE_ND(evt, 0, 4, d1, d2, d3,  d4, 0, 0)
-#define HVMTRACE_3D(evt, d1, d2, d3)                   \
-                      HVMTRACE_ND(evt, 0, 3, d1, d2, d3,  0, 0, 0)
-#define HVMTRACE_2D(evt, d1, d2)                       \
-                      HVMTRACE_ND(evt, 0, 2, d1, d2,  0,  0, 0, 0)
-#define HVMTRACE_1D(evt, d1)                           \
-                      HVMTRACE_ND(evt, 0, 1, d1,  0,  0,  0, 0, 0)
-#define HVMTRACE_0D(evt)                               \
-                      HVMTRACE_ND(evt, 0, 0, 0,  0,  0,  0, 0, 0)
+    HVMTRACE_ND(evt, 0, 0, 5, d1, d2, d3, d4, d5,  0)
+#define HVMTRACE_4D(evt, d1, d2, d3, d4)            \
+    HVMTRACE_ND(evt, 0, 0, 4, d1, d2, d3, d4,  0,  0)
+#define HVMTRACE_3D(evt, d1, d2, d3)                \
+    HVMTRACE_ND(evt, 0, 0, 3, d1, d2, d3,  0,  0,  0)
+#define HVMTRACE_2D(evt, d1, d2)                    \
+    HVMTRACE_ND(evt, 0, 0, 2, d1, d2,  0,  0,  0,  0)
+#define HVMTRACE_1D(evt, d1)                        \
+    HVMTRACE_ND(evt, 0, 0, 1, d1,  0,  0,  0,  0,  0)
+#define HVMTRACE_0D(evt)                            \
+    HVMTRACE_ND(evt, 0, 0, 0,  0,  0,  0,  0,  0,  0)
 
 
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] hvm, xentrace: Extend HVMTRACE_ND so that a modifier to the basic, Xen patchbot-unstable <=