qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-arm/helper.c: Don't allocate TCG resources unless TCG enabled
@ 2011-11-25 18:25 Peter Maydell
  2011-12-05 20:22 ` andrzej zaborowski
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2011-11-25 18:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: patches

Don't call arm_translate_init() (which allocates TCG resources)
unless TCG is enabled.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
First KVM related QEMU patch :-)
[without this we segfault on startup if run with -enable-kvm,
although the omission is currently harmless for upstream QEMU
where TCG is always enabled on ARM.]

 target-arm/helper.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target-arm/helper.c b/target-arm/helper.c
index 97af4d0..3fe5822 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -390,7 +390,7 @@ CPUARMState *cpu_arm_init(const char *cpu_model)
         return NULL;
     env = g_malloc0(sizeof(CPUARMState));
     cpu_exec_init(env);
-    if (!inited) {
+    if (tcg_enabled() && !inited) {
         inited = 1;
         arm_translate_init();
     }
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-05 20:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-25 18:25 [Qemu-devel] [PATCH] target-arm/helper.c: Don't allocate TCG resources unless TCG enabled Peter Maydell
2011-12-05 20:22 ` andrzej zaborowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).