* Re: Mapping Data between Dom0 and DomU
[not found] <B4DC7AAB07005D4DA887F0BE517884F2A23DD4@mailbox02.onlive.corp>
@ 2015-01-08 2:01 ` Andrew Cooper
2015-01-08 8:59 ` Ian Campbell
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2015-01-08 2:01 UTC (permalink / raw)
To: Christian Refvik, xen-devel@lists.xenproject.org,
win-pv-devel@lists.xenproject.org
On 08/01/2015 01:22, Christian Refvik wrote:
> Hello,
>
> My name is Christian and I am new to Xen development, and I've been struggling a bit. I'm trying to develop a device driver so that a Windows 2012 Server VM has a way to send about 10MB of data to a CentOS VM. There is no real device on the backend, I just need a way to constantly send a large buffer between DomU and Dom0 using a zero copy solution.
>
> I wrote a Linux device driver (simple char device) in Dom0 which allocates the memory and reserves the pages. However, I'm not sure how to offer these pages to the Windows VM. I also have a Windows device driver that I've installed in the Windows VM, but again I'm not sure how to connect the two drivers.
>
> I've been browsing the QEMU source code, the Windows PV source code, the Xen source code, and the "Definitive Guide to the Xen Hypervisor" for answers. Unfortunately, I am a bit lost. I'm hoping someone with some experience with shared data communication between Dom0 and DomU can point me at some source files to study in order to figure out how to implement what I'm trying to do. A tutorial, sample code, and/or general direction would be great.
>
> Thanks for your help,
> Christian
You will want to use grants, and in particular grant mappings, which is
the Xen interface for creating shared memory between VMs.
The basic premise is that domain A nominates some of its pages to be
grantable. Domain A gives the grant references to domain B (usually
negotiated via xenstore), which allows domain B to make a mapping of
domain A's nominated pages.
A relevant bit of code to look at would be tools/libvchan/ , which as
far as I am aware does pretty much what you describe (but without the
windows support).
~Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Mapping Data between Dom0 and DomU
2015-01-08 2:01 ` Mapping Data between Dom0 and DomU Andrew Cooper
@ 2015-01-08 8:59 ` Ian Campbell
2015-01-08 10:20 ` Paul Durrant
[not found] ` <9AAE0902D5BC7E449B7C8E4E778ABCD0257B4EDC@AMSPEX01CL01.citrite.net>
0 siblings, 2 replies; 5+ messages in thread
From: Ian Campbell @ 2015-01-08 8:59 UTC (permalink / raw)
To: Andrew Cooper
Cc: xen-devel@lists.xenproject.org, win-pv-devel@lists.xenproject.org,
Christian Refvik
On Thu, 2015-01-08 at 02:01 +0000, Andrew Cooper wrote:
> A relevant bit of code to look at would be tools/libvchan/ , which as
> far as I am aware does pretty much what you describe (but without the
> windows support).
Adding a libvchan front and/or backend driver to the Windows PV drivers
would be a very useful contribution to the project IMHO.
Ian.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Mapping Data between Dom0 and DomU
2015-01-08 8:59 ` Ian Campbell
@ 2015-01-08 10:20 ` Paul Durrant
[not found] ` <9AAE0902D5BC7E449B7C8E4E778ABCD0257B4EDC@AMSPEX01CL01.citrite.net>
1 sibling, 0 replies; 5+ messages in thread
From: Paul Durrant @ 2015-01-08 10:20 UTC (permalink / raw)
To: Christian Refvik
Cc: xen-devel@lists.xenproject.org, win-pv-devel@lists.xenproject.org,
Ian Campbell, Andrew Cooper
> -----Original Message-----
> From: xen-devel-bounces@lists.xen.org [mailto:xen-devel-
> bounces@lists.xen.org] On Behalf Of Ian Campbell
> Sent: 08 January 2015 08:59
> To: Andrew Cooper
> Cc: xen-devel@lists.xenproject.org; win-pv-devel@lists.xenproject.org;
> Christian Refvik
> Subject: Re: [Xen-devel] Mapping Data between Dom0 and DomU
>
> On Thu, 2015-01-08 at 02:01 +0000, Andrew Cooper wrote:
> > A relevant bit of code to look at would be tools/libvchan/ , which as
> > far as I am aware does pretty much what you describe (but without the
> > windows support).
>
> Adding a libvchan front and/or backend driver to the Windows PV drivers
> would be a very useful contribution to the project IMHO.
>
A big +1 from me. If you need any assistance then please join the win-pv-devel mailing list and we can give you some pointers. There are already Windows kernel PV interfaces for many Xen features.
Cheers,
Paul
> Ian.
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread[parent not found: <9AAE0902D5BC7E449B7C8E4E778ABCD0257B4EDC@AMSPEX01CL01.citrite.net>]
* Re: Mapping Data between Dom0 and DomU
[not found] ` <9AAE0902D5BC7E449B7C8E4E778ABCD0257B4EDC@AMSPEX01CL01.citrite.net>
@ 2015-01-08 19:26 ` Christian Refvik
0 siblings, 0 replies; 5+ messages in thread
From: Christian Refvik @ 2015-01-08 19:26 UTC (permalink / raw)
To: Paul Durrant
Cc: xen-devel@lists.xenproject.org, win-pv-devel@lists.xenproject.org,
Ian Campbell, Andrew Cooper
Andrew, Ian, and Paul - thanks so much for the help. I need to study the code and I'll try to get a channel going between two Linux VMs. Latency and performance are critical (~500 MB/s), so I'll probably have more questions about best practices for large data buffers. However, once I have a working solution for Linux, I'll work with Paul (and the Windows PV developers) to use the current Windows PV interfaces to generate a solution between Windows Server 2012 and Linux.
Thanks for the help,
Christian
-----Original Message-----
From: Paul Durrant [mailto:Paul.Durrant@citrix.com]
Sent: Thursday, January 8, 2015 2:21 AM
To: Christian Refvik
Cc: xen-devel@lists.xenproject.org; win-pv-devel@lists.xenproject.org; Andrew Cooper; Ian Campbell
Subject: RE: [Xen-devel] Mapping Data between Dom0 and DomU
> -----Original Message-----
> From: xen-devel-bounces@lists.xen.org [mailto:xen-devel-
> bounces@lists.xen.org] On Behalf Of Ian Campbell
> Sent: 08 January 2015 08:59
> To: Andrew Cooper
> Cc: xen-devel@lists.xenproject.org; win-pv-devel@lists.xenproject.org;
> Christian Refvik
> Subject: Re: [Xen-devel] Mapping Data between Dom0 and DomU
>
> On Thu, 2015-01-08 at 02:01 +0000, Andrew Cooper wrote:
> > A relevant bit of code to look at would be tools/libvchan/ , which
> > as far as I am aware does pretty much what you describe (but without
> > the windows support).
>
> Adding a libvchan front and/or backend driver to the Windows PV
> drivers would be a very useful contribution to the project IMHO.
>
A big +1 from me. If you need any assistance then please join the win-pv-devel mailing list and we can give you some pointers. There are already Windows kernel PV interfaces for many Xen features.
Cheers,
Paul
> Ian.
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Mapping Data between Dom0 and DomU
@ 2015-01-08 1:22 Christian Refvik
0 siblings, 0 replies; 5+ messages in thread
From: Christian Refvik @ 2015-01-08 1:22 UTC (permalink / raw)
To: xen-devel@lists.xenproject.org, win-pv-devel@lists.xenproject.org
Hello,
My name is Christian and I am new to Xen development, and I've been struggling a bit. I'm trying to develop a device driver so that a Windows 2012 Server VM has a way to send about 10MB of data to a CentOS VM. There is no real device on the backend, I just need a way to constantly send a large buffer between DomU and Dom0 using a zero copy solution.
I wrote a Linux device driver (simple char device) in Dom0 which allocates the memory and reserves the pages. However, I'm not sure how to offer these pages to the Windows VM. I also have a Windows device driver that I've installed in the Windows VM, but again I'm not sure how to connect the two drivers.
I've been browsing the QEMU source code, the Windows PV source code, the Xen source code, and the "Definitive Guide to the Xen Hypervisor" for answers. Unfortunately, I am a bit lost. I'm hoping someone with some experience with shared data communication between Dom0 and DomU can point me at some source files to study in order to figure out how to implement what I'm trying to do. A tutorial, sample code, and/or general direction would be great.
Thanks for your help,
Christian
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-08 19:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <B4DC7AAB07005D4DA887F0BE517884F2A23DD4@mailbox02.onlive.corp>
2015-01-08 2:01 ` Mapping Data between Dom0 and DomU Andrew Cooper
2015-01-08 8:59 ` Ian Campbell
2015-01-08 10:20 ` Paul Durrant
[not found] ` <9AAE0902D5BC7E449B7C8E4E778ABCD0257B4EDC@AMSPEX01CL01.citrite.net>
2015-01-08 19:26 ` Christian Refvik
2015-01-08 1:22 Christian Refvik
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.