Skip to content

Commit

Permalink
vl: add tcg_enabled() for tcg related code
Browse files Browse the repository at this point in the history
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 <yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
yangzhon authored and bonzini committed Jul 4, 2017
1 parent 8b3ae69 commit e7b161d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vl.c
Expand Up @@ -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);
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit e7b161d

Please sign in to comment.