aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorliguang <lig.fnst@cn.fujitsu.com>2013-09-04 14:37:33 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2013-09-05 18:11:52 +0200
commit2641689a37144b201814f39046e36eb285498cbe (patch)
treea6c288b8c9abb66dddfb86c1bb37b50c80ed9996 /exec.c
parent68a7439a150d6b4da99082ab454b9328b151bc25 (diff)
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>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index 3859b02d57..030118e68e 100644
--- a/exec.c
+++ b/exec.c
@@ -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)