Commit Graph

9 Commits

Author SHA1 Message Date
Marek Marczykowski
cb5479666c win/vchan: reset the evtchn buffer in case of overflow
In case of evtchn buffer overflow (received more than 1024 events between
libvchan_wait calls) further reads returns ERROR_IO_DEVICE. The only way to
recover from that is to reset the buffer. Because vchan code doesn't take care
of number of fired events - only the fact that some event was fired - lost
events here shouldn't break anything. Events reported _after_ libvchan_wait
call will be collected and reported correctly.

Some more comments in the code (here and in qrexec-agent in the next commit).
2012-09-16 23:32:56 +02:00
Marek Marczykowski
ab52153ab2 win/vchan: remove outstanding evtchn events on libvchan_wait
Windows evtchn driver can double fire on one event (details in
xenpci/evtchn_device_interface.c:EvtChn_EvtIoWrite). Less intrusive way of
fixing it is just remove all events from queue on libvchan_wait (to prevent
queue fill).
This won't hurt because we are interested in events only sent
after xc_evtchn_unmask call which is one line below.
2012-08-23 21:39:41 +02:00
Marek Marczykowski
4fcaf3e7b7 Revert "win: unmask evtchn before checking if libvchan_wait is needed"
This reverts commit f7ce10db8f76f752cf9d65b420de352e70bdb048.
This should be fixed by doing 0-length reads in qrexec main loop (instead of
real read of fired port number).
2012-08-23 01:58:44 +02:00
Marek Marczykowski
ec47c5eb81 win: unmask evtchn before checking if libvchan_wait is needed
This should prevent the race, when evtchn is signalled between condition check
and libvchan_wait call.
2012-08-03 02:02:26 +02:00
Alexander Tereshkin
db324b270e libvchan_server_init() now does not wait for a client to connect. A server should wait for an incoming event and then call libvchan_server_handle_connected(). 2012-05-29 17:07:17 +04:00
Alexander Tereshkin
7ea3f4a792 vchan modifications for the Windows build. 2012-05-12 19:27:09 +04:00
Marek Marczykowski
0c811322c5 dom0: vchan version for stubdom 2012-02-22 17:54:58 +01:00
Marek Marczykowski
3f310e5f3e Adopt vchan to xen-libs-4.1.0 API.
Add #ifdefs to support new and old API
2011-04-19 01:21:48 +02:00
Rafal Wojtczuk
f263aa6b7c Moved vchan and u2mfn code to core. 2011-03-08 12:24:47 +01:00