qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: patches@linaro.org
Subject: [Qemu-devel] [PATCH] target-arm/helper.c: Don't allocate TCG resources unless TCG enabled
Date: Fri, 25 Nov 2011 18:25:50 +0000	[thread overview]
Message-ID: <1322245550-5110-1-git-send-email-peter.maydell@linaro.org> (raw)

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

             reply	other threads:[~2011-11-25 18:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-25 18:25 Peter Maydell [this message]
2011-12-05 20:22 ` [Qemu-devel] [PATCH] target-arm/helper.c: Don't allocate TCG resources unless TCG enabled andrzej zaborowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1322245550-5110-1-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).