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: "Kashmira. K." <chimnee@xxxxxxxxx>
Subject: Re: [Xen-devel] Contiguous DMAble memory in Dom0 user space linux process
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Fri, 15 Jan 2010 11:59:17 -0500
Cc: winterfi@xxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 15 Jan 2010 09:01:42 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <494534.34716.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <20100113213153.GA10553@xxxxxxxxxxxxxxxxxxx> <494534.34716.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.19 (2009-01-05)
> 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. 

OK, but isn't the hardware visible via the PCI bus? Does it have any
PCI BARs defined?

> 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'.

Oh boy. I think you have two options:

1) Play with stubdomains. They are based on Mini-OS and
   allow you to create applications + MiniOS (that runs under Xen).
   An example of this is the QEMU stubdomain.

   You can modify your MiniOS to get you virtual addresses that are
   mapped directly to contingous memory areas.

2). Look at fbmem.c and write a device driver that allows the userspace
   application to mmap the driver (similar to fb_mem), which in turn sets
   up a vmalloc-ed area that is physically contigous (by using the
   xen_create_contiguous_region function to exchange PFNs).


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel