[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 14/15] memory: populate FlatView for new address spa
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 14/15] memory: populate FlatView for new address spaces |
Date: |
Fri, 24 May 2013 19:03:06 +0200 |
Even a new address space might have a non-empty FlatView. In order
to initialize it properly, address_space_init should (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.
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
memory.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/memory.c b/memory.c
index 9478f98..99f046d 100644
--- a/memory.c
+++ b/memory.c
@@ -1576,8 +1576,9 @@ void address_space_init(AddressSpace *as, MemoryRegion
*root)
as->ioeventfds = NULL;
QTAILQ_INSERT_TAIL(&address_spaces, as, address_spaces_link);
as->name = NULL;
- memory_region_transaction_commit();
address_space_init_dispatch(as);
+ memory_region_update_pending |= root->enabled;
+ memory_region_transaction_commit();
}
void address_space_destroy(AddressSpace *as)
--
1.8.1.4
- [Qemu-devel] [PATCH 10/15] memory: make memory_global_sync_dirty_bitmap take an AddressSpace, (continued)
- [Qemu-devel] [PATCH 10/15] memory: make memory_global_sync_dirty_bitmap take an AddressSpace, Paolo Bonzini, 2013/05/24
- [Qemu-devel] [PATCH 11/15] memory: fix address space initialization/destruction, Paolo Bonzini, 2013/05/24
- [Qemu-devel] [PATCH 12/15] s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62, Paolo Bonzini, 2013/05/24
- Re: [Qemu-devel] [PATCH 12/15] s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62, Andreas Färber, 2013/05/26
- Re: [Qemu-devel] [PATCH 12/15] s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62, Paolo Bonzini, 2013/05/26
- Re: [Qemu-devel] [PATCH 12/15] s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62, Christian Borntraeger, 2013/05/26
- Re: [Qemu-devel] [PATCH 12/15] s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62, Paolo Bonzini, 2013/05/27
- Re: [Qemu-devel] [PATCH 12/15] s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62, Andreas Färber, 2013/05/27
- Re: [Qemu-devel] [PATCH 12/15] s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62, Paolo Bonzini, 2013/05/27
[Qemu-devel] [PATCH 13/15] memory: limit sections in the radix tree to the actual address space size, Paolo Bonzini, 2013/05/24
[Qemu-devel] [PATCH 14/15] memory: populate FlatView for new address spaces,
Paolo Bonzini <=
[Qemu-devel] [PATCH 15/15] memory: clean up phys_page_find, Paolo Bonzini, 2013/05/24
Re: [Qemu-devel] [PULL 00/15] IOMMU patches for 1.6, part 1, Paolo Bonzini, 2013/05/27