ia64/xen-unstable

changeset 9114:29f8c87bd8fd

Add a 'clear trap table' path to set_trap_table hypercall, taken when
the input table is NULL.

Also, no need for set_trap_table to take the per-domain biglock.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Mar 03 10:34:03 2006 +0100 (2006-03-03)
parents af04fef70bad
children 46a6d9626911
files xen/arch/x86/traps.c
line diff
     1.1 --- a/xen/arch/x86/traps.c	Thu Mar 02 21:37:14 2006 +0100
     1.2 +++ b/xen/arch/x86/traps.c	Fri Mar 03 10:34:03 2006 +0100
     1.3 @@ -1410,7 +1410,13 @@ long do_set_trap_table(struct trap_info 
     1.4      struct trap_info *dst = current->arch.guest_context.trap_ctxt;
     1.5      long rc = 0;
     1.6  
     1.7 -    LOCK_BIGLOCK(current->domain);
     1.8 +    /* If no table is presented then clear the entire virtual IDT. */
     1.9 +    if ( traps == NULL )
    1.10 +    {
    1.11 +        memset(dst, 0, 256 * sizeof(*dst));
    1.12 +        init_int80_direct_trap(current);
    1.13 +        return 0;
    1.14 +    }
    1.15  
    1.16      for ( ; ; )
    1.17      {
    1.18 @@ -1440,8 +1446,6 @@ long do_set_trap_table(struct trap_info 
    1.19          traps++;
    1.20      }
    1.21  
    1.22 -    UNLOCK_BIGLOCK(current->domain);
    1.23 -
    1.24      return rc;
    1.25  }
    1.26