diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-11-17 13:02:19 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-11-17 13:02:19 +0100 |
commit | d2a085d07ca19392412bb02c06c3c532c31ed8b4 (patch) | |
tree | fdce0ec5e3bbbd26bea03ea016f5788894914657 /xen/include/xen/event.h | |
parent | c65d6353512ae6f1671723502b710c290a6be745 (diff) | |
download | xen-d2a085d07ca19392412bb02c06c3c532c31ed8b4.tar.gz xen-d2a085d07ca19392412bb02c06c3c532c31ed8b4.tar.bz2 xen-d2a085d07ca19392412bb02c06c3c532c31ed8b4.zip |
Fix event_pending() macro to match the assembly-language
checks in entry.S. This will avoid a hard-to-debug loop
that we found ourselves in recently, involving
hypercall_preempt_check() spuriously returning TRUE, but
no event getting propagated to the guest (since mask != 0).
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/include/xen/event.h')
-rw-r--r-- | xen/include/xen/event.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h index e8a8bc2b5b..a8632eaf09 100644 --- a/xen/include/xen/event.h +++ b/xen/include/xen/event.h @@ -60,7 +60,7 @@ extern void send_guest_pirq(struct domain *d, int pirq); /* Note: Bitwise operations result in fast code with no branches. */ #define event_pending(v) \ - ((v)->vcpu_info->evtchn_upcall_pending & \ - ~(v)->vcpu_info->evtchn_upcall_mask) + (!!(v)->vcpu_info->evtchn_upcall_pending & \ + !(v)->vcpu_info->evtchn_upcall_mask) #endif /* __XEN_EVENT_H__ */ |