On 7 May 2013 15:16, Paolo Bonzini <pbonz...@redhat.com> 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.) thanks -- PMM