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

Re: [Xen-devel] PCI MMIO issue


  • To: "Stephen Donnelly" <sfdonnelly@xxxxxxxxx>
  • From: "Haw-Yuan Yang" <hawyuan@xxxxxxxxx>
  • Date: Mon, 19 Mar 2007 17:13:42 -0700
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 19 Mar 2007 17:12:42 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=J7QrJALjhFyyc2RI6ItIW7lcjPnPvnO/l2aKCWh4PpYXnvQ/9j5p2h0Pz0j8x+biNLkMl16U0hCWAW+pmpGfZa+fCJpO4pIep8eWmGPp08TeNF4gXKCWI7eNQQii7cf1wGT9t6E8IZgEu3IdrIBRGSXbMKXFoCA1Jjjmc/GozeY=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

I have the same issue. Keir help me to solve the problem. Use io_remap_pfn_range() in your mmap handler to map the mmio.
 
hyang

 
On 3/19/07, Stephen Donnelly <sfdonnelly@xxxxxxxxx > wrote:
I posted this to the xen-users list first, they suggested I ask here.

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 address space contains the registers for the device. My 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?

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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


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