aboutsummaryrefslogtreecommitdiff
path: root/stubs
diff options
context:
space:
mode:
Diffstat (limited to 'stubs')
-rw-r--r--stubs/clock-warp.c7
-rw-r--r--stubs/cpu-get-clock.c3
-rw-r--r--stubs/cpu-get-icount.c16
-rw-r--r--stubs/icount.c45
-rw-r--r--stubs/meson.build4
-rw-r--r--stubs/qemu-timer-notify-cb.c2
-rw-r--r--stubs/qtest.c5
7 files changed, 55 insertions, 27 deletions
diff --git a/stubs/clock-warp.c b/stubs/clock-warp.c
deleted file mode 100644
index b53e5dd94c..0000000000
--- a/stubs/clock-warp.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "qemu/osdep.h"
-#include "qemu/timer.h"
-
-void qemu_start_warp_timer(void)
-{
-}
-
diff --git a/stubs/cpu-get-clock.c b/stubs/cpu-get-clock.c
index 5a92810e87..9e92404816 100644
--- a/stubs/cpu-get-clock.c
+++ b/stubs/cpu-get-clock.c
@@ -1,5 +1,6 @@
#include "qemu/osdep.h"
-#include "qemu/timer.h"
+#include "sysemu/cpu-timers.h"
+#include "qemu/main-loop.h"
int64_t cpu_get_clock(void)
{
diff --git a/stubs/cpu-get-icount.c b/stubs/cpu-get-icount.c
deleted file mode 100644
index 4001613240..0000000000
--- a/stubs/cpu-get-icount.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "qemu/osdep.h"
-#include "qemu/timer.h"
-#include "sysemu/cpus.h"
-#include "qemu/main-loop.h"
-
-int use_icount;
-
-int64_t cpu_get_icount(void)
-{
- abort();
-}
-
-int64_t cpu_get_icount_raw(void)
-{
- abort();
-}
diff --git a/stubs/icount.c b/stubs/icount.c
new file mode 100644
index 0000000000..61e28cbaf9
--- /dev/null
+++ b/stubs/icount.c
@@ -0,0 +1,45 @@
+#include "qemu/osdep.h"
+#include "qapi/error.h"
+#include "sysemu/cpu-timers.h"
+
+/* icount - Instruction Counter API */
+
+int use_icount;
+
+void cpu_update_icount(CPUState *cpu)
+{
+ abort();
+}
+void configure_icount(QemuOpts *opts, Error **errp)
+{
+ /* signal error */
+ error_setg(errp, "cannot configure icount, TCG support not available");
+}
+int64_t cpu_get_icount_raw(void)
+{
+ abort();
+ return 0;
+}
+int64_t cpu_get_icount(void)
+{
+ abort();
+ return 0;
+}
+int64_t cpu_icount_to_ns(int64_t icount)
+{
+ abort();
+ return 0;
+}
+int64_t qemu_icount_round(int64_t count)
+{
+ abort();
+ return 0;
+}
+void qemu_start_warp_timer(void)
+{
+ abort();
+}
+void qemu_account_warp_timer(void)
+{
+ abort();
+}
diff --git a/stubs/meson.build b/stubs/meson.build
index 5730f1d967..cbd955a7cd 100644
--- a/stubs/meson.build
+++ b/stubs/meson.build
@@ -3,10 +3,10 @@ stub_ss.add(files('bdrv-next-monitor-owned.c'))
stub_ss.add(files('blk-commit-all.c'))
stub_ss.add(files('blockdev-close-all-bdrv-states.c'))
stub_ss.add(files('change-state-handler.c'))
-stub_ss.add(files('clock-warp.c'))
stub_ss.add(files('cmos.c'))
stub_ss.add(files('cpu-get-clock.c'))
-stub_ss.add(files('cpu-get-icount.c'))
+stub_ss.add(files('qemu-timer-notify-cb.c'))
+stub_ss.add(files('icount.c'))
stub_ss.add(files('dump.c'))
stub_ss.add(files('error-printf.c'))
stub_ss.add(files('fdset.c'))
diff --git a/stubs/qemu-timer-notify-cb.c b/stubs/qemu-timer-notify-cb.c
index 054b408b1c..845e46f8e0 100644
--- a/stubs/qemu-timer-notify-cb.c
+++ b/stubs/qemu-timer-notify-cb.c
@@ -1,5 +1,5 @@
#include "qemu/osdep.h"
-#include "sysemu/cpus.h"
+#include "sysemu/cpu-timers.h"
#include "qemu/main-loop.h"
void qemu_timer_notify_cb(void *opaque, QEMUClockType type)
diff --git a/stubs/qtest.c b/stubs/qtest.c
index 891eb954fb..4666a49d7d 100644
--- a/stubs/qtest.c
+++ b/stubs/qtest.c
@@ -18,3 +18,8 @@ bool qtest_driver(void)
{
return false;
}
+
+int64_t qtest_get_virtual_clock(void)
+{
+ return 0;
+}