On 05/30/2013 02:16 PM, Paolo Bonzini wrote:
>  static MemoryRegionSection *address_space_lookup_region(AddressSpace *as,
> -                                                        hwaddr addr)
> +                                                        hwaddr addr,
> +                                                        bool resolve_subpage)
>  {
> -    return phys_page_find(as->dispatch, addr >> TARGET_PAGE_BITS);
> +    MemoryRegionSection *section;
> +    subpage_t *subpage;
> +
> +    section = phys_page_find(as->dispatch, addr >> TARGET_PAGE_BITS);
> +    if (resolve_subpage && section->mr->subpage) {
> +        subpage = container_of(section->mr, subpage_t, iomem);
> +        section = &phys_sections[subpage->sub_section[SUBPAGE_IDX(addr)]];
> +    }
> +    return section;
>  }

Was there somewhere else that no longer needs to check phys_sections?
Or does that get eliminated in the course of subsequent patches?


r~

Reply via email to