On 22/03/2016 04:26, David Gibson wrote: >> > >...it might be simpler to replace both the iommu and >> > >offset_within_address_space fields here with a pointer to the >> > >MemoryRegionSection instead, which should give you all the info you >> > >need. >> >> >> MemoryRegionSection is allocated on stack in listener_add_address_space() >> and seems to be in general some sort of temporary object.
If you need the information in a MemoryRegionSection, by all means use it. For example users of hw/display/framebuffer.c store a MemoryRegionSection (in that case, they get it from memory_region_find, but it doesn't have to be that way). Otherwise I agree with what David has said. Paolo