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] MMIO ioremap() error with PCI passthrough

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] MMIO ioremap() error with PCI passthrough
From: Andy Burns <lists.xensource.com@xxxxxxxxxxxxxx>
Date: Tue, 01 Jul 2008 14:16:03 +0100
Delivery-date: Tue, 01 Jul 2008 06:16:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C48FBB5A.234FD%keir.fraser@xxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C48FBB5A.234FD%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080421 Lightning/0.8 Thunderbird/2.0.0.14 Mnenhy/0.7.5.0
On 01/07/2008 10:45, Keir Fraser wrote:

If you're
happy changing kernel code, you might try adding printk() instrumentation to
__ioremap()

printk(KERN_DEBUG "REMAP: phys=0x%lx, len=%lu\n",
       phys_addr, size);

and __direct_remap_pfn_range() in arch/i386/mm/ioremap-xen.c.

printk(KERN_DEBUG "REMAPPFN: addr=0x%lx, mfn=0x%lx, size=%lu\n",
       address, mfn, size);

The functions look like they should map the correct range of pages (in this
case only the page covering FEBFF000-FEBFFFFF)

Built and installed kernel/modules/initrd, rebooted, when it loads the saa7134 driver I see this

REMAP: phys=0xfebffc00, len=4096
REMAPPFN: addr=0xffffc20000038000, mfn=0xfebff, size=8192

So the 1K mapping has been rounded up to 4K (x86_64 page size?) before passing to __ioremap() and then rounded up again to 8K by the time it gets passed to __direct_remap_pfn_range() is that right?

I can manage to build a kernel, but I'm out of my depth in terms of knowing what would be good or bad with physical addresses and page mappings ...



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