ia64/xen-unstable

changeset 14061:87f31a0db841

hvm: local_events_need_delivery() must take into account VLAPIC/PIC status.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Feb 21 19:12:16 2007 +0000 (2007-02-21)
parents 335a8280ab1d
children ad3ee81cc8c4
files xen/include/asm-x86/event.h
line diff
     1.1 --- a/xen/include/asm-x86/event.h	Wed Feb 21 18:54:48 2007 +0000
     1.2 +++ b/xen/include/asm-x86/event.h	Wed Feb 21 19:12:16 2007 +0000
     1.3 @@ -10,6 +10,7 @@
     1.4  #define __ASM_EVENT_H__
     1.5  
     1.6  #include <xen/shared.h>
     1.7 +#include <asm/hvm/irq.h> /* cpu_has_pending_irq() */
     1.8  
     1.9  static inline void vcpu_kick(struct vcpu *v)
    1.10  {
    1.11 @@ -37,9 +38,9 @@ static inline void vcpu_mark_events_pend
    1.12  static inline int local_events_need_delivery(void)
    1.13  {
    1.14      struct vcpu *v = current;
    1.15 -    /* Note: Bitwise operations result in fast code with no branches. */
    1.16 -    return (!!vcpu_info(v, evtchn_upcall_pending) &
    1.17 -             !vcpu_info(v, evtchn_upcall_mask));
    1.18 +    return ((vcpu_info(v, evtchn_upcall_pending) &&
    1.19 +             !vcpu_info(v, evtchn_upcall_mask)) ||
    1.20 +            (is_hvm_vcpu(v) && cpu_has_pending_irq(v)));
    1.21  }
    1.22  
    1.23  static inline int local_event_delivery_is_enabled(void)