All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Burns <lists.xensource.com@adslpipe.co.uk>
To: xen-devel@lists.xensource.com
Subject: Re: MMIO ioremap() error with PCI passthrough
Date: Tue, 01 Jul 2008 14:16:03 +0100	[thread overview]
Message-ID: <486A2E13.3080808@adslpipe.co.uk> (raw)
In-Reply-To: <C48FBB5A.234FD%keir.fraser@eu.citrix.com>

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

  reply	other threads:[~2008-07-01 13:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-01  8:17 MMIO ioremap() error with PCI passthrough Andy Burns
2008-07-01  8:30 ` Keir Fraser
2008-07-01  8:58   ` Andy Burns
2008-07-01  9:45     ` Keir Fraser
2008-07-01 13:16       ` Andy Burns [this message]
2008-07-01 13:31         ` Keir Fraser
2008-07-01 15:44           ` Andy Burns
2008-07-01 16:42             ` Andy Burns
2008-07-01 17:15               ` Keir Fraser
2008-07-01 18:50                 ` Andy Burns
2008-07-01 19:24                   ` Andy Burns
2008-07-01 19:57                     ` Keir Fraser
2008-07-01 22:27                       ` Andy Burns
2008-07-02  9:35               ` Andy Burns
2008-07-02 12:54                 ` Andy Burns
2008-07-02 14:09                   ` Andy Burns
2008-07-01 17:10             ` Keir Fraser
2008-07-01 18:52           ` Jeremy Fitzhardinge
2008-07-01  9:09   ` Andy Burns

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=486A2E13.3080808@adslpipe.co.uk \
    --to=lists.xensource.com@adslpipe.co.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.