From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: Contiguous DMAble memory in Dom0 user space linux process Date: Wed, 13 Jan 2010 16:31:53 -0500 Message-ID: <20100113213153.GA10553@phenom.dumpdata.com> References: <305007.64514.qm@web50604.mail.re2.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Resent-Message-ID: <20100114230818.GB17356@phenom.dumpdata.com> Resent-To: xen-devel@lists.xensource.com, winterfi@cisco.com, chimnee@yahoo.com Content-Disposition: inline In-Reply-To: <305007.64514.qm@web50604.mail.re2.yahoo.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: "Kashmira. K." Cc: winterfi@cisco.com, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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?) 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.