exec: do tcg_commit only when tcg_enabled

Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
liguang 2013-09-04 14:37:33 +08:00 committed by Paolo Bonzini
parent 68a7439a15
commit 2641689a37

4
exec.c
View File

@ -1810,7 +1810,9 @@ static void memory_map_init(void)
address_space_init(&address_space_io, system_io, "I/O");
memory_listener_register(&core_memory_listener, &address_space_memory);
memory_listener_register(&tcg_memory_listener, &address_space_memory);
if (tcg_enabled()) {
memory_listener_register(&tcg_memory_listener, &address_space_memory);
}
}
MemoryRegion *get_system_memory(void)