]> Git Repo - qemu.git/commitdiff
vl: fix breakage of -tb-size
authorEmilio G. Cota <[email protected]>
Sun, 9 Jul 2017 07:49:53 +0000 (03:49 -0400)
committerPaolo Bonzini <[email protected]>
Fri, 14 Jul 2017 10:04:42 +0000 (12:04 +0200)
Commit e7b161d573 ("vl: add tcg_enabled() for tcg related code") adds
a check to exit the program when !tcg_enabled() while parsing the -tb-size
flag.

It turns out that when the -tb-size flag is evaluated, tcg_enabled() can
only return 0, since it is set (or not) much later by configure_accelerator().

Fix it by unconditionally exiting if the flag is passed to a QEMU binary
built with !CONFIG_TCG.

Signed-off-by: Emilio G. Cota <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
vl.c

diff --git a/vl.c b/vl.c
index f7560de622a5b2a071b62429ee9473f5d2d9154f..85cdbbff15ffecbee8309d039cf494d1a9b84763 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -3933,10 +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);
-                }
+#ifndef CONFIG_TCG
+                error_report("TCG is disabled");
+                exit(1);
+#endif
                 if (qemu_strtoul(optarg, NULL, 0, &tcg_tb_size) < 0) {
                     error_report("Invalid argument to -tb-size");
                     exit(1);
This page took 0.033259 seconds and 4 git commands to generate.