diff options
author | Avi Kivity <avi@redhat.com> | 2012-10-02 18:49:28 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-10-22 14:50:07 +0200 |
commit | 2673a5da25ea9005e562c20a18cf469ed4f21060 (patch) | |
tree | 0f1f6416e6a0aa028ce1c1a412330bf6cf3497a2 /exec.c | |
parent | 95d2994a2f756c9c8684709421d40c45e63e4e04 (diff) |
memory: move address_space_memory and address_space_io out of memory core
With this change, memory.c no longer knows anything about special address
spaces, so it is prepared for AddressSpace based DMA.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -116,6 +116,9 @@ RAMList ram_list = { .blocks = QLIST_HEAD_INITIALIZER(ram_list.blocks) }; static MemoryRegion *system_memory; static MemoryRegion *system_io; +static AddressSpace address_space_io; +static AddressSpace address_space_memory; + MemoryRegion io_mem_ram, io_mem_rom, io_mem_unassigned, io_mem_notdirty; static MemoryRegion io_mem_subpage_ram; @@ -3235,11 +3238,13 @@ static void memory_map_init(void) { system_memory = g_malloc(sizeof(*system_memory)); memory_region_init(system_memory, "system", INT64_MAX); - set_system_memory_map(system_memory); + address_space_init(&address_space_memory, system_memory); + address_space_memory.name = "memory"; system_io = g_malloc(sizeof(*system_io)); memory_region_init(system_io, "io", 65536); - set_system_io_map(system_io); + address_space_init(&address_space_io, system_io); + address_space_io.name = "I/O"; memory_listener_register(&core_memory_listener, system_memory); memory_listener_register(&io_memory_listener, system_io); |