ia64/xen-unstable

changeset 18881:b44e244d7bb9

xentrace: trace interrupt window

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@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Dec 05 11:05:45 2008 +0000 (2008-12-05)
parents 99f01b8184c7
children 5e066dc410ac
files xen/arch/x86/hvm/svm/intr.c xen/arch/x86/hvm/vmx/intr.c xen/include/asm-x86/hvm/trace.h xen/include/public/trace.h
line diff
     1.1 --- a/xen/arch/x86/hvm/svm/intr.c	Fri Dec 05 10:59:41 2008 +0000
     1.2 +++ b/xen/arch/x86/hvm/svm/intr.c	Fri Dec 05 11:05:45 2008 +0000
     1.3 @@ -80,7 +80,8 @@ static void enable_intr_window(struct vc
     1.4  
     1.5      ASSERT(intack.source != hvm_intsrc_none);
     1.6  
     1.7 -    HVMTRACE_2D(INJ_VIRQ, 0x0, /*fake=*/ 1);
     1.8 +    HVMTRACE_3D(INTR_WINDOW, intack.vector, intack.source,
     1.9 +                vmcb->eventinj.fields.v?vmcb->eventinj.fields.vector:-1);
    1.10  
    1.11      /*
    1.12       * Create a dummy virtual interrupt to intercept as soon as the
     2.1 --- a/xen/arch/x86/hvm/vmx/intr.c	Fri Dec 05 10:59:41 2008 +0000
     2.2 +++ b/xen/arch/x86/hvm/vmx/intr.c	Fri Dec 05 11:05:45 2008 +0000
     2.3 @@ -74,6 +74,13 @@ static void enable_intr_window(struct vc
     2.4  
     2.5      ASSERT(intack.source != hvm_intsrc_none);
     2.6  
     2.7 +    if ( unlikely(tb_init_done) )
     2.8 +    {
     2.9 +        unsigned int intr = __vmread(VM_ENTRY_INTR_INFO);
    2.10 +        HVMTRACE_3D(INTR_WINDOW, intack.vector, intack.source,
    2.11 +                    (intr & INTR_INFO_VALID_MASK) ? intr & 0xff : -1);
    2.12 +    }
    2.13 +
    2.14      if ( (intack.source == hvm_intsrc_nmi) && cpu_has_vmx_vnmi )
    2.15      {
    2.16          /*
     3.1 --- a/xen/include/asm-x86/hvm/trace.h	Fri Dec 05 10:59:41 2008 +0000
     3.2 +++ b/xen/include/asm-x86/hvm/trace.h	Fri Dec 05 11:05:45 2008 +0000
     3.3 @@ -24,6 +24,7 @@
     3.4  #define DO_TRC_HVM_INJ_EXC     DEFAULT_HVM_INJECT
     3.5  #define DO_TRC_HVM_INJ_VIRQ    DEFAULT_HVM_INJECT
     3.6  #define DO_TRC_HVM_REINJ_VIRQ  DEFAULT_HVM_INJECT
     3.7 +#define DO_TRC_HVM_INTR_WINDOW DEFAULT_HVM_INJECT
     3.8  #define DO_TRC_HVM_IO_READ     DEFAULT_HVM_IO
     3.9  #define DO_TRC_HVM_IO_WRITE    DEFAULT_HVM_IO
    3.10  #define DO_TRC_HVM_CR_READ     DEFAULT_HVM_REGACCESS
     4.1 --- a/xen/include/public/trace.h	Fri Dec 05 10:59:41 2008 +0000
     4.2 +++ b/xen/include/public/trace.h	Fri Dec 05 11:05:45 2008 +0000
     4.3 @@ -148,6 +148,7 @@
     4.4  #define TRC_HVM_CLTS            (TRC_HVM_HANDLER + 0x18)
     4.5  #define TRC_HVM_LMSW            (TRC_HVM_HANDLER + 0x19)
     4.6  #define TRC_HVM_LMSW64          (TRC_HVM_HANDLER + TRC_64_FLAG + 0x19)
     4.7 +#define TRC_HVM_INTR_WINDOW     (TRC_HVM_HANDLER + 0X20)
     4.8  
     4.9  /* trace subclasses for power management */
    4.10  #define TRC_PM_FREQ     0x00801000      /* xen cpu freq events */