aboutsummaryrefslogtreecommitdiffstats
path: root/stubs
diff options
context:
space:
mode:
authorfishsoupisgood <github@madingley.org>2019-04-29 01:17:54 +0100
committerfishsoupisgood <github@madingley.org>2019-05-27 03:43:43 +0100
commit3f2546b2ef55b661fd8dd69682b38992225e86f6 (patch)
tree65ca85f13617aee1dce474596800950f266a456c /stubs
downloadqemu-master.tar.gz
qemu-master.tar.bz2
qemu-master.zip
Initial import of qemu-2.4.1HEADmaster
Diffstat (limited to 'stubs')
-rw-r--r--stubs/Makefile.objs40
-rw-r--r--stubs/arch-query-cpu-def.c9
-rw-r--r--stubs/bdrv-commit-all.c7
-rw-r--r--stubs/chr-baum-init.c7
-rw-r--r--stubs/chr-msmouse.c7
-rw-r--r--stubs/chr-testdev.c7
-rw-r--r--stubs/clock-warp.c7
-rw-r--r--stubs/cpu-get-clock.c7
-rw-r--r--stubs/cpu-get-icount.c9
-rw-r--r--stubs/cpus.c10
-rw-r--r--stubs/dump.c28
-rw-r--r--stubs/fd-register.c6
-rw-r--r--stubs/fdset-add-fd.c7
-rw-r--r--stubs/fdset-find-fd.c7
-rw-r--r--stubs/fdset-get-fd.c7
-rw-r--r--stubs/fdset-remove-fd.c6
-rw-r--r--stubs/gdbstub.c7
-rw-r--r--stubs/get-fd.c8
-rw-r--r--stubs/get-next-serial.c3
-rw-r--r--stubs/get-vm-name.c7
-rw-r--r--stubs/iothread-lock.c15
-rw-r--r--stubs/is-daemonized.c9
-rw-r--r--stubs/kvm.c7
-rw-r--r--stubs/machine-init-done.c6
-rw-r--r--stubs/migr-blocker.c10
-rw-r--r--stubs/mon-is-qmp.c9
-rw-r--r--stubs/mon-printf.c10
-rw-r--r--stubs/monitor-init.c6
-rw-r--r--stubs/notify-event.c6
-rw-r--r--stubs/qemu-chr-open-spice.c14
-rw-r--r--stubs/qmp_pc_dimm_device_list.c12
-rw-r--r--stubs/qtest.c14
-rw-r--r--stubs/reset.c13
-rw-r--r--stubs/runstate-check.c6
-rw-r--r--stubs/set-fd-handler.c10
-rw-r--r--stubs/slirp.c11
-rw-r--r--stubs/sysbus.c6
-rw-r--r--stubs/uuid.c12
-rw-r--r--stubs/vc-init.c7
-rw-r--r--stubs/vm-stop.c12
-rw-r--r--stubs/vmstate.c19
41 files changed, 410 insertions, 0 deletions
diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
new file mode 100644
index 00000000..9937a129
--- /dev/null
+++ b/stubs/Makefile.objs
@@ -0,0 +1,40 @@
+stub-obj-y += arch-query-cpu-def.o
+stub-obj-y += bdrv-commit-all.o
+stub-obj-y += chr-baum-init.o
+stub-obj-y += chr-msmouse.o
+stub-obj-y += chr-testdev.o
+stub-obj-y += clock-warp.o
+stub-obj-y += cpu-get-clock.o
+stub-obj-y += cpu-get-icount.o
+stub-obj-y += dump.o
+stub-obj-y += fdset-add-fd.o
+stub-obj-y += fdset-find-fd.o
+stub-obj-y += fdset-get-fd.o
+stub-obj-y += fdset-remove-fd.o
+stub-obj-y += gdbstub.o
+stub-obj-y += get-fd.o
+stub-obj-y += get-next-serial.o
+stub-obj-y += get-vm-name.o
+stub-obj-y += iothread-lock.o
+stub-obj-y += is-daemonized.o
+stub-obj-y += machine-init-done.o
+stub-obj-y += migr-blocker.o
+stub-obj-y += mon-is-qmp.o
+stub-obj-y += mon-printf.o
+stub-obj-y += monitor-init.o
+stub-obj-y += notify-event.o
+stub-obj-$(CONFIG_SPICE) += qemu-chr-open-spice.o
+stub-obj-y += qtest.o
+stub-obj-y += reset.o
+stub-obj-y += runstate-check.o
+stub-obj-y += set-fd-handler.o
+stub-obj-y += slirp.o
+stub-obj-y += sysbus.o
+stub-obj-y += uuid.o
+stub-obj-y += vc-init.o
+stub-obj-y += vm-stop.o
+stub-obj-y += vmstate.o
+stub-obj-$(CONFIG_WIN32) += fd-register.o
+stub-obj-y += cpus.o
+stub-obj-y += kvm.o
+stub-obj-y += qmp_pc_dimm_device_list.o
diff --git a/stubs/arch-query-cpu-def.c b/stubs/arch-query-cpu-def.c
new file mode 100644
index 00000000..a975ab45
--- /dev/null
+++ b/stubs/arch-query-cpu-def.c
@@ -0,0 +1,9 @@
+#include "qemu-common.h"
+#include "sysemu/arch_init.h"
+#include "qapi/qmp/qerror.h"
+
+CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp)
+{
+ error_setg(errp, QERR_UNSUPPORTED);
+ return NULL;
+}
diff --git a/stubs/bdrv-commit-all.c b/stubs/bdrv-commit-all.c
new file mode 100644
index 00000000..a8e0a954
--- /dev/null
+++ b/stubs/bdrv-commit-all.c
@@ -0,0 +1,7 @@
+#include "qemu-common.h"
+#include "block/block.h"
+
+int bdrv_commit_all(void)
+{
+ return 0;
+}
diff --git a/stubs/chr-baum-init.c b/stubs/chr-baum-init.c
new file mode 100644
index 00000000..f5cc6ce1
--- /dev/null
+++ b/stubs/chr-baum-init.c
@@ -0,0 +1,7 @@
+#include "qemu-common.h"
+#include "sysemu/char.h"
+
+CharDriverState *chr_baum_init(void)
+{
+ return NULL;
+}
diff --git a/stubs/chr-msmouse.c b/stubs/chr-msmouse.c
new file mode 100644
index 00000000..812f8b0a
--- /dev/null
+++ b/stubs/chr-msmouse.c
@@ -0,0 +1,7 @@
+#include "qemu-common.h"
+#include "sysemu/char.h"
+
+CharDriverState *qemu_chr_open_msmouse(void)
+{
+ return 0;
+}
diff --git a/stubs/chr-testdev.c b/stubs/chr-testdev.c
new file mode 100644
index 00000000..23112a2c
--- /dev/null
+++ b/stubs/chr-testdev.c
@@ -0,0 +1,7 @@
+#include "qemu-common.h"
+#include "sysemu/char.h"
+
+CharDriverState *chr_testdev_init(void)
+{
+ return 0;
+}
diff --git a/stubs/clock-warp.c b/stubs/clock-warp.c
new file mode 100644
index 00000000..5565118d
--- /dev/null
+++ b/stubs/clock-warp.c
@@ -0,0 +1,7 @@
+#include "qemu-common.h"
+#include "qemu/timer.h"
+
+void qemu_clock_warp(QEMUClockType type)
+{
+}
+
diff --git a/stubs/cpu-get-clock.c b/stubs/cpu-get-clock.c
new file mode 100644
index 00000000..5b34c976
--- /dev/null
+++ b/stubs/cpu-get-clock.c
@@ -0,0 +1,7 @@
+#include "qemu-common.h"
+#include "qemu/timer.h"
+
+int64_t cpu_get_clock(void)
+{
+ return get_clock_realtime();
+}
diff --git a/stubs/cpu-get-icount.c b/stubs/cpu-get-icount.c
new file mode 100644
index 00000000..d6858596
--- /dev/null
+++ b/stubs/cpu-get-icount.c
@@ -0,0 +1,9 @@
+#include "qemu-common.h"
+#include "qemu/timer.h"
+
+int use_icount;
+
+int64_t cpu_get_icount(void)
+{
+ abort();
+}
diff --git a/stubs/cpus.c b/stubs/cpus.c
new file mode 100644
index 00000000..8e6f06b1
--- /dev/null
+++ b/stubs/cpus.c
@@ -0,0 +1,10 @@
+#include "qemu-common.h"
+#include "qom/cpu.h"
+
+void cpu_resume(CPUState *cpu)
+{
+}
+
+void qemu_init_vcpu(CPUState *cpu)
+{
+}
diff --git a/stubs/dump.c b/stubs/dump.c
new file mode 100644
index 00000000..8c24eda8
--- /dev/null
+++ b/stubs/dump.c
@@ -0,0 +1,28 @@
+/*
+ * QEMU dump
+ *
+ * Copyright Fujitsu, Corp. 2011, 2012
+ *
+ * Authors:
+ * Wen Congyang <wency@cn.fujitsu.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#include "qemu-common.h"
+#include "sysemu/dump-arch.h"
+#include "qmp-commands.h"
+
+int cpu_get_dump_info(ArchDumpInfo *info,
+ const struct GuestPhysBlockList *guest_phys_blocks)
+{
+ return -1;
+}
+
+ssize_t cpu_get_note_size(int class, int machine, int nr_cpus)
+{
+ return -1;
+}
+
diff --git a/stubs/fd-register.c b/stubs/fd-register.c
new file mode 100644
index 00000000..d0c34fd2
--- /dev/null
+++ b/stubs/fd-register.c
@@ -0,0 +1,6 @@
+#include "qemu-common.h"
+#include "qemu/main-loop.h"
+
+void qemu_fd_register(int fd)
+{
+}
diff --git a/stubs/fdset-add-fd.c b/stubs/fdset-add-fd.c
new file mode 100644
index 00000000..ee164370
--- /dev/null
+++ b/stubs/fdset-add-fd.c
@@ -0,0 +1,7 @@
+#include "qemu-common.h"
+#include "monitor/monitor.h"
+
+int monitor_fdset_dup_fd_add(int64_t fdset_id, int dup_fd)
+{
+ return -1;
+}
diff --git a/stubs/fdset-find-fd.c b/stubs/fdset-find-fd.c
new file mode 100644
index 00000000..4f18344b
--- /dev/null
+++ b/stubs/fdset-find-fd.c
@@ -0,0 +1,7 @@
+#include "qemu-common.h"
+#include "monitor/monitor.h"
+
+int monitor_fdset_dup_fd_find(int dup_fd)
+{
+ return -1;
+}
diff --git a/stubs/fdset-get-fd.c b/stubs/fdset-get-fd.c
new file mode 100644
index 00000000..7112c155
--- /dev/null
+++ b/stubs/fdset-get-fd.c
@@ -0,0 +1,7 @@
+#include "qemu-common.h"
+#include "monitor/monitor.h"
+
+int monitor_fdset_get_fd(int64_t fdset_id, int flags)
+{
+ return -1;
+}
diff --git a/stubs/fdset-remove-fd.c b/stubs/fdset-remove-fd.c
new file mode 100644
index 00000000..7f6d61e6
--- /dev/null
+++ b/stubs/fdset-remove-fd.c
@@ -0,0 +1,6 @@
+#include "qemu-common.h"
+#include "monitor/monitor.h"
+
+void monitor_fdset_dup_fd_remove(int dupfd)
+{
+}
diff --git a/stubs/gdbstub.c b/stubs/gdbstub.c
new file mode 100644
index 00000000..f6a4553a
--- /dev/null
+++ b/stubs/gdbstub.c
@@ -0,0 +1,7 @@
+#include "stdbool.h" /* bool (in exec/gdbstub.h) */
+#include "stddef.h" /* NULL */
+#include "exec/gdbstub.h" /* xml_builtin */
+
+const char *const xml_builtin[][2] = {
+ { NULL, NULL }
+};
diff --git a/stubs/get-fd.c b/stubs/get-fd.c
new file mode 100644
index 00000000..9f2c65cf
--- /dev/null
+++ b/stubs/get-fd.c
@@ -0,0 +1,8 @@
+#include "qemu-common.h"
+#include "monitor/monitor.h"
+
+int monitor_get_fd(Monitor *mon, const char *name, Error **errp)
+{
+ error_setg(errp, "only QEMU supports file descriptor passing");
+ return -1;
+}
diff --git a/stubs/get-next-serial.c b/stubs/get-next-serial.c
new file mode 100644
index 00000000..40c56d13
--- /dev/null
+++ b/stubs/get-next-serial.c
@@ -0,0 +1,3 @@
+#include "qemu-common.h"
+
+CharDriverState *serial_hds[0];
diff --git a/stubs/get-vm-name.c b/stubs/get-vm-name.c
new file mode 100644
index 00000000..e5f619ff
--- /dev/null
+++ b/stubs/get-vm-name.c
@@ -0,0 +1,7 @@
+#include "qemu-common.h"
+
+const char *qemu_get_vm_name(void)
+{
+ return NULL;
+}
+
diff --git a/stubs/iothread-lock.c b/stubs/iothread-lock.c
new file mode 100644
index 00000000..dda6f6b5
--- /dev/null
+++ b/stubs/iothread-lock.c
@@ -0,0 +1,15 @@
+#include "qemu-common.h"
+#include "qemu/main-loop.h"
+
+bool qemu_mutex_iothread_locked(void)
+{
+ return true;
+}
+
+void qemu_mutex_lock_iothread(void)
+{
+}
+
+void qemu_mutex_unlock_iothread(void)
+{
+}
diff --git a/stubs/is-daemonized.c b/stubs/is-daemonized.c
new file mode 100644
index 00000000..c0ee9171
--- /dev/null
+++ b/stubs/is-daemonized.c
@@ -0,0 +1,9 @@
+#include "qemu-common.h"
+
+/* Win32 has its own inline stub */
+#ifndef _WIN32
+bool is_daemonized(void)
+{
+ return false;
+}
+#endif
diff --git a/stubs/kvm.c b/stubs/kvm.c
new file mode 100644
index 00000000..e7c60b6e
--- /dev/null
+++ b/stubs/kvm.c
@@ -0,0 +1,7 @@
+#include "qemu-common.h"
+#include "sysemu/kvm.h"
+
+int kvm_arch_irqchip_create(KVMState *s)
+{
+ return 0;
+}
diff --git a/stubs/machine-init-done.c b/stubs/machine-init-done.c
new file mode 100644
index 00000000..28a92555
--- /dev/null
+++ b/stubs/machine-init-done.c
@@ -0,0 +1,6 @@
+#include "qemu-common.h"
+#include "sysemu/sysemu.h"
+
+void qemu_add_machine_init_done_notifier(Notifier *notify)
+{
+}
diff --git a/stubs/migr-blocker.c b/stubs/migr-blocker.c
new file mode 100644
index 00000000..300df6e2
--- /dev/null
+++ b/stubs/migr-blocker.c
@@ -0,0 +1,10 @@
+#include "qemu-common.h"
+#include "migration/migration.h"
+
+void migrate_add_blocker(Error *reason)
+{
+}
+
+void migrate_del_blocker(Error *reason)
+{
+}
diff --git a/stubs/mon-is-qmp.c b/stubs/mon-is-qmp.c
new file mode 100644
index 00000000..dd26f19c
--- /dev/null
+++ b/stubs/mon-is-qmp.c
@@ -0,0 +1,9 @@
+#include "qemu-common.h"
+#include "monitor/monitor.h"
+
+Monitor *cur_mon;
+
+bool monitor_cur_is_qmp(void)
+{
+ return false;
+}
diff --git a/stubs/mon-printf.c b/stubs/mon-printf.c
new file mode 100644
index 00000000..0ce2ca69
--- /dev/null
+++ b/stubs/mon-printf.c
@@ -0,0 +1,10 @@
+#include "qemu-common.h"
+#include "monitor/monitor.h"
+
+void monitor_printf(Monitor *mon, const char *fmt, ...)
+{
+}
+
+void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap)
+{
+}
diff --git a/stubs/monitor-init.c b/stubs/monitor-init.c
new file mode 100644
index 00000000..563902b4
--- /dev/null
+++ b/stubs/monitor-init.c
@@ -0,0 +1,6 @@
+#include "qemu-common.h"
+#include "monitor/monitor.h"
+
+void monitor_init(CharDriverState *chr, int flags)
+{
+}
diff --git a/stubs/notify-event.c b/stubs/notify-event.c
new file mode 100644
index 00000000..32f7289d
--- /dev/null
+++ b/stubs/notify-event.c
@@ -0,0 +1,6 @@
+#include "qemu-common.h"
+#include "qemu/main-loop.h"
+
+void qemu_notify_event(void)
+{
+}
diff --git a/stubs/qemu-chr-open-spice.c b/stubs/qemu-chr-open-spice.c
new file mode 100644
index 00000000..f1c4849d
--- /dev/null
+++ b/stubs/qemu-chr-open-spice.c
@@ -0,0 +1,14 @@
+#include "qemu-common.h"
+#include "ui/qemu-spice.h"
+
+CharDriverState *qemu_chr_open_spice_vmc(const char *type)
+{
+ return NULL;
+}
+
+#if SPICE_SERVER_VERSION >= 0x000c02
+CharDriverState *qemu_chr_open_spice_port(const char *name)
+{
+ return NULL;
+}
+#endif
diff --git a/stubs/qmp_pc_dimm_device_list.c b/stubs/qmp_pc_dimm_device_list.c
new file mode 100644
index 00000000..b584bd8b
--- /dev/null
+++ b/stubs/qmp_pc_dimm_device_list.c
@@ -0,0 +1,12 @@
+#include "qom/object.h"
+#include "hw/mem/pc-dimm.h"
+
+int qmp_pc_dimm_device_list(Object *obj, void *opaque)
+{
+ return 0;
+}
+
+ram_addr_t get_current_ram_size(void)
+{
+ return ram_size;
+}
diff --git a/stubs/qtest.c b/stubs/qtest.c
new file mode 100644
index 00000000..dc17594b
--- /dev/null
+++ b/stubs/qtest.c
@@ -0,0 +1,14 @@
+/*
+ * qtest stubs
+ *
+ * Copyright (c) 2014 Linaro Limited
+ * Written by Peter Maydell
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include "sysemu/qtest.h"
+
+/* Needed for qtest_allowed() */
+bool qtest_allowed;
diff --git a/stubs/reset.c b/stubs/reset.c
new file mode 100644
index 00000000..ad287251
--- /dev/null
+++ b/stubs/reset.c
@@ -0,0 +1,13 @@
+#include "hw/hw.h"
+
+/* Stub functions for binaries that never call qemu_devices_reset(),
+ * and don't need to keep track of the reset handler list.
+ */
+
+void qemu_register_reset(QEMUResetHandler *func, void *opaque)
+{
+}
+
+void qemu_unregister_reset(QEMUResetHandler *func, void *opaque)
+{
+}
diff --git a/stubs/runstate-check.c b/stubs/runstate-check.c
new file mode 100644
index 00000000..bd2e3757
--- /dev/null
+++ b/stubs/runstate-check.c
@@ -0,0 +1,6 @@
+#include "sysemu/sysemu.h"
+
+bool runstate_check(RunState state)
+{
+ return state == RUN_STATE_PRELAUNCH;
+}
diff --git a/stubs/set-fd-handler.c b/stubs/set-fd-handler.c
new file mode 100644
index 00000000..a8481bc3
--- /dev/null
+++ b/stubs/set-fd-handler.c
@@ -0,0 +1,10 @@
+#include "qemu-common.h"
+#include "qemu/main-loop.h"
+
+void qemu_set_fd_handler(int fd,
+ IOHandler *fd_read,
+ IOHandler *fd_write,
+ void *opaque)
+{
+ abort();
+}
diff --git a/stubs/slirp.c b/stubs/slirp.c
new file mode 100644
index 00000000..bd0ac7f2
--- /dev/null
+++ b/stubs/slirp.c
@@ -0,0 +1,11 @@
+#include "qemu-common.h"
+#include "slirp/slirp.h"
+
+void slirp_pollfds_fill(GArray *pollfds, uint32_t *timeout)
+{
+}
+
+void slirp_pollfds_poll(GArray *pollfds, int select_error)
+{
+}
+
diff --git a/stubs/sysbus.c b/stubs/sysbus.c
new file mode 100644
index 00000000..e1349658
--- /dev/null
+++ b/stubs/sysbus.c
@@ -0,0 +1,6 @@
+#include "hw/qdev-core.h"
+
+BusState *sysbus_get_default(void)
+{
+ return NULL;
+}
diff --git a/stubs/uuid.c b/stubs/uuid.c
new file mode 100644
index 00000000..ffc0ed40
--- /dev/null
+++ b/stubs/uuid.c
@@ -0,0 +1,12 @@
+#include "qemu-common.h"
+#include "sysemu/sysemu.h"
+#include "qmp-commands.h"
+
+UuidInfo *qmp_query_uuid(Error **errp)
+{
+ UuidInfo *info = g_malloc0(sizeof(*info));
+
+ info->UUID = g_strdup(UUID_NONE);
+ return info;
+}
+
diff --git a/stubs/vc-init.c b/stubs/vc-init.c
new file mode 100644
index 00000000..308dfa08
--- /dev/null
+++ b/stubs/vc-init.c
@@ -0,0 +1,7 @@
+#include "qemu-common.h"
+#include "sysemu/char.h"
+
+CharDriverState *vc_init(ChardevVC *vc)
+{
+ return 0;
+}
diff --git a/stubs/vm-stop.c b/stubs/vm-stop.c
new file mode 100644
index 00000000..69fd86b2
--- /dev/null
+++ b/stubs/vm-stop.c
@@ -0,0 +1,12 @@
+#include "qemu-common.h"
+#include "sysemu/sysemu.h"
+
+void qemu_system_vmstop_request_prepare(void)
+{
+ abort();
+}
+
+void qemu_system_vmstop_request(RunState state)
+{
+ abort();
+}
diff --git a/stubs/vmstate.c b/stubs/vmstate.c
new file mode 100644
index 00000000..778bc3fc
--- /dev/null
+++ b/stubs/vmstate.c
@@ -0,0 +1,19 @@
+#include "qemu-common.h"
+#include "migration/vmstate.h"
+
+const VMStateDescription vmstate_dummy = {};
+
+int vmstate_register_with_alias_id(DeviceState *dev,
+ int instance_id,
+ const VMStateDescription *vmsd,
+ void *base, int alias_id,
+ int required_for_version)
+{
+ return 0;
+}
+
+void vmstate_unregister(DeviceState *dev,
+ const VMStateDescription *vmsd,
+ void *opaque)
+{
+}