qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 08/20] memory: store MemoryRegionSection pointer


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 08/20] memory: store MemoryRegionSection pointers in phys_map
Date: Thu, 08 Mar 2012 13:11:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1

On 03/08/2012 12:09 PM, Peter Maydell wrote:
> On 8 March 2012 09:50, Avi Kivity <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]