From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZzx1-0007sE-6O for qemu-devel@nongnu.org; Wed, 08 May 2013 04:42:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZzwv-0002Yt-4y for qemu-devel@nongnu.org; Wed, 08 May 2013 04:42:15 -0400 Received: from mx4-phx2.redhat.com ([209.132.183.25]:53105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZzwu-0002Yj-Rr for qemu-devel@nongnu.org; Wed, 08 May 2013 04:42:09 -0400 Date: Wed, 8 May 2013 04:41:59 -0400 (EDT) From: Paolo Bonzini Message-ID: <227600724.7629864.1368002519124.JavaMail.root@redhat.com> In-Reply-To: References: <1367936238-12196-1-git-send-email-pbonzini@redhat.com> <1367936238-12196-10-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 09/40] memory: create FlatView for new address spaces List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: aik@ozlabs.ru, jan kiszka , qemu-devel@nongnu.org, qemulist@gmail.com, stefanha@redhat.com, david@gibson.dropbear.id.au > On 7 May 2013 15:16, Paolo Bonzini wrote: > > A new address space has an empty FlatView. In order to create it, we > > must (a) call memory_region_transaction_commit after the address space is > > inserted into the list; (b) force memory_region_transaction_commit to > > do something. > > > > This bug was latent so far because all address spaces started empty, > > including > > the PCI address space where the bus master region is initially disabled. > > However, the target address space of an IOMMU is usually rooted at > > get_system_memory(), which might not be empty at the time the IOMMU is > > created. > > The code looks ok but I don't entirely understand the > commit message. Surely we're definitely already creating > the FlatView -- that's what the g_new and flatview_init do. > What we're not doing is calling notifiers for the initial > contents of the address space, right? (and thus in turn > we're not setting up the data structures those notifiers > control, but as far as I can see from the code that's not > the FlatView.) Right, it should be s/create/populate/g. Paolo