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@citrix.com>
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)