icount_time_shift is used for calculting the delay qemu has to sleep in order to synchronise the host and guest clocks. Therefore, we need it in cpu-exec.c.
Signed-off-by: Sebastian Tanase <sebastian.tan...@openwide.fr> Tested-by: Camille Bégué <camille.be...@openwide.fr> --- cpus.c | 10 ++++++++-- include/qemu-common.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index dd7ac13..107ffa0 100644 --- a/cpus.c +++ b/cpus.c @@ -103,8 +103,12 @@ static bool all_cpu_threads_idle(void) /* Compensate for varying guest execution speed. */ static int64_t qemu_icount_bias; static int64_t vm_clock_warp_start; -/* Conversion factor from emulated instructions to virtual clock ticks. */ -static int icount_time_shift; +/* Conversion factor from emulated instructions to virtual clock ticks. + * icount_time_shift is defined as extern in include/qemu-common.h because + * it is used (in cpu-exec.c) for calculating the delay for sleeping + * qemu in order to align the host and virtual clock. + */ +int icount_time_shift; /* Arbitrarily pick 1MIPS as the minimum allowable speed. */ #define MAX_ICOUNT_SHIFT 10 @@ -454,6 +458,8 @@ void configure_icount(const char *option) return; } + /* Do not activate align with icount auto, for now */ + icount_align_option = 0; use_icount = 2; /* 125MIPS seems a reasonable initial guess at the guest speed. diff --git a/include/qemu-common.h b/include/qemu-common.h index aa65058..1d93e33 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -107,6 +107,7 @@ static inline char *realpath(const char *path, char *resolved_path) /* icount */ void configure_icount(const char *option); extern int use_icount; +extern int icount_time_shift; extern int icount_align_option; #include "qemu/osdep.h" -- 2.0.0.rc2