[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
  • From: "Kashmira. K." <chimnee@xxxxxxxxx>
  • Date: Wed, 20 Jan 2010 13:10:24 -0800 (PST)
  • Cc: winterfi@xxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 20 Jan 2010 13:12:10 -0800
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=5q7P3f+w5PwRwIn1wwe3xM7w5+hLwvLkQ15WcH6yEYILehjjMyYKFpgl4qSsRSv6j0t+eMmsYtmqvVXFZb9V135e/ppAVFAWS2Hr2H67lXZWBlAu5SS6wtrqfjFXMRjExtzScWSoCsMvWaYB0k0+kgT44nyttUZLFLlh+mYHtrQ=;
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Hi Konard,

Thanks you for your reply. 

On the (non xen) linux system, the hardware was visible to the userspace app. 
The PCI bars were mapped. So I do need to get the same functionality on xen 
capable linux.

I'm still a newbie to the xen internals, but I was wondering if I could write a 
simple linux kernel driver for a xen capable linux to do the following
- Map the PCI address (BAR). 
- Get contiguous memory.
- Provide user space ioctl call to get the mapped PCI BAR
- Provide user space ioctl to get pointer to the contiguous memory.

Will that work?

Thanks
Kashmira
----- Original Message ----

From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
To: Kashmira. K. <chimnee@xxxxxxxxx>
Cc: winterfi@xxxxxxxxx; xen-devel@xxxxxxxxxxxxxxxxxxx
Sent: Fri, January 15, 2010 8:59:17 AM
Subject: Re: [Xen-devel] Contiguous DMAble memory in Dom0 user space linux 
process

> 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.