diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-08-07 14:54:47 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-08-07 14:54:47 +0100 |
commit | 2ee55b8351910e5dd898f52415064a4c5479baba (patch) | |
tree | 7d29652c004379d94056ed5caa046c768af8f2ab /vl.c | |
parent | 9d8bb3557408adc3e5e26b7915cbf6c198dfd4ff (diff) | |
parent | eddedd546a68f6ac864b71d50dd8d39b939b724b (diff) | |
download | qemu-2ee55b8351910e5dd898f52415064a4c5479baba.tar.gz |
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
KVM changes include a MIPS patch and the testdev backend used by the
ARM kvm-unit-tests. icount include the first part of reverse execution
and Sebastian Tanase's patches to slow down -icount execution to the
desired speed of the target.
v1->v2: fix dump_drift_info to print nothing outside icount mode,
and to compile on 32-bit architectures
# gpg: Signature made Thu 07 Aug 2014 14:09:58 BST using RSA key ID 9B4D86F2
# gpg: Good signature from "Paolo Bonzini <pbonzini@redhat.com>"
# gpg: aka "Paolo Bonzini <bonzini@gnu.org>"
* remotes/bonzini/tags/for-upstream:
target-mips: Ignore unassigned accesses with KVM
monitor: Add drift info to 'info jit'
cpu-exec: Print to console if the guest is late
cpu-exec: Add sleeping algorithm
icount: Add align option to icount
icount: Add QemuOpts for icount
icount: Fix virtual clock start value on ARM
timer: add cpu_icount_to_ns function.
migration: migrate icount fields.
icount: put icount variables into TimerState.
backends: Introduce chr-testdev
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 39 |
1 files changed, 32 insertions, 7 deletions
@@ -183,6 +183,7 @@ uint8_t *boot_splash_filedata; size_t boot_splash_filedata_size; uint8_t qemu_extra_params_fw[2]; +int icount_align_option; typedef struct FWBootEntry FWBootEntry; struct FWBootEntry { @@ -537,6 +538,23 @@ static QemuOptsList qemu_mem_opts = { }, }; +static QemuOptsList qemu_icount_opts = { + .name = "icount", + .implied_opt_name = "shift", + .merge_lists = true, + .head = QTAILQ_HEAD_INITIALIZER(qemu_icount_opts.head), + .desc = { + { + .name = "shift", + .type = QEMU_OPT_STRING, + }, { + .name = "align", + .type = QEMU_OPT_BOOL, + }, + { /* end of list */ } + }, +}; + /** * Get machine options * @@ -2908,13 +2926,12 @@ int main(int argc, char **argv, char **envp) { int i; int snapshot, linux_boot; - const char *icount_option = NULL; const char *initrd_filename; const char *kernel_filename, *kernel_cmdline; const char *boot_order; DisplayState *ds; int cyls, heads, secs, translation; - QemuOpts *hda_opts = NULL, *opts, *machine_opts; + QemuOpts *hda_opts = NULL, *opts, *machine_opts, *icount_opts = NULL; QemuOptsList *olist; int optind; const char *optarg; @@ -2979,6 +2996,7 @@ int main(int argc, char **argv, char **envp) qemu_add_opts(&qemu_msg_opts); qemu_add_opts(&qemu_name_opts); qemu_add_opts(&qemu_numa_opts); + qemu_add_opts(&qemu_icount_opts); runstate_init(); @@ -3830,7 +3848,11 @@ int main(int argc, char **argv, char **envp) } break; case QEMU_OPTION_icount: - icount_option = optarg; + icount_opts = qemu_opts_parse(qemu_find_opts("icount"), + optarg, 1); + if (!icount_opts) { + exit(1); + } break; case QEMU_OPTION_incoming: incoming = optarg; @@ -4306,11 +4328,14 @@ int main(int argc, char **argv, char **envp) qemu_spice_init(); #endif - if (icount_option && (kvm_enabled() || xen_enabled())) { - fprintf(stderr, "-icount is not allowed with kvm or xen\n"); - exit(1); + if (icount_opts) { + if (kvm_enabled() || xen_enabled()) { + fprintf(stderr, "-icount is not allowed with kvm or xen\n"); + exit(1); + } + configure_icount(icount_opts, &error_abort); + qemu_opts_del(icount_opts); } - configure_icount(icount_option); /* clean up network at qemu process termination */ atexit(&net_cleanup); |