Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/sysemu/cpu-timers.h | 2 +-
include/sysemu/replay.h | 9 ++++++---
stubs/icount.c | 19 -------------------
3 files changed, 7 insertions(+), 23 deletions(-)
diff --git a/include/sysemu/cpu-timers.h b/include/sysemu/cpu-timers.h
index 2e786fe7fb..188f67ee90 100644
--- a/include/sysemu/cpu-timers.h
+++ b/include/sysemu/cpu-timers.h
@@ -24,7 +24,7 @@ void cpu_timers_init(void);
* 1 = Enabled - Fixed conversion of insn to ns via "shift" option
* 2 = Enabled - Runtime adaptive algorithm to compute shift
*/
-#ifdef CONFIG_TCG
+#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
extern int use_icount;
#define icount_enabled() (use_icount)
#else
diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h
index 02fa75c783..8102fa54f0 100644
--- a/include/sysemu/replay.h
+++ b/include/sysemu/replay.h
@@ -1,6 +1,3 @@
-#ifndef SYSEMU_REPLAY_H
-#define SYSEMU_REPLAY_H
-
/*
* QEMU replay (system interface)
*
@@ -11,6 +8,12 @@
* See the COPYING file in the top-level directory.
*
*/
+#ifndef SYSEMU_REPLAY_H
+#define SYSEMU_REPLAY_H
+
+#ifdef CONFIG_USER_ONLY
+#error Cannot include this header from user emulation
+#endif
#include "exec/replay-core.h"
#include "qapi/qapi-types-misc.h"
diff --git a/stubs/icount.c b/stubs/icount.c
index c39a65da92..ec8d150069 100644
--- a/stubs/icount.c
+++ b/stubs/icount.c
@@ -5,30 +5,11 @@
int use_icount;
-void icount_update(CPUState *cpu)
-{
- abort();
-}
int64_t icount_get_raw(void)
{
abort();
return 0;
}
-int64_t icount_get(void)
-{
- abort();
- return 0;
-}
-int64_t icount_to_ns(int64_t icount)
-{
- abort();
- return 0;
-}