[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Fix event_pending() macro to match the assembly-language



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 1a1c0f9b242edc6d614500c929f11d8ef47e553c
# Parent  c640c0c7f821a202fecda775811184d1cf851cbe
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@xxxxxxxxxxxxx>

diff -r c640c0c7f821 -r 1a1c0f9b242e xen/include/xen/event.h
--- a/xen/include/xen/event.h   Thu Nov 17 11:52:42 2005
+++ b/xen/include/xen/event.h   Thu Nov 17 12:02:19 2005
@@ -60,7 +60,7 @@
 
 /* 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__ */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.