This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix event_pending() macro to match the assembly-language
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Nov 2005 16:02:13 +0000
Delivery-date: Thu, 17 Nov 2005 16:03:07 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix event_pending() macro to match the assembly-language, Xen patchbot -unstable <=