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: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] PCI MMIO?
From: "Stephen Donnelly" <sfdonnelly@xxxxxxxxx>
Date: Mon, 19 Mar 2007 11:04:44 +1300
Delivery-date: Sun, 18 Mar 2007 15:03:46 -0700
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=J3gfrsMwL2jnKxUUSQ9uXdDOHacBiE18tjAvazD3THhc11YoZT1OcnhXqdZIoLKWMWEWNN2Xfe6Y5Q66o/oueiziJqTv+8KKgPv3KdCrptqmCKphzacYqoIMhtvFrwKHqvb8fpPU2J6NmMeg6+o38I2jIwdxwycYADZgpZttmFU=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=JZNUEA30/KJS52URoqdHiplO1a6//E1shru98DuXmJiAKxSQtPh32eSmH1uqqcUt5umm1Vkdmjj+Uto7F1R1hCj1Dl0uymJ17t/mFxVT8IHH5CZpkS4DhiN3356voPhXHrLDCWYWqoeClmn3LKwik/KvsY8HJQ7WwTTnK4/7Z2w=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <907625E08839C4409CE5768403633E0B018E1AA9@xxxxxxxxxxxxxxxxx>
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>
References: <5f370d430703151340v2fd1353dsf625509e92ca44c0@xxxxxxxxxxxxxx> <907625E08839C4409CE5768403633E0B018E1AA9@xxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
On 3/16/07, Petersson, Mats <Mats.Petersson@xxxxxxx> wrote:
 

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


Thanks for the advice Mats, I may try posting to the devel list.

Yes access from the kernel does work, hence my confusion. It seems to be only the memory mapping to user space that is not working, yet this code works fine on non-xen kernels.

Stephen. 

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>