aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-28 12:30:31 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-28 12:30:31 +0000
commit26a5f13b8eb1281d0552fe323e869806f3cefbfb (patch)
tree6b5d393ea5fba9a28e651dc908f4a3ba9b8ebc32 /vl.c
parentbed5cc520707ba4382444c4fb2afd428df080e6c (diff)
downloadqemu-26a5f13b8eb1281d0552fe323e869806f3cefbfb.zip
qemu-26a5f13b8eb1281d0552fe323e869806f3cefbfb.tar.gz
qemu-26a5f13b8eb1281d0552fe323e869806f3cefbfb.tar.bz2
variable dynamic translation buffer size
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4600 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index 5430ae6..18ddcce 100644
--- a/vl.c
+++ b/vl.c
@@ -7378,6 +7378,7 @@ enum {
QEMU_OPTION_old_param,
QEMU_OPTION_clock,
QEMU_OPTION_startdate,
+ QEMU_OPTION_tb_size,
};
typedef struct QEMUOption {
@@ -7489,6 +7490,7 @@ const QEMUOption qemu_options[] = {
#endif
{ "clock", HAS_ARG, QEMU_OPTION_clock },
{ "startdate", HAS_ARG, QEMU_OPTION_startdate },
+ { "tb-size", HAS_ARG, QEMU_OPTION_tb_size },
{ NULL },
};
@@ -7697,6 +7699,7 @@ int main(int argc, char **argv)
const char *usb_devices[MAX_USB_CMDLINE];
int usb_devices_index;
int fds[2];
+ int tb_size;
const char *pid_file = NULL;
VLANState *vlan;
@@ -7768,8 +7771,9 @@ int main(int argc, char **argv)
hda_index = -1;
nb_nics = 0;
- /* default mac address of the first network interface */
+ tb_size = 0;
+
optind = 1;
for(;;) {
if (optind >= argc)
@@ -8296,6 +8300,11 @@ int main(int argc, char **argv)
}
}
break;
+ case QEMU_OPTION_tb_size:
+ tb_size = strtol(optarg, NULL, 0);
+ if (tb_size < 0)
+ tb_size = 0;
+ break;
}
}
}
@@ -8467,6 +8476,9 @@ int main(int argc, char **argv)
exit(1);
}
+ /* init the dynamic translator */
+ cpu_exec_init_all(tb_size * 1024 * 1024);
+
bdrv_init();
/* we always create the cdrom drive, even if no disk is there */