All of lore.kernel.org
 help / color / mirror / Atom feed
* Synchronisation between a Linux dom0 and a hvm Windows guest
@ 2006-07-25 12:10 Quentin Garnier
  2006-07-26 13:39 ` Mike D. Day
  0 siblings, 1 reply; 2+ messages in thread
From: Quentin Garnier @ 2006-07-25 12:10 UTC (permalink / raw)
  To: xen-devel

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-26 13:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-25 12:10 Synchronisation between a Linux dom0 and a hvm Windows guest Quentin Garnier
2006-07-26 13:39 ` Mike D. Day

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.