On 03/08/2012 12:09 PM, Peter Maydell wrote:
> On 8 March 2012 09:50, Avi Kivity <a...@redhat.com> wrote:
> > On 03/07/2012 09:32 PM, Peter Maydell wrote:
> >> Are we running into the "mapping devices at non-page-offsets isn't
> >> supported" issue here?
> >
> > It wasn't supported?
>
> Well, you used to run into the issue noted in the comment above
> exec.c:register_subpage():
>    The address used when calling the IO function is
>    the offset from the start of the region, plus region_offset.  Both
>    start_addr and region_offset are rounded down to a page boundary
>    before calculating this offset.  This should not be a problem unless
>    the low bits of start_addr and region_offset differ.
>
> and for non-page-aligned IO regions we were getting bitten by
> this rounding, which is why the offset passed into the read/write
> function was strange.
>
> Is that exec.c comment now out of date?

For subpage, I think so.  It's still broken for page aligned regions
that have low bits set in their offset:

  memory_region_init_io(foo, ..., 4097)
  memory_region_add_subregion(sysmem, 4095, foo);

the 4095-4096 region will work, but the 4096-8191 region will not.  I'll
address it later when I'll regress the memory core in other ways.

> (You might recall we had a conversation about this a little while
> back: http://patchwork.ozlabs.org/patch/129267/ )

I had a full memory wipe done during my vacation, so no.

-- 
error compiling committee.c: too many arguments to function


Reply via email to