ia64/xen-unstable

changeset 3105:f7a9de9a462f

bitkeeper revision 1.1159.189.6 (41a4df56fjKgjR75gUVniMEBSnS-9Q)

Unlock biglock on hypercall preemption.
author cl349@arcadians.cl.cam.ac.uk
date Wed Nov 24 19:21:58 2004 +0000 (2004-11-24)
parents ef30f8537436
children 75f82adfcc90
files xen/arch/x86/memory.c xen/arch/x86/traps.c xen/include/xen/sched.h
line diff
     1.1 --- a/xen/arch/x86/memory.c	Wed Nov 24 19:21:39 2004 +0000
     1.2 +++ b/xen/arch/x86/memory.c	Wed Nov 24 19:21:58 2004 +0000
     1.3 @@ -1307,7 +1307,7 @@ int do_mmu_update(mmu_update_t *ureqs, i
     1.4  
     1.5      for ( i = 0; i < count; i++ )
     1.6      {
     1.7 -        hypercall_may_preempt(
     1.8 +        locked_hypercall_may_preempt(d,
     1.9              __HYPERVISOR_mmu_update, 3, ureqs, count-i, success_count);
    1.10  
    1.11          if ( unlikely(__copy_from_user(&req, ureqs, sizeof(req)) != 0) )
     2.1 --- a/xen/arch/x86/traps.c	Wed Nov 24 19:21:39 2004 +0000
     2.2 +++ b/xen/arch/x86/traps.c	Wed Nov 24 19:21:58 2004 +0000
     2.3 @@ -814,7 +814,8 @@ long do_set_trap_table(trap_info_t *trap
     2.4  
     2.5      for ( ; ; )
     2.6      {
     2.7 -        hypercall_may_preempt(__HYPERVISOR_set_trap_table, 1, traps);
     2.8 +        locked_hypercall_may_preempt(current->domain,
     2.9 +                                     __HYPERVISOR_set_trap_table, 1, traps);
    2.10  
    2.11          if ( copy_from_user(&cur, traps, sizeof(cur)) ) return -EFAULT;
    2.12  
     3.1 --- a/xen/include/xen/sched.h	Wed Nov 24 19:21:39 2004 +0000
     3.2 +++ b/xen/include/xen/sched.h	Wed Nov 24 19:21:58 2004 +0000
     3.3 @@ -263,6 +263,13 @@ void hypercall_create_continuation(unsig
     3.4              hypercall_create_continuation(_op , _nr_args , ##_args); \
     3.5              return _op;                                              \
     3.6      } } while ( 0 )
     3.7 +#define locked_hypercall_may_preempt(_d, _op, _nr_args, _args...)    \
     3.8 +    do {                                                             \
     3.9 +        if ( unlikely(softirq_pending(smp_processor_id())) ) {       \
    3.10 +            hypercall_create_continuation(_op , _nr_args , ##_args); \
    3.11 +            UNLOCK_BIGLOCK(_d);                                      \
    3.12 +            return _op;                                              \
    3.13 +    } } while ( 0 )
    3.14  
    3.15  /* This domain_hash and domain_list are protected by the domlist_lock. */
    3.16  #define DOMAIN_HASH_SIZE 256