]> Git Repo - qemu.git/commitdiff
vl: add tcg_enabled() for tcg related code
authorYang Zhong <[email protected]>
Mon, 3 Jul 2017 10:12:10 +0000 (18:12 +0800)
committerPaolo Bonzini <[email protected]>
Tue, 4 Jul 2017 12:39:28 +0000 (14:39 +0200)
Need to disable the tcg related code in the vl.c if the
disable-tcg option is added into ./configure command.

Signed-off-by: Yang Zhong <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
vl.c

diff --git a/vl.c b/vl.c
index ea8ef5fd38c9c301ac5657e0e56c213ff9d5cae1..d17c863409e5220e0992e1f1c149c171471a9d9b 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -3933,6 +3933,10 @@ int main(int argc, char **argv, char **envp)
                 configure_rtc(opts);
                 break;
             case QEMU_OPTION_tb_size:
+                if (!tcg_enabled()) {
+                    error_report("TCG is disabled");
+                    exit(1);
+                }
                 if (qemu_strtoul(optarg, NULL, 0, &tcg_tb_size) < 0) {
                     error_report("Invalid argument to -tb-size");
                     exit(1);
@@ -4481,7 +4485,9 @@ int main(int argc, char **argv, char **envp)
         qemu_opts_del(icount_opts);
     }
 
-    qemu_tcg_configure(accel_opts, &error_fatal);
+    if (tcg_enabled()) {
+        qemu_tcg_configure(accel_opts, &error_fatal);
+    }
 
     if (default_net) {
         QemuOptsList *net = qemu_find_opts("net");
This page took 0.032504 seconds and 4 git commands to generate.