aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorYang Zhong <yang.zhong@intel.com>2017-07-03 18:12:10 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2017-07-04 14:39:28 +0200
commite7b161d5738bd5721e05174b25145f33dbc9d184 (patch)
treee58573d0fd90794ae269a507c249258adf10ee0c /vl.c
parent8b3ae692b83ecffb9315892d67b8ade5e0427e74 (diff)
vl: add tcg_enabled() for tcg related code
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>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index ea8ef5fd38..d17c863409 100644
--- 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");