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

[win-pv-devel] [PATCH] Fix event channel unmasking for two-level ABI



The two-level ABI requires that an event is masked for the unmask
hypercall to raise the event, so the test-and-clear operation in the
guest basically means that pending events get stuck. The simple fix
is to re-mask pending events before making the hypercall. This is
unnecessary when the FIFO ABI is used, but it's safe. Hence this patch
unconditionally re-masks pending events, regardless of ABI, before
making the unmask hypercall.

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
 src/xenbus/evtchn.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/xenbus/evtchn.c b/src/xenbus/evtchn.c
index 63af079..3bb8d18 100644
--- a/src/xenbus/evtchn.c
+++ b/src/xenbus/evtchn.c
@@ -710,8 +710,16 @@ EvtchnUnmask(
 
     if (XENBUS_EVTCHN_ABI(PortUnmask,
                           &Context->EvtchnAbi,
-                          LocalPort))
+                          LocalPort)) {
+        //
+        // The event was pending so we must re-mask and use
+        // a hypercall to do the unmask and raise the event
+        //
+        XENBUS_EVTCHN_ABI(PortMask,
+                          &Context->EvtchnAbi,
+                          LocalPort);
         (VOID) EventChannelUnmask(LocalPort);
+    }
 
 done:
     if (!InUpcall)
-- 
2.1.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel


 


Rackspace

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