|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Synchronisation between a Linux dom0 and a hvm Windows guest
Hi,
I'm trying to find a way to exchange data between a linux domain and a
windows domain with the minimum latency. The linux domain happens to be
dom0; ultimately the data is sent/received from a PCI card.
After a very naive approach extending qemu's hardware list with a PCI
card and a device memory area, I had to try other ways, because the
latency is very high. On the other hand, synchronisation is very easy.
I've now tried actually sharing memory between a Windows userland
application and a Linux userland application (the latter using
libxenctrl).
On the Windows side, I wrote a very simple driver that allocates a few
pages of pseudo-physically contiguous memory, supposedly not cached.
The userland app uses an ioctl to map that memory.
On the Linux side, I have an app that calls
xc_domain_translate_gpfn_list and xc_map_foreign_batch to map that
memory (right now I hard-code the pseudo-physical address I get in
Windows, but of course another mean of transmitting that information
will be used in the future).
While doing this mostly works, I now have the issue of synchronising the
two domains. I use busy-waiting, but without actually atomic operations
it is a bit dangerous and moreover, at least the Linux application
doesn't always see updates made by the Windows application, which leads
to errors.
So right now I'm looking for idea to synchronise the two domains that
wouldn't cost me too much in terms of latency. Getting rid of the
caching issue that seems to be part of the problem would be a start, but
I really lack ideas and I don't really know where to hack to do that in
Linux. A better way would of course to use Xen to have the relevant
pages explicitely set dirty before reading them in Linux, and something
mostly equivalent in Windows.
Anyone can point to something to start with?
Quentin Garnier.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] Synchronisation between a Linux dom0 and a hvm Windows guest,
Quentin Garnier <=
|
|
|
|
|