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

[Xen-changelog] [xen-unstable] xentrace: Clean up HVM I/O tracing.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1240577177 -3600
# Node ID dc5bd14a46752b52688146272e9b40f962a521c8
# Parent  40156cbaf2445b04cf0eefd4f863a97df81a5b0a
xentrace: Clean up HVM I/O tracing.

Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/xentrace/formats     |    6 ++++--
 xen/arch/x86/hvm/emulate.c |    8 ++++----
 xen/include/public/trace.h |    8 ++++----
 3 files changed, 12 insertions(+), 10 deletions(-)

diff -r 40156cbaf244 -r dc5bd14a4675 tools/xentrace/formats
--- a/tools/xentrace/formats    Fri Apr 24 13:20:55 2009 +0100
+++ b/tools/xentrace/formats    Fri Apr 24 13:46:17 2009 +0100
@@ -62,8 +62,10 @@ 0x00082014  CPU%(cpu)d  %(tsc)d (+%(relt
 0x00082014  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  INVLPG      [ is invlpga? = 
%(1)d, virt = 0x%(2)08x ]
 0x00082114  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  INVLPG      [ is invlpga? = 
%(1)d, virt = 0x%(2)016x ]
 0x00082015  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  MCE
-0x00082016  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  IO_ASSIST   [ data = 0x%(1)04x 
]
-0x00082017  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  MMIO_ASSIST [ data = 0x%(1)04x 
]
+0x00082016  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  IOPORT_READ [ data = 0x%(1)04x 
]
+0x00082216  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  IOPORT_WRITE [ data = 
0x%(1)04x ]
+0x00082017  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  MMIO_READ   [ data = 0x%(1)04x 
]
+0x00082217  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  MMIO_WRITE  [ data = 0x%(1)04x 
]
 0x00082018  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  CLTS
 0x00082019  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  LMSW        [ value = 
0x%(1)08x ]
 0x00082119  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  LMSW        [ value = 
0x%(1)016x ]
diff -r 40156cbaf244 -r dc5bd14a4675 xen/arch/x86/hvm/emulate.c
--- a/xen/arch/x86/hvm/emulate.c        Fri Apr 24 13:20:55 2009 +0100
+++ b/xen/arch/x86/hvm/emulate.c        Fri Apr 24 13:46:17 2009 +0100
@@ -21,7 +21,6 @@
 #include <asm/hvm/trace.h>
 #include <asm/hvm/support.h>
 
-#define HVMTRACE_IO_ASSIST_WRITE 0x200
 static void hvmtrace_io_assist(int is_mmio, ioreq_t *p)
 {
     unsigned int size, event;
@@ -30,9 +29,10 @@ static void hvmtrace_io_assist(int is_mm
     if ( likely(!tb_init_done) )
         return;
 
-    event = is_mmio ? TRC_HVM_MMIO_ASSIST : TRC_HVM_IO_ASSIST;
-    if ( !p->dir )
-        event |= HVMTRACE_IO_ASSIST_WRITE;
+    if ( is_mmio )
+        event = p->dir ? TRC_HVM_IOMEM_READ : TRC_HVM_IOMEM_WRITE;
+    else
+        event = p->dir ? TRC_HVM_IOPORT_READ : TRC_HVM_IOPORT_WRITE;
 
     *(uint64_t *)buffer = p->addr;
     size = (p->addr != (u32)p->addr) ? 8 : 4;
diff -r 40156cbaf244 -r dc5bd14a4675 xen/include/public/trace.h
--- a/xen/include/public/trace.h        Fri Apr 24 13:20:55 2009 +0100
+++ b/xen/include/public/trace.h        Fri Apr 24 13:46:17 2009 +0100
@@ -142,14 +142,14 @@
 #define TRC_HVM_INVLPG          (TRC_HVM_HANDLER + 0x14)
 #define TRC_HVM_INVLPG64        (TRC_HVM_HANDLER + TRC_64_FLAG + 0x14)
 #define TRC_HVM_MCE             (TRC_HVM_HANDLER + 0x15)
-#define TRC_HVM_IO_ASSIST       (TRC_HVM_HANDLER + 0x16)
-#define TRC_HVM_IO_ASSIST64     (TRC_HVM_HANDLER + TRC_64_FLAG + 0x16)
-#define TRC_HVM_MMIO_ASSIST     (TRC_HVM_HANDLER + 0x17)
-#define TRC_HVM_MMIO_ASSIST64   (TRC_HVM_HANDLER + TRC_64_FLAG + 0x17)
+#define TRC_HVM_IOPORT_READ     (TRC_HVM_HANDLER + 0x16)
+#define TRC_HVM_IOMEM_READ      (TRC_HVM_HANDLER + 0x17)
 #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)
+#define TRC_HVM_IOPORT_WRITE    (TRC_HVM_HANDLER + 0x216)
+#define TRC_HVM_IOMEM_WRITE     (TRC_HVM_HANDLER + 0x217)
 
 /* trace subclasses for power management */
 #define TRC_PM_FREQ     0x00801000      /* xen cpu freq events */

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


 


Rackspace

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