From: "Kashmira. K." Subject: Re: Contiguous DMAble memory in Dom0 user space linux process Date: Thu, 14 Jan 2010 18:16:02 -0800 (PST) Message-ID: <494534.34716.qm@web50606.mail.re2.yahoo.com> References: <20100113213153.GA10553@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20100113213153.GA10553@phenom.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Konrad Rzeszutek Wilk Cc: winterfi@cisco.com, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hi Konard, Please see response inline --- On Wed, 1/13/10, Konrad Rzeszutek Wilk wrote: > From: Konrad Rzeszutek Wilk > Subject: Re: [Xen-devel] Contiguous DMAble memory in Dom0 user space linu= x process > To: "Kashmira. K." > Cc: xen-devel@lists.xensource.com, winterfi@cisco.com > Date: Wednesday, January 13, 2010, 1:31 PM > On Wed, Jan 13, 2010 at 01:03:39PM > -0800, Kashmira. K. wrote: > > Hello Xen experts, > >=20 > > I am trying to get contiguous DMAble memory in user > space application which is a processes running on xen > capable Linux. >=20 > Why? Is the driver you are communicating with doing DMA of > huge chunks of memory (bigger than 2MB?) >=20 Actually I'm not trying to communicate with a driver. The user space applic= ation is kind of a driver that lives outside of the kernel and communicates= with the device directly.=20 On a linux system (non xen) the bigphysarea patch was used to get large con= tiguous DMA memory in user space.=20 I am trying to do the equivalant on Xen capable linux in Dom0 so the same a= pplication 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. >=20 >=20 > > Is it possible to use the=A0 > 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?=A0 Would appreciate if I can get > an example code or pointer to one to clearly understand how > to achieve this. >=20 > Grant reference won't get you contiguous memory. It will > get you memory > shared between domains. >=20 Yes I see now. I had confused the flags options GNTMAP_device_map to be DMA= ble memory. There is a HYPERVISOR_memory_op which can exchange memory for contiguous on= e. But then this does not help me direcltly since a hypercall can only be u= sed in the kernel. Thanks Kashmira=20 > =0A=0A=0A