|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] Contiguous DMAble memory in Dom0 user space linux proces
Hi Konard,
Please see response inline
--- On Wed, 1/13/10, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> wrote:
> From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> Subject: Re: [Xen-devel] Contiguous DMAble memory in Dom0 user space linux
> process
> To: "Kashmira. K." <chimnee@xxxxxxxxx>
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, winterfi@xxxxxxxxx
> Date: Wednesday, January 13, 2010, 1:31 PM
> On Wed, Jan 13, 2010 at 01:03:39PM
> -0800, Kashmira. K. wrote:
> > Hello Xen experts,
> >
> > I am trying to get contiguous DMAble memory in user
> space application which is a processes running on xen
> capable Linux.
>
> Why? Is the driver you are communicating with doing DMA of
> huge chunks of memory (bigger than 2MB?)
>
Actually I'm not trying to communicate with a driver. The user space
application is kind of a driver that lives outside of the kernel and
communicates with the device directly.
On a linux system (non xen) the bigphysarea patch was used to get large
contiguous DMA memory in user space.
I am trying to do the equivalant on Xen capable linux in Dom0 so the same
application will work. Kind of port it from 'linux' to 'Xen capable linux'.
> There surely must be another way to make your application
> do what it has
> to do than allocating such a large swath of memory.
>
>
> > Is it possible to use the
> HYPERVISOR_grant_table_op hypercall passing
> GMTTABOP_map_grant_ref as command to achieve this. If so, to
> use this hypercall the grant reference is required. How do I
> get the grant reference? Would appreciate if I can get
> an example code or pointer to one to clearly understand how
> to achieve this.
>
> Grant reference won't get you contiguous memory. It will
> get you memory
> shared between domains.
>
Yes I see now. I had confused the flags options GNTMAP_device_map to be DMAble
memory.
There is a HYPERVISOR_memory_op which can exchange memory for contiguous one.
But then this does not help me direcltly since a hypercall can only be used in
the kernel.
Thanks
Kashmira
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|