aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2012-10-02 20:13:51 +0200
committerAvi Kivity <avi@redhat.com>2012-10-22 14:50:07 +0200
commitf6790af6bcfa35fa9ea3c565a0a2aed54337aef5 (patch)
treea26b7a7c52d483f083c7672af26e62f774e1b706 /exec.c
parent1d71148eace669827ba15101819b54b20fcca616 (diff)
downloadqemu-f6790af6bcfa35fa9ea3c565a0a2aed54337aef5.zip
qemu-f6790af6bcfa35fa9ea3c565a0a2aed54337aef5.tar.gz
qemu-f6790af6bcfa35fa9ea3c565a0a2aed54337aef5.tar.bz2
memory: use AddressSpace for MemoryListener filtering
Using the AddressSpace type reduces confusion, as you can't accidentally supply the MemoryRegion you're interested in. 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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/exec.c b/exec.c
index 6a7ba0c..e732b52 100644
--- a/exec.c
+++ b/exec.c
@@ -116,8 +116,8 @@ 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;
+AddressSpace address_space_io;
+AddressSpace address_space_memory;
MemoryRegion io_mem_ram, io_mem_rom, io_mem_unassigned, io_mem_notdirty;
static MemoryRegion io_mem_subpage_ram;
@@ -3249,9 +3249,9 @@ static void memory_map_init(void)
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);
- memory_listener_register(&tcg_memory_listener, system_memory);
+ memory_listener_register(&core_memory_listener, &address_space_memory);
+ memory_listener_register(&io_memory_listener, &address_space_io);
+ memory_listener_register(&tcg_memory_listener, &address_space_memory);
}
MemoryRegion *get_system_memory(void)