@@ -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
@@ -108,6 +108,7 @@ static inline char *realpath(const char *path, char *resolved_path)
/* icount */
void configure_icount(QemuOpts *opts, Error **errp);
extern int use_icount;
+extern int icount_time_shift;
extern int icount_align_option;
#include "qemu/osdep.h"