WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Contiguous DMAble memory in Dom0 user space linux proces

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] Contiguous DMAble memory in Dom0 user space linux process
From: "Kashmira. K." <chimnee@xxxxxxxxx>
Date: Thu, 14 Jan 2010 18:16:02 -0800 (PST)
Cc: winterfi@xxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 14 Jan 2010 18:16:29 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1263521762; bh=JjTgABOImQgDlqUn9K9iphRTWRtz6JJMxmtkzC1t+OQ=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=VG70921HIW/HGP4J8dYzkU2Y5jLjy6bVhCJorxh0n5TlCczawZeF+ILDgMygAPq+i3UctzpwZeH2hXKVXa0xiY0iLNAsxv/TzUOcVHnndWRUiWMLPT/qxiVjQbIzOTn0gzB9IPv/GM1l0aMJYlqGuHB1AA4aNVnaXbab/hbdU74=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=DcGkdbPqgWFovAQ2h9hZYwj6Mic+iL66Qf4W0tMB1YyGHbyisSyoOHcnFxVK1F5SLHmAx497CamgTDo10TJP9EKKSdrONtUWLeeToRhtR6mkEQfzXpQTc09819ehCV8OtOptKe2VBilolGNcxFCEmZ8DfgemyRDuPPuxTbEydME=;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100113213153.GA10553@xxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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