WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Synchronisation between a Linux dom0 and a hvm Windows guest

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Synchronisation between a Linux dom0 and a hvm Windows guest
From: Quentin Garnier <qgarnier@xxxxxxxxxxxx>
Date: Tue, 25 Jul 2006 14:10:30 +0200
Delivery-date: Tue, 25 Jul 2006 05:11:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: EVE
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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>