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: Wed, 20 Jan 2010 16:42:10 -0500
Cc: winterfi@xxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 20 Jan 2010 13:48:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <709670.16467.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> <20100115165917.GC11986@xxxxxxxxxxxxxxxxxxx> <709670.16467.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.19 (2009-01-05)
On Wed, Jan 20, 2010 at 01:10:24PM -0800, Kashmira. K. wrote:
> 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?

Sure. I would recommend you look at the 3w-xxxx.c driver for a simple
ioctl subsystem and how to get contiguous memory mapped in. For mmap 
functionality
hpet.c is pretty simple. Foremost, make sure you get a PDF copy of
"Understanding the Linux Kernel"  as that will answer a lot of your questions.

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