From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: Andy Burns <lists.xensource.com@adslpipe.co.uk>,
xen-devel@lists.xensource.com
Subject: Re: MMIO ioremap() error with PCI passthrough
Date: Tue, 01 Jul 2008 11:52:39 -0700 [thread overview]
Message-ID: <486A7CF7.6090202@goop.org> (raw)
In-Reply-To: <C48FF03E.235B9%keir.fraser@eu.citrix.com>
Keir Fraser wrote:
> On 1/7/08 14:16, "Andy Burns" <lists.xensource.com@adslpipe.co.uk> wrote:
>
>
>>> 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?
>>
>
> Well, your analysis is correct, and the size argument to __ioremap() is
> bogus. It shouldn't have been rounded up to 4096 without also rounding down
> the base address. I don't think this would happen with out linux-2.6.18-xen
> tree. In there, ioremap() is defined in include/asm-x86_64/mach-xen/io.h as
> a thin wrapper around __ioremap() which does not modify the size parameter.
>
> So, could be a bug specific to the FC8 kernel. I don't have its sources to
> hand to pinpoint where the size is getting changed from 0x400 to 0x1000. You
> should be able to dig up that detail pretty easily though.
There was a kernel bug in which ioremap would add a 1 page redzone to
the end of the mapping, and then pass that extra page to iounmap. It
has been fixed for a while, but since F8.
J
next prev parent reply other threads:[~2008-07-01 18:52 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
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 [this message]
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=486A7CF7.6090202@goop.org \
--to=jeremy@goop.org \
--cc=keir.fraser@eu.citrix.com \
--cc=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.