[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 09/40] memory: create FlatView for new address space

From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH 09/40] memory: create FlatView for new address spaces
Date: Tue, 7 May 2013 16:16:47 +0200

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.

Signed-off-by: Paolo Bonzini <address@hidden>
 memory.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/memory.c b/memory.c
index fc4515b..a8929aa 100644
--- a/memory.c
+++ b/memory.c
@@ -1577,8 +1577,9 @@ void address_space_init(AddressSpace *as, MemoryRegion 
     as->ioeventfds = NULL;
     QTAILQ_INSERT_TAIL(&address_spaces, as, address_spaces_link);
     as->name = NULL;
-    memory_region_transaction_commit();
+    memory_region_update_pending |= root->enabled;
+    memory_region_transaction_commit();
 void address_space_destroy(AddressSpace *as)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]