direct-io.hg

changeset 4639:31a334290f9c

bitkeeper revision 1.1369 (426927a5No_sHhV62q0TEbxYu-jcHA)

Hypercall preemption check also looks for pending event upcalls to
guest kernel.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Apr 22 16:34:45 2005 +0000 (2005-04-22)
parents 7c4ca91ec3ce
children 3b8b51c4560c
files xen/include/xen/sched.h
line diff
     1.1 --- a/xen/include/xen/sched.h	Fri Apr 22 16:34:08 2005 +0000
     1.2 +++ b/xen/include/xen/sched.h	Fri Apr 22 16:34:45 2005 +0000
     1.3 @@ -301,8 +301,11 @@ unsigned long __hypercall_create_continu
     1.4          (unsigned long)(_a1), (unsigned long)(_a2), (unsigned long)(_a3), \
     1.5          (unsigned long)(_a4), (unsigned long)(_a5), (unsigned long)(_a6))
     1.6  
     1.7 -#define hypercall_preempt_check() \
     1.8 -    (unlikely(softirq_pending(smp_processor_id())))
     1.9 +#define hypercall_preempt_check() (unlikely(            \
    1.10 +        softirq_pending(smp_processor_id()) |           \
    1.11 +        (!!current->vcpu_info->evtchn_upcall_pending &  \
    1.12 +          !current->vcpu_info->evtchn_upcall_mask)      \
    1.13 +    ))
    1.14  
    1.15  /* This domain_hash and domain_list are protected by the domlist_lock. */
    1.16  #define DOMAIN_HASH_SIZE 256
    1.17 @@ -310,11 +313,13 @@ unsigned long __hypercall_create_continu
    1.18  extern struct domain *domain_hash[DOMAIN_HASH_SIZE];
    1.19  extern struct domain *domain_list;
    1.20  
    1.21 -#define for_each_domain(_p) \
    1.22 - for ( (_p) = domain_list; (_p) != NULL; (_p) = (_p)->next_list )
    1.23 +#define for_each_domain(_d) \
    1.24 + for ( (_d) = domain_list; (_d) != NULL; (_d) = (_d)->next_list )
    1.25  
    1.26  #define for_each_exec_domain(_d,_ed) \
    1.27 - for ( (_ed) = _d->exec_domain[0]; (_ed) != NULL; (_ed) = (_ed)->ed_next_list )
    1.28 + for ( (_ed) = (_d)->exec_domain[0]; \
    1.29 +       (_ed) != NULL;                \
    1.30 +       (_ed) = (_ed)->ed_next_list )
    1.31  
    1.32  #define EDF_DONEFPUINIT  0 /* Has the FPU been initialised for this task?    */
    1.33  #define EDF_USEDFPU      1 /* Has this task used the FPU since last save?    */