[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Mapping shared pages from Windows

From: xen-devel-bounces@xxxxxxxxxxxxx [mailto:xen-devel-bounces@xxxxxxxxxxxxx] 
On Behalf Of Simon Martin
Sent: 25 October 2013 20:35
To: xen-devel@xxxxxxxxxxxxx
Subject: [Xen-devel] Mapping shared pages from Windows

Hi all,
I have been working on my little OS port and things seem to be going reasonably 
OK. I am writing it from the ground up using David Chisnall's book "The 
Definitive Guide to the Xen Hypervisor" and referring to the mini-os 
implementation. I find there are too many dependencies and additional bits in 
the mini-os code to just pull the bits out that I need. Maybe once I've got a 
better understanding I'll be able to go back and do something there.
My next channel is to talk to my little OS from a Windows HVM. As a start I 
have offered a shared page from my domain which I want to map in a little 
Windows app.
I have been looking for a Windows API to access Xen, but I haven't found 
anything. I took a quick look at the GPLPV drivers but that isÂquite a large 
set of files. Is there an easier starting point, and maybe even a little 

You can look at the XenServer PV drivers on GitHub. Xenbus would be the place 
to start (https://github.com/pauldu/win-xenbus) and look at the 'upstream' 
branch. There are several header files in the include subdir there which 
provide kernel APIs to Xen interfaces such as store, event channels, grant 
table, etc.
There is one user space API: a WMI provider for xenstore implemented by the 
xeniface driver (in the win-xeniface repo) but that's not going to be a huge 
amount of use to you.
I suspect what you'll need to do is add support for grant mapping into one of 
the sets of Windows PV drivers, probably by placing in the platform device's 
memory aperture, and then mapping that page out to user space. You'd also 
probably need an indefinitely blocking IOCTL or something that that will tell 
you when the user process dies though, otherwise you won't know when to do the 
grant unmap.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.