-#ifndef SYSEMU_REPLAY_H
-#define SYSEMU_REPLAY_H
-
/*
* QEMU replay (system interface)
*
* 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"
int64_t replay_read_clock(ReplayClockKind kind, int64_t raw_icount);
/*! Saves or reads the clock depending on the current replay mode. */
#define REPLAY_CLOCK(clock, value) \
+ !icount_enabled() ? (value) : \
(replay_mode == REPLAY_MODE_PLAY \
? replay_read_clock((clock), icount_get_raw()) \
: replay_mode == REPLAY_MODE_RECORD \
? replay_save_clock((clock), (value), icount_get_raw()) \
: (value))
#define REPLAY_CLOCK_LOCKED(clock, value) \
+ !icount_enabled() ? (value) : \
(replay_mode == REPLAY_MODE_PLAY \
? replay_read_clock((clock), icount_get_raw_locked()) \
: replay_mode == REPLAY_MODE_RECORD \
ICountMode use_icount = ICOUNT_DISABLED;
-void icount_update(CPUState *cpu)
-{
- abort();
-}
bool icount_configure(QemuOpts *opts, Error **errp)
{
/* signal error */
abort();
return 0;
}
-int64_t icount_get(void)
-{
- abort();
- return 0;
-}
-int64_t icount_to_ns(int64_t icount)
-{
- abort();
- return 0;
-}
-int64_t icount_round(int64_t count)
-{
- abort();
- return 0;
-}
void icount_start_warp_timer(void)
{
abort();