From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aigUc-0000Qk-Tp for qemu-devel@nongnu.org; Wed, 23 Mar 2016 06:58:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aigUa-0005vf-7U for qemu-devel@nongnu.org; Wed, 23 Mar 2016 06:58:26 -0400 References: <1458546426-26222-1-git-send-email-aik@ozlabs.ru> <1458546426-26222-2-git-send-email-aik@ozlabs.ru> <20160322004956.GS23586@voom.redhat.com> <56F0B81E.9080701@ozlabs.ru> <20160322032626.GA23586@voom.redhat.com> From: Paolo Bonzini Message-ID: <56F276CB.2050803@redhat.com> Date: Wed, 23 Mar 2016 11:58:19 +0100 MIME-Version: 1.0 In-Reply-To: <20160322032626.GA23586@voom.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qemu v14 01/18] memory: Fix IOMMU replay base address List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson , Alexey Kardashevskiy Cc: Alex Williamson , qemu-ppc@nongnu.org, qemu-devel@nongnu.org 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. >>=20 >>=20 >> MemoryRegionSection is allocated on stack in listener_add_address_spac= e() >> 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