[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/32] memory: Alloc dispatch tree where topology is
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 15/32] memory: Alloc dispatch tree where topology is generared |
Date: |
Fri, 22 Sep 2017 01:16:23 +0200 |
From: Alexey Kardashevskiy <address@hidden>
This is to make next patches simpler.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
memory.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/memory.c b/memory.c
index 15724db..6f6c233 100644
--- a/memory.c
+++ b/memory.c
@@ -743,6 +743,7 @@ static MemoryRegion
*memory_region_get_flatview_root(MemoryRegion *mr)
/* Render a memory topology into a list of disjoint absolute ranges. */
static FlatView *generate_memory_topology(MemoryRegion *mr)
{
+ int i;
FlatView *view;
view = flatview_new(mr);
@@ -753,6 +754,14 @@ static FlatView *generate_memory_topology(MemoryRegion *mr)
}
flatview_simplify(view);
+ view->dispatch = address_space_dispatch_new(view);
+ for (i = 0; i < view->nr; i++) {
+ MemoryRegionSection mrs =
+ section_from_flat_range(&view->ranges[i], view);
+ flatview_add_to_dispatch(view, &mrs);
+ }
+ address_space_dispatch_compact(view->dispatch);
+
return view;
}
@@ -926,15 +935,6 @@ static void address_space_update_topology(AddressSpace *as)
FlatView *old_view = address_space_get_flatview(as);
MemoryRegion *physmr = memory_region_get_flatview_root(old_view->root);
FlatView *new_view = generate_memory_topology(physmr);
- int i;
-
- new_view->dispatch = address_space_dispatch_new(new_view);
- for (i = 0; i < new_view->nr; i++) {
- MemoryRegionSection mrs =
- section_from_flat_range(&new_view->ranges[i], new_view);
- flatview_add_to_dispatch(new_view, &mrs);
- }
- address_space_dispatch_compact(new_view->dispatch);
if (!QTAILQ_EMPTY(&as->listeners)) {
address_space_update_topology_pass(as, old_view, new_view, false);
--
1.8.3.1
- [Qemu-devel] [PULL 07/32] memory: Open code FlatView rendering, (continued)
- [Qemu-devel] [PULL 07/32] memory: Open code FlatView rendering, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 01/32] virtio-serial: add enable_backend callback, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 02/32] kvm: drop wrong assertion creating problems with pflash, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 03/32] memory: avoid a name clash with access macro, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 05/32] memory: avoid "resurrection" of dead FlatViews, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 10/32] memory: Remove AddressSpace pointer from AddressSpaceDispatch, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 09/32] memory: Move AddressSpaceDispatch from AddressSpace to FlatView, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 13/32] memory: Rename mem_begin/mem_commit/mem_add helpers, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 12/32] memory: Cleanup after switching to FlatView, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 14/32] memory: Store physical root MR in FlatView, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 15/32] memory: Alloc dispatch tree where topology is generared,
Paolo Bonzini <=
- [Qemu-devel] [PULL 11/32] memory: Switch memory from using AddressSpace to FlatView, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 16/32] memory: Move address_space_update_ioeventfds, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 17/32] memory: Share FlatView's and dispatch trees between address spaces, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 18/32] memory: Do not allocate FlatView in address_space_init, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 21/32] memory: Create FlatView directly, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 23/32] memory: seek FlatView sharing candidates among children subregions, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 20/32] memory: Get rid of address_space_init_shareable, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 22/32] memory: trace FlatView creation and destruction, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 19/32] memory: Rework "info mtree" to print flat views and dispatch trees, Paolo Bonzini, 2017/09/21
- [Qemu-devel] [PULL 24/32] memory: Share special empty FlatView, Paolo Bonzini, 2017/09/21