From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uu22K-0004qk-Bq for qemu-devel@nongnu.org; Tue, 02 Jul 2013 10:58:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uu1rc-0002qI-7j for qemu-devel@nongnu.org; Tue, 02 Jul 2013 10:47:32 -0400 Received: from david.siemens.de ([192.35.17.14]:18709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uu1rb-0002q1-Sn for qemu-devel@nongnu.org; Tue, 02 Jul 2013 10:47:28 -0400 Message-ID: <51D2E7FB.5050200@siemens.com> Date: Tue, 02 Jul 2013 16:47:23 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1372444009-11544-1-git-send-email-pbonzini@redhat.com> <1372444009-11544-28-git-send-email-pbonzini@redhat.com> In-Reply-To: <1372444009-11544-28-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 27/30] exec: change some APIs to take AddressSpaceDispatch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On 2013-06-28 20:26, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > exec.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/exec.c b/exec.c > index 7f87e16..528c4d7 100644 > --- a/exec.c > +++ b/exec.c > @@ -236,11 +236,10 @@ bool memory_region_is_unassigned(MemoryRegion *mr) > && mr != &io_mem_watch; > } > > -static MemoryRegionSection *address_space_lookup_region(AddressSpace *as, > +static MemoryRegionSection *address_space_lookup_region(AddressSpaceDispatch *d, > hwaddr addr, > bool resolve_subpage) > { > - AddressSpaceDispatch *d = as->dispatch; > MemoryRegionSection *section; > subpage_t *subpage; > > @@ -254,13 +253,13 @@ static MemoryRegionSection *address_space_lookup_region(AddressSpace *as, > } > > static MemoryRegionSection * > -address_space_translate_internal(AddressSpace *as, hwaddr addr, hwaddr *xlat, > +address_space_translate_internal(AddressSpaceDispatch *d, hwaddr addr, hwaddr *xlat, > hwaddr *plen, bool resolve_subpage) > { > MemoryRegionSection *section; > Int128 diff; > > - section = address_space_lookup_region(as, addr, resolve_subpage); > + section = address_space_lookup_region(d, addr, resolve_subpage); > /* Compute offset within MemoryRegionSection */ > addr -= section->offset_within_address_space; > > @@ -282,7 +281,7 @@ MemoryRegion *address_space_translate(AddressSpace *as, hwaddr addr, > hwaddr len = *plen; > > for (;;) { > - section = address_space_translate_internal(as, addr, &addr, plen, true); > + section = address_space_translate_internal(as->dispatch, addr, &addr, plen, true); > mr = section->mr; > > if (!mr->iommu_ops) { > @@ -311,7 +310,7 @@ address_space_translate_for_iotlb(AddressSpace *as, hwaddr addr, hwaddr *xlat, > hwaddr *plen) > { > MemoryRegionSection *section; > - section = address_space_translate_internal(as, addr, xlat, plen, false); > + section = address_space_translate_internal(as->dispatch, addr, xlat, plen, false); > > assert(!section->mr->iommu_ops); > return section; > Reviewed-by: Jan Kiszka -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux