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: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Userspace PIO access under xen
From: "Michael S. Tsirkin" <mst@xxxxxxxxxxxxxx>
Date: Mon, 25 Jul 2005 15:58:33 +0300
Cc: Dror Goldenberg <gdror@xxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 25 Jul 2005 12:54:29 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <A95E2296287EAD4EB592B5DEEFCE0E9D282771@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <A95E2296287EAD4EB592B5DEEFCE0E9D282771@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: "Michael S. Tsirkin" <mst@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
Quoting r. Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>:
> Subject: RE: [Xen-devel] Userspace PIO access under xen
> 
>  
> > > 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.
> 
> Look at arch/xen/kernel/devmem.c and include/asm-xen/asm-i386/pgtable.h
> 
> #define io_remap_page_range(vma,from,phys,size,prot) \
> direct_remap_area_pages(vma->vm_mm,from,phys,size,prot,DOMID_IO)
> 
> It works fine for /dev/mem. It's possible there's a definition missing
> for io_remap_pfn_range.
> 
> Ian
> 

Hmm.

I have

/lib/modules/2.6.12-xen0/source/include/asm-xen/asm-i386/pgtable.h ->
../../../../linux-2.6-xen-sparse/./include/asm-xen/asm-i386/./pgtable.h

But

# ls -l /lib/modules/2.6.12-xen0/source/include/asm/pgtable.h
 -rw-r--r--  4 root root 14618 Jun 17 22:48
 /lib/modules/2.6.12-xen0/source/include/asm/pgtable.h

so it seems that the install script didnt link asm/pgtable.h in place
correctly?

-- 
MST

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

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