summaryrefslogtreecommitdiffstats
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/vl.c b/vl.c
index 36ff3f4345..d17c863409 100644
--- a/vl.c
+++ b/vl.c
@@ -3933,9 +3933,13 @@ int main(int argc, char **argv, char **envp)
configure_rtc(opts);
break;
case QEMU_OPTION_tb_size:
- tcg_tb_size = strtol(optarg, NULL, 0);
- if (tcg_tb_size < 0) {
- tcg_tb_size = 0;
+ 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);
}
break;
case QEMU_OPTION_icount:
@@ -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");