Patchwork [PULL,5/5] exec: do tcg_commit only when tcg_enabled

login
register
mail settings
Submitter Paolo Bonzini
Date Sept. 5, 2013, 5:17 p.m.
Message ID <1378401455-583-6-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/272919/
State New
Headers show

Comments

Paolo Bonzini - Sept. 5, 2013, 5:17 p.m.
From: liguang <lig.fnst@cn.fujitsu.com>

Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 exec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/exec.c b/exec.c
index 3859b02..030118e 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)