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-users

RE: [Xen-users] PCI MMIO?

To: "Stephen Donnelly" <sfdonnelly@xxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-users] PCI MMIO?
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Fri, 16 Mar 2007 09:47:02 +0100
Delivery-date: Fri, 16 Mar 2007 01:46:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <5f370d430703151340v2fd1353dsf625509e92ca44c0@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcdnQlNOp7JNRElYRSSdu/k75rTopgAZQQIg
Thread-topic: [Xen-users] PCI MMIO?
 

> -----Original Message-----
> From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Stephen Donnelly
> Sent: 15 March 2007 20:41
> To: xen-users@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-users] PCI MMIO?
> 
> Not sure if this should go to users or devel, but I'll try here first.
> 
> I understood that in a Driver Domain that has access to a 
> (PCI) device, 'native' drivers can be used, but I am having 
> some problems with memory mapped IO from user space. 
> 
> I have a PCI device that has a 64kB mmio range at PCI_BAR_0. 
> This space contains the registers for the device. The Linux 
> driver provides a char device that allows read/write/seek, 
> and mmap for this space. In Linux you can use either 
> read/write/seek to access the space, or memory map it via 
> mmap and access it directly. When using the driver in dom0 
> under Xen 3.0.4, the read/write/seek method works fine but 
> the mmap does not. None of the related functions return 
> errors, but the mmap does not appear to access the correct 
> memory. Is there anything I am missing?

It realy shouldn't make any difference. It's probably a question for Xen
Devel tho'. 

If you can access the device from kernel mode (have you tried that?)
then you should be able to access it from user-mode, I would have
thought. 

The linux kernel is actually responsible for mapping the memory itself,
and aside from checking some permissions, there is no difference to the
hypervisor whether a domain is DomU or Dom0. 

--
Mats
> 
> The mmap is performed by a remap_pfn_range() by the driver, 
> and mmap() in the user space code. 
> 
> I am running Ubuntu 6.10 AMD64 Server and I built Xen 3.0.4 
> from source, including the 2.6.16.33-xen kernel. The driver 
> is running in dom0, no other domains are present.
> 
> Thanks,
> Stephen.
> 
> 
> 



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

<Prev in Thread] Current Thread [Next in Thread>