ia64/xen-unstable

changeset 12726:bec95280b565

[XEN] Quieten down HVM debug output.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Dec 01 11:54:53 2006 +0000 (2006-12-01)
parents 36fe7ca48e54
children 5dae3263f85c f50380324d1c
files xen/arch/x86/hvm/vlapic.c xen/arch/x86/x86_emulate.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vlapic.c	Fri Dec 01 11:32:32 2006 +0000
     1.2 +++ b/xen/arch/x86/hvm/vlapic.c	Fri Dec 01 11:54:53 2006 +0000
     1.3 @@ -723,7 +723,7 @@ static void vlapic_write(struct vcpu *v,
     1.4          break;
     1.5  
     1.6      default:
     1.7 -        gdprintk(XENLOG_WARNING, 
     1.8 +        gdprintk(XENLOG_DEBUG,
     1.9                   "Local APIC Write to read-only register 0x%x\n", offset);
    1.10          break;
    1.11      }
     2.1 --- a/xen/arch/x86/x86_emulate.c	Fri Dec 01 11:32:32 2006 +0000
     2.2 +++ b/xen/arch/x86/x86_emulate.c	Fri Dec 01 11:54:53 2006 +0000
     2.3 @@ -7,16 +7,14 @@
     2.4   */
     2.5  
     2.6  #ifndef __XEN__
     2.7 -#include <stdio.h>
     2.8 +#include <stddef.h>
     2.9  #include <stdint.h>
    2.10  #include <public/xen.h>
    2.11 -#define dprintf(_f, _a...) printf( _f , ## _a )
    2.12  #else
    2.13  #include <xen/config.h>
    2.14  #include <xen/types.h>
    2.15  #include <xen/lib.h>
    2.16  #include <asm/regs.h>
    2.17 -#define dprintf(_f, _a...) gdprintk(XENLOG_WARNING, _f , ## _a )
    2.18  #undef cmpxchg
    2.19  #endif
    2.20  #include <asm-x86/x86_emulate.h>
    2.21 @@ -440,27 +438,6 @@ decode_register(
    2.22      return p;
    2.23  }
    2.24  
    2.25 -static void
    2.26 -dump_instr(
    2.27 -    struct x86_emulate_ctxt *ctxt,
    2.28 -    struct x86_emulate_ops  *ops)
    2.29 -{
    2.30 -#ifdef __XEN__
    2.31 -    int i;
    2.32 -    unsigned long x, eip = ctxt->regs->eip;
    2.33 -
    2.34 -    dprintf("Instr:");
    2.35 -    for ( i = 0; i < 16; i++, eip++ )
    2.36 -    {
    2.37 -        if ( ops->read(x86_seg_cs, eip, &x, 1, ctxt) != 0 )
    2.38 -            printk(" ??");
    2.39 -        else
    2.40 -            printk(" %02x", (uint8_t)x);
    2.41 -    }
    2.42 -    printk("\n");
    2.43 -#endif
    2.44 -}
    2.45 -
    2.46  int
    2.47  x86_emulate_memop(
    2.48      struct x86_emulate_ctxt *ctxt,
    2.49 @@ -579,10 +556,7 @@ x86_emulate_memop(
    2.50          modrm_rm  = modrm & 0x07;
    2.51  
    2.52          if ( modrm_mod == 3 )
    2.53 -        {
    2.54 -            dprintf("Cannot parse ModRM.mod == 3.\n");
    2.55              goto cannot_emulate;
    2.56 -        }
    2.57  
    2.58          if ( ad_bytes == 2 )
    2.59          {
    2.60 @@ -1206,7 +1180,15 @@ x86_emulate_memop(
    2.61      goto writeback;
    2.62  
    2.63   cannot_emulate:
    2.64 -    dprintf("Cannot emulate %02x\n", b);
    2.65 -    dump_instr(ctxt, ops);
    2.66 +#ifdef __XEN__
    2.67 +    gdprintk(XENLOG_DEBUG, "Instr:");
    2.68 +    for ( ea_off = ctxt->regs->eip; ea_off < _regs.eip; ea_off++ )
    2.69 +    {
    2.70 +        unsigned long x;
    2.71 +        ops->read(x86_seg_cs, ea_off, &x, 1, ctxt);
    2.72 +        printk(" %02x", (uint8_t)x);
    2.73 +    }
    2.74 +    printk("\n");
    2.75 +#endif
    2.76      return -1;
    2.77  }