@@ -11,9 +11,13 @@ void pause_all_vcpus(void);
void cpu_stop_current(void);
void cpu_ticks_init(void);
+#if !defined(CONFIG_USER_ONLY)
void configure_icount(QemuOpts *opts, Error **errp);
extern int use_icount;
extern int icount_align_option;
+#else
+#define use_icount false
+#endif
/* drift information for info jit command */
extern int64_t max_delay;
@@ -102,10 +102,6 @@ uintptr_t qemu_host_page_size;
intptr_t qemu_host_page_mask;
#if !defined(CONFIG_USER_ONLY)
-/* 0 = Do not count executed instructions.
- 1 = Precise instruction counting.
- 2 = Adaptive rate instruction counting. */
-int use_icount;
typedef struct PhysPageEntry PhysPageEntry;
@@ -81,6 +81,13 @@
#endif /* CONFIG_LINUX */
+/*
+ * 0 = Do not count executed instructions.
+ * 1 = Precise instruction counting.
+ * 2 = Adaptive rate instruction counting.
+ */
+int use_icount;
+
static QemuMutex qemu_global_mutex;
int64_t max_delay;
'icount' feature is only meaningful when using softmmu. Move it out of the globally used exec.c, and define it as 'false' in user-mode emulation. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- include/sysemu/cpus.h | 4 ++++ exec.c | 4 ---- softmmu/cpus.c | 7 +++++++ 3 files changed, 11 insertions(+), 4 deletions(-)