mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
variable dynamic translation buffer size
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4600 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
bed5cc5207
commit
26a5f13b8e
7 changed files with 88 additions and 54 deletions
14
vl.c
14
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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue