From: Quentin Garnier <qgarnier@eve-team.com>
To: xen-devel@lists.xensource.com
Subject: Synchronisation between a Linux dom0 and a hvm Windows guest
Date: Tue, 25 Jul 2006 14:10:30 +0200 [thread overview]
Message-ID: <20060725141030.1509aedb@vidal.eve> (raw)
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.
next reply other threads:[~2006-07-25 12:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-25 12:10 Quentin Garnier [this message]
2006-07-26 13:39 ` Synchronisation between a Linux dom0 and a hvm Windows guest Mike D. Day
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060725141030.1509aedb@vidal.eve \
--to=qgarnier@eve-team.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.