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

Re: [Xen-devel] Userspace PIO access under xen



Quoting r. Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>:
> Subject: RE: [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.

#define io_remap_page_range(vma, vaddr, paddr, size, prot) \
                remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot)

So I just tested again and of course io_remap_pfn_range gives the same result.

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

I actually use remap_pfn_range, I mistyped that.

> Ian
> 

Point is, none of these works.

-- 
MST

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