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] Userspace PIO access under xen

To: "Michael S. Tsirkin" <mst@xxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] Userspace PIO access under xen
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Mon, 25 Jul 2005 13:22:52 +0100
Cc: Dror Goldenberg <gdror@xxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 25 Jul 2005 12:21:25 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcWREbVqVOhnTgyfRoClwSOd61/5OgAAXQjQ
Thread-topic: [Xen-devel] Userspace PIO access under xen
 

> You can also use /proc/bus/pci/ for this, the difference is 
> that you have to give full bus address to /proc/bus/pci/ , 
> while /sys/bus/pci/devices/ needs an offset within the resource.
> 
> > Change pci_mmap_page_range in arch/xen/arch/pci/i386.c to use 
> > io_remap_pfn_range
> 
> I've written a small kernel module to map PIO to userspace 
> using remap_page_range, and that doesnt seem to work, either.

You have to use io_remap_pfn_range for mapping IO space. Using
remap_pfn_range is technically a bug in the i386 code.

I believe the pfn_range functions are preferred over page_range
functions anyhow.

Ian

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