On 23 April 2013 18:14, Paolo Bonzini <pbonz...@redhat.com> wrote:
> Il 23/04/2013 19:06, Peter Maydell ha scritto:
>>> >  /*
>>> > + * memory_region_get_address: get current the address of a region
>>> > + *
>>> > + * Returns the absolute address of a region.
>>> > + * May be used on regions that are currently part of a memory hierarchy.
>>> > + *
>>> > + * @mr: the region being queried
>>> > + */
>>> > +hwaddr memory_region_get_address(MemoryRegion *mr);
>> This doesn't make sense as a memory API in my opinion. There's
>> no such thing as the "absolute address of a MemoryRegion".
>
> What about also passing an AddressSpace and stopping at the address
> space's root?  Would that make more sense?

That would be an improvement, but it still requires this
device to know what address space it's mapped into, which
is a bit ugly.

-- PMM

Reply via email to