ia64/xen-unstable

changeset 10287:8c6ff337d164

Allow all trace-buffer hypercalls to be executed even when tracing is currently disabled.
From: George Dunlap
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Jun 01 21:34:47 2006 +0100 (2006-06-01)
parents 7f219d68e684
children 808430428622
files xen/common/trace.c
line diff
     1.1 --- a/xen/common/trace.c	Thu Jun 01 19:14:42 2006 +0100
     1.2 +++ b/xen/common/trace.c	Thu Jun 01 21:34:47 2006 +0100
     1.3 @@ -178,20 +178,12 @@ int tb_control(dom0_tbufcontrol_t *tbc)
     1.4  
     1.5      spin_lock(&lock);
     1.6  
     1.7 -    if ( !tb_init_done &&
     1.8 -         (tbc->op != DOM0_TBUF_SET_SIZE) &&
     1.9 -         (tbc->op != DOM0_TBUF_ENABLE) )
    1.10 -    {
    1.11 -        spin_unlock(&lock);
    1.12 -        return -EINVAL;
    1.13 -    }
    1.14 -
    1.15      switch ( tbc->op )
    1.16      {
    1.17      case DOM0_TBUF_GET_INFO:
    1.18          tbc->cpu_mask   = tb_cpu_mask;
    1.19          tbc->evt_mask   = tb_event_mask;
    1.20 -        tbc->buffer_mfn = __pa(t_bufs[0]) >> PAGE_SHIFT;
    1.21 +        tbc->buffer_mfn = opt_tbuf_size ? virt_to_mfn(t_bufs[0]) : 0UL;
    1.22          tbc->size       = opt_tbuf_size * PAGE_SIZE;
    1.23          break;
    1.24      case DOM0_TBUF_SET_CPU_MASK: