ia64/xen-unstable

changeset 8582:411e66a837a1

More debug print cleanups.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Jan 12 15:59:45 2006 +0100 (2006-01-12)
parents 4520b451a70e
children 9368d2ba43f2
files xen/arch/x86/mm.c xen/arch/x86/traps.c
line diff
     1.1 --- a/xen/arch/x86/mm.c	Thu Jan 12 15:44:44 2006 +0100
     1.2 +++ b/xen/arch/x86/mm.c	Thu Jan 12 15:59:45 2006 +0100
     1.3 @@ -3017,7 +3017,7 @@ void ptwr_flush(struct domain *d, const 
     1.4      /* NB. INVLPG is a serialising instruction: flushes pending updates. */
     1.5      flush_tlb_one_mask(d->domain_dirty_cpumask, l1va);
     1.6      PTWR_PRINTK("[%c] disconnected_l1va at %p now %"PRIpte"\n",
     1.7 -                PTWR_PRINT_WHICH, ptep, trawl l1e_get_intpte(pte));
     1.8 +                PTWR_PRINT_WHICH, ptep, l1e_get_intpte(pte));
     1.9  
    1.10      /*
    1.11       * STEP 2. Validate any modified PTEs.
     2.1 --- a/xen/arch/x86/traps.c	Thu Jan 12 15:44:44 2006 +0100
     2.2 +++ b/xen/arch/x86/traps.c	Thu Jan 12 15:59:45 2006 +0100
     2.3 @@ -963,16 +963,26 @@ static int emulate_privileged_op(struct 
     2.4      case 0x30: /* WRMSR */
     2.5          /* Ignore the instruction if unprivileged. */
     2.6          if ( !IS_PRIV(v->domain) )
     2.7 -            DPRINTK("Non-priv domain attempted WRMSR(%p,%08lx,%08lx).\n",
     2.8 -                    _p(regs->ecx), (long)regs->eax, (long)regs->edx);
     2.9 +        {
    2.10 +            u32 l, h;
    2.11 +            if ( (regs->ecx != MSR_EFER) ||
    2.12 +                 (rdmsr_user(regs->ecx, l, h) != 0) ||
    2.13 +                 (regs->eax != l) || (regs->edx != h) )
    2.14 +                DPRINTK("Non-priv domain attempted WRMSR %p from "
    2.15 +                        "%08x:%08x to %08lx:%08lx.\n",
    2.16 +                        _p(regs->ecx), h, l, (long)regs->edx, (long)regs->eax);
    2.17 +        }
    2.18          else if ( wrmsr_user(regs->ecx, regs->eax, regs->edx) )
    2.19              goto fail;
    2.20          break;
    2.21  
    2.22      case 0x32: /* RDMSR */
    2.23          if ( !IS_PRIV(v->domain) )
    2.24 -            DPRINTK("Non-priv domain attempted RDMSR(%p,%08lx,%08lx).\n",
    2.25 -                    _p(regs->ecx), (long)regs->eax, (long)regs->edx);
    2.26 +        {
    2.27 +            if ( regs->ecx != MSR_EFER )
    2.28 +                DPRINTK("Non-priv domain attempted RDMSR %p.\n",
    2.29 +                        _p(regs->ecx));
    2.30 +        }
    2.31          /* Everyone can read the MSR space. */
    2.32          if ( rdmsr_user(regs->ecx, regs->eax, regs->edx) )
    2.33              goto fail;