ia64/xen-unstable

changeset 19575:dc5bd14a4675

xentrace: Clean up HVM I/O tracing.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Apr 24 13:46:17 2009 +0100 (2009-04-24)
parents 40156cbaf244
children ce273aa880e5
files tools/xentrace/formats xen/arch/x86/hvm/emulate.c xen/include/public/trace.h
line diff
     1.1 --- a/tools/xentrace/formats	Fri Apr 24 13:20:55 2009 +0100
     1.2 +++ b/tools/xentrace/formats	Fri Apr 24 13:46:17 2009 +0100
     1.3 @@ -62,8 +62,10 @@ 0x00082013  CPU%(cpu)d  %(tsc)d (+%(relt
     1.4  0x00082014  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  INVLPG      [ is invlpga? = %(1)d, virt = 0x%(2)08x ]
     1.5  0x00082114  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  INVLPG      [ is invlpga? = %(1)d, virt = 0x%(2)016x ]
     1.6  0x00082015  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  MCE
     1.7 -0x00082016  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  IO_ASSIST   [ data = 0x%(1)04x ]
     1.8 -0x00082017  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  MMIO_ASSIST [ data = 0x%(1)04x ]
     1.9 +0x00082016  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  IOPORT_READ [ data = 0x%(1)04x ]
    1.10 +0x00082216  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  IOPORT_WRITE [ data = 0x%(1)04x ]
    1.11 +0x00082017  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  MMIO_READ   [ data = 0x%(1)04x ]
    1.12 +0x00082217  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  MMIO_WRITE  [ data = 0x%(1)04x ]
    1.13  0x00082018  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  CLTS
    1.14  0x00082019  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  LMSW        [ value = 0x%(1)08x ]
    1.15  0x00082119  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  LMSW        [ value = 0x%(1)016x ]
     2.1 --- a/xen/arch/x86/hvm/emulate.c	Fri Apr 24 13:20:55 2009 +0100
     2.2 +++ b/xen/arch/x86/hvm/emulate.c	Fri Apr 24 13:46:17 2009 +0100
     2.3 @@ -21,7 +21,6 @@
     2.4  #include <asm/hvm/trace.h>
     2.5  #include <asm/hvm/support.h>
     2.6  
     2.7 -#define HVMTRACE_IO_ASSIST_WRITE 0x200
     2.8  static void hvmtrace_io_assist(int is_mmio, ioreq_t *p)
     2.9  {
    2.10      unsigned int size, event;
    2.11 @@ -30,9 +29,10 @@ static void hvmtrace_io_assist(int is_mm
    2.12      if ( likely(!tb_init_done) )
    2.13          return;
    2.14  
    2.15 -    event = is_mmio ? TRC_HVM_MMIO_ASSIST : TRC_HVM_IO_ASSIST;
    2.16 -    if ( !p->dir )
    2.17 -        event |= HVMTRACE_IO_ASSIST_WRITE;
    2.18 +    if ( is_mmio )
    2.19 +        event = p->dir ? TRC_HVM_IOMEM_READ : TRC_HVM_IOMEM_WRITE;
    2.20 +    else
    2.21 +        event = p->dir ? TRC_HVM_IOPORT_READ : TRC_HVM_IOPORT_WRITE;
    2.22  
    2.23      *(uint64_t *)buffer = p->addr;
    2.24      size = (p->addr != (u32)p->addr) ? 8 : 4;
     3.1 --- a/xen/include/public/trace.h	Fri Apr 24 13:20:55 2009 +0100
     3.2 +++ b/xen/include/public/trace.h	Fri Apr 24 13:46:17 2009 +0100
     3.3 @@ -142,14 +142,14 @@
     3.4  #define TRC_HVM_INVLPG          (TRC_HVM_HANDLER + 0x14)
     3.5  #define TRC_HVM_INVLPG64        (TRC_HVM_HANDLER + TRC_64_FLAG + 0x14)
     3.6  #define TRC_HVM_MCE             (TRC_HVM_HANDLER + 0x15)
     3.7 -#define TRC_HVM_IO_ASSIST       (TRC_HVM_HANDLER + 0x16)
     3.8 -#define TRC_HVM_IO_ASSIST64     (TRC_HVM_HANDLER + TRC_64_FLAG + 0x16)
     3.9 -#define TRC_HVM_MMIO_ASSIST     (TRC_HVM_HANDLER + 0x17)
    3.10 -#define TRC_HVM_MMIO_ASSIST64   (TRC_HVM_HANDLER + TRC_64_FLAG + 0x17)
    3.11 +#define TRC_HVM_IOPORT_READ     (TRC_HVM_HANDLER + 0x16)
    3.12 +#define TRC_HVM_IOMEM_READ      (TRC_HVM_HANDLER + 0x17)
    3.13  #define TRC_HVM_CLTS            (TRC_HVM_HANDLER + 0x18)
    3.14  #define TRC_HVM_LMSW            (TRC_HVM_HANDLER + 0x19)
    3.15  #define TRC_HVM_LMSW64          (TRC_HVM_HANDLER + TRC_64_FLAG + 0x19)
    3.16  #define TRC_HVM_INTR_WINDOW     (TRC_HVM_HANDLER + 0x20)
    3.17 +#define TRC_HVM_IOPORT_WRITE    (TRC_HVM_HANDLER + 0x216)
    3.18 +#define TRC_HVM_IOMEM_WRITE     (TRC_HVM_HANDLER + 0x217)
    3.19  
    3.20  /* trace subclasses for power management */
    3.21  #define TRC_PM_FREQ     0x00801000      /* xen cpu freq events */