aboutsummaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2012-10-03 16:22:53 +0200
committerAvi Kivity <avi@redhat.com>2012-10-22 14:50:08 +0200
commitac1970fbe8ad5a70174f462109ac0f6c7bf1bc43 (patch)
treeaa2f9702bfd593515b6fb7ee438f6cc5bacef74e /memory.c
parent0e8a6d47afcc88564079387928f2da45736d36e8 (diff)
memory: per-AddressSpace dispatch
Currently we use a global radix tree to dispatch memory access. This only works with a single address space; to support multiple address spaces we make the radix tree a member of AddressSpace (via an intermediate structure AddressSpaceDispatch to avoid exposing too many internals). A side effect is that address_space_io also gains a dispatch table. When we remove all the pre-memory-API I/O registrations, we can use that for dispatching I/O and get rid of the original I/O dispatch. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/memory.c b/memory.c
index 0cf0177f43..13be84849c 100644
--- a/memory.c
+++ b/memory.c
@@ -1539,6 +1539,7 @@ void address_space_init(AddressSpace *as, MemoryRegion *root)
QTAILQ_INSERT_TAIL(&address_spaces, as, address_spaces_link);
as->name = NULL;
memory_region_transaction_commit();
+ address_space_init_dispatch(as);
}
uint64_t io_mem_read(MemoryRegion *mr, target_phys_addr_t addr, unsigned size)