From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiXLL-0002Ta-2K for qemu-devel@nongnu.org; Fri, 31 May 2013 17:58:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UiXLF-00085P-OR for qemu-devel@nongnu.org; Fri, 31 May 2013 17:58:39 -0400 Received: from mail-ve0-x22e.google.com ([2607:f8b0:400c:c01::22e]:57616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiXLF-00085L-Jb for qemu-devel@nongnu.org; Fri, 31 May 2013 17:58:33 -0400 Received: by mail-ve0-f174.google.com with SMTP id oz10so1537374veb.5 for ; Fri, 31 May 2013 14:58:33 -0700 (PDT) Sender: Richard Henderson Message-ID: <51A91D05.5090101@twiddle.net> Date: Fri, 31 May 2013 14:58:29 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1369948629-2833-1-git-send-email-pbonzini@redhat.com> <1369948629-2833-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1369948629-2833-5-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 04/21] exec: Resolve subpages in one step except for IOTLB fills List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Jan Kiszka , qemu-devel@nongnu.org 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~