summaryrefslogtreecommitdiff
path: root/stubs
diff options
context:
space:
mode:
authorJunfeng Dong <junfeng.dong@intel.com>2013-11-19 17:45:23 +0800
committerJunfeng Dong <junfeng.dong@intel.com>2013-11-19 17:45:23 +0800
commit340f06c9eaee097e626c251bf7a013350649c091 (patch)
tree107e5705050a12da68fc80a56ae37afd50a2cc94 /stubs
parent42bf3037d458a330856a0be584200c1e41c3f417 (diff)
downloadqemu-340f06c9eaee097e626c251bf7a013350649c091.tar.gz
qemu-340f06c9eaee097e626c251bf7a013350649c091.tar.bz2
qemu-340f06c9eaee097e626c251bf7a013350649c091.zip
Import upstream 1.6.0.upstream/1.6.0
Change-Id: Icf52b556470cac8677297f2ef14ded16684f7887 Signed-off-by: Junfeng Dong <junfeng.dong@intel.com>
Diffstat (limited to 'stubs')
-rw-r--r--stubs/Makefile.objs20
-rw-r--r--stubs/arch-query-cpu-def.c4
-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.c29
-rw-r--r--stubs/fd-register.c2
-rw-r--r--stubs/fdset-add-fd.c2
-rw-r--r--stubs/fdset-find-fd.c2
-rw-r--r--stubs/fdset-get-fd.c2
-rw-r--r--stubs/fdset-remove-fd.c2
-rw-r--r--stubs/gdbstub.c5
-rw-r--r--stubs/get-fd.c2
-rw-r--r--stubs/get-vm-name.c7
-rw-r--r--stubs/iothread-lock.c10
-rw-r--r--stubs/migr-blocker.c10
-rw-r--r--stubs/mon-is-qmp.c7
-rw-r--r--stubs/mon-print-filename.c6
-rw-r--r--stubs/mon-printf.c10
-rw-r--r--stubs/mon-protocol-event.c6
-rw-r--r--stubs/mon-set-error.c8
-rw-r--r--stubs/pci-drive-hot-add.c10
-rw-r--r--stubs/reset.c13
-rw-r--r--stubs/set-fd-handler.c2
-rw-r--r--stubs/slirp.c15
-rw-r--r--stubs/sysbus.c6
-rw-r--r--stubs/vm-stop.c7
-rw-r--r--stubs/vmstate.c19
29 files changed, 230 insertions, 9 deletions
diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
index 035b29a1f..f306cbada 100644
--- a/stubs/Makefile.objs
+++ b/stubs/Makefile.objs
@@ -1,8 +1,28 @@
stub-obj-y += arch-query-cpu-def.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-vm-name.o
+stub-obj-y += iothread-lock.o
+stub-obj-y += migr-blocker.o
+stub-obj-y += mon-is-qmp.o
+stub-obj-y += mon-printf.o
+stub-obj-y += mon-print-filename.o
+stub-obj-y += mon-protocol-event.o
+stub-obj-y += mon-set-error.o
+stub-obj-y += pci-drive-hot-add.o
+stub-obj-y += reset.o
stub-obj-y += set-fd-handler.o
+stub-obj-y += slirp.o
+stub-obj-y += sysbus.o
+stub-obj-y += vm-stop.o
+stub-obj-y += vmstate.o
stub-obj-$(CONFIG_WIN32) += fd-register.o
+stub-obj-y += cpus.o
diff --git a/stubs/arch-query-cpu-def.c b/stubs/arch-query-cpu-def.c
index 47b524628..fa6789598 100644
--- a/stubs/arch-query-cpu-def.c
+++ b/stubs/arch-query-cpu-def.c
@@ -1,6 +1,6 @@
#include "qemu-common.h"
-#include "arch_init.h"
-#include "qerror.h"
+#include "sysemu/arch_init.h"
+#include "qapi/qmp/qerror.h"
CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp)
{
diff --git a/stubs/clock-warp.c b/stubs/clock-warp.c
new file mode 100644
index 000000000..b64c462e7
--- /dev/null
+++ b/stubs/clock-warp.c
@@ -0,0 +1,7 @@
+#include "qemu-common.h"
+#include "qemu/timer.h"
+
+void qemu_clock_warp(QEMUClock *clock)
+{
+}
+
diff --git a/stubs/cpu-get-clock.c b/stubs/cpu-get-clock.c
new file mode 100644
index 000000000..5b34c976d
--- /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 000000000..d68585965
--- /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 000000000..8e6f06b11
--- /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 000000000..370cd96eb
--- /dev/null
+++ b/stubs/dump.c
@@ -0,0 +1,29 @@
+/*
+ * 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.h"
+#include "qapi/qmp/qerror.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
index 813b6dd7c..d0c34fd2a 100644
--- a/stubs/fd-register.c
+++ b/stubs/fd-register.c
@@ -1,5 +1,5 @@
#include "qemu-common.h"
-#include "main-loop.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
index 09fe2a839..ee1643708 100644
--- a/stubs/fdset-add-fd.c
+++ b/stubs/fdset-add-fd.c
@@ -1,5 +1,5 @@
#include "qemu-common.h"
-#include "monitor.h"
+#include "monitor/monitor.h"
int monitor_fdset_dup_fd_add(int64_t fdset_id, int dup_fd)
{
diff --git a/stubs/fdset-find-fd.c b/stubs/fdset-find-fd.c
index f82baa066..4f18344ba 100644
--- a/stubs/fdset-find-fd.c
+++ b/stubs/fdset-find-fd.c
@@ -1,5 +1,5 @@
#include "qemu-common.h"
-#include "monitor.h"
+#include "monitor/monitor.h"
int monitor_fdset_dup_fd_find(int dup_fd)
{
diff --git a/stubs/fdset-get-fd.c b/stubs/fdset-get-fd.c
index 4106cf90f..7112c155e 100644
--- a/stubs/fdset-get-fd.c
+++ b/stubs/fdset-get-fd.c
@@ -1,5 +1,5 @@
#include "qemu-common.h"
-#include "monitor.h"
+#include "monitor/monitor.h"
int monitor_fdset_get_fd(int64_t fdset_id, int flags)
{
diff --git a/stubs/fdset-remove-fd.c b/stubs/fdset-remove-fd.c
index 861b31247..b3886d9f4 100644
--- a/stubs/fdset-remove-fd.c
+++ b/stubs/fdset-remove-fd.c
@@ -1,5 +1,5 @@
#include "qemu-common.h"
-#include "monitor.h"
+#include "monitor/monitor.h"
int monitor_fdset_dup_fd_remove(int dupfd)
{
diff --git a/stubs/gdbstub.c b/stubs/gdbstub.c
new file mode 100644
index 000000000..c1dbfe7fb
--- /dev/null
+++ b/stubs/gdbstub.c
@@ -0,0 +1,5 @@
+#include "qemu-common.h"
+
+const char *const xml_builtin[][2] = {
+ { NULL, NULL }
+};
diff --git a/stubs/get-fd.c b/stubs/get-fd.c
index 3561ab60e..9f2c65cf0 100644
--- a/stubs/get-fd.c
+++ b/stubs/get-fd.c
@@ -1,5 +1,5 @@
#include "qemu-common.h"
-#include "monitor.h"
+#include "monitor/monitor.h"
int monitor_get_fd(Monitor *mon, const char *name, Error **errp)
{
diff --git a/stubs/get-vm-name.c b/stubs/get-vm-name.c
new file mode 100644
index 000000000..e5f619ffa
--- /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 000000000..5d8aca1b3
--- /dev/null
+++ b/stubs/iothread-lock.c
@@ -0,0 +1,10 @@
+#include "qemu-common.h"
+#include "qemu/main-loop.h"
+
+void qemu_mutex_lock_iothread(void)
+{
+}
+
+void qemu_mutex_unlock_iothread(void)
+{
+}
diff --git a/stubs/migr-blocker.c b/stubs/migr-blocker.c
new file mode 100644
index 000000000..300df6e20
--- /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 000000000..1f0a8fd98
--- /dev/null
+++ b/stubs/mon-is-qmp.c
@@ -0,0 +1,7 @@
+#include "qemu-common.h"
+#include "monitor/monitor.h"
+
+int monitor_cur_is_qmp(void)
+{
+ return 0;
+}
diff --git a/stubs/mon-print-filename.c b/stubs/mon-print-filename.c
new file mode 100644
index 000000000..9c939641f
--- /dev/null
+++ b/stubs/mon-print-filename.c
@@ -0,0 +1,6 @@
+#include "qemu-common.h"
+#include "monitor/monitor.h"
+
+void monitor_print_filename(Monitor *mon, const char *filename)
+{
+}
diff --git a/stubs/mon-printf.c b/stubs/mon-printf.c
new file mode 100644
index 000000000..0ce2ca692
--- /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/mon-protocol-event.c b/stubs/mon-protocol-event.c
new file mode 100644
index 000000000..0946e9472
--- /dev/null
+++ b/stubs/mon-protocol-event.c
@@ -0,0 +1,6 @@
+#include "qemu-common.h"
+#include "monitor/monitor.h"
+
+void monitor_protocol_event(MonitorEvent event, QObject *data)
+{
+}
diff --git a/stubs/mon-set-error.c b/stubs/mon-set-error.c
new file mode 100644
index 000000000..d0411f97f
--- /dev/null
+++ b/stubs/mon-set-error.c
@@ -0,0 +1,8 @@
+#include "qemu-common.h"
+#include "monitor/monitor.h"
+
+Monitor *cur_mon;
+
+void monitor_set_error(Monitor *mon, QError *qerror)
+{
+}
diff --git a/stubs/pci-drive-hot-add.c b/stubs/pci-drive-hot-add.c
new file mode 100644
index 000000000..1d9814580
--- /dev/null
+++ b/stubs/pci-drive-hot-add.c
@@ -0,0 +1,10 @@
+#include <monitor/monitor.h>
+#include <sysemu/sysemu.h>
+#include <sysemu/blockdev.h>
+
+int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo)
+{
+ /* On non-x86 we don't do PCI hotplug */
+ monitor_printf(mon, "Can't hot-add drive to type %d\n", dinfo->type);
+ return -1;
+}
diff --git a/stubs/reset.c b/stubs/reset.c
new file mode 100644
index 000000000..ad287251e
--- /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/set-fd-handler.c b/stubs/set-fd-handler.c
index 4807b5dc2..fc874d33f 100644
--- a/stubs/set-fd-handler.c
+++ b/stubs/set-fd-handler.c
@@ -1,5 +1,5 @@
#include "qemu-common.h"
-#include "main-loop.h"
+#include "qemu/main-loop.h"
int qemu_set_fd_handler2(int fd,
IOCanReadHandler *fd_read_poll,
diff --git a/stubs/slirp.c b/stubs/slirp.c
new file mode 100644
index 000000000..f1fc833f7
--- /dev/null
+++ b/stubs/slirp.c
@@ -0,0 +1,15 @@
+#include "qemu-common.h"
+#include "slirp/slirp.h"
+
+void slirp_update_timeout(uint32_t *timeout)
+{
+}
+
+void slirp_pollfds_fill(GArray *pollfds)
+{
+}
+
+void slirp_pollfds_poll(GArray *pollfds, int select_error)
+{
+}
+
diff --git a/stubs/sysbus.c b/stubs/sysbus.c
new file mode 100644
index 000000000..e13496582
--- /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/vm-stop.c b/stubs/vm-stop.c
new file mode 100644
index 000000000..f82c897df
--- /dev/null
+++ b/stubs/vm-stop.c
@@ -0,0 +1,7 @@
+#include "qemu-common.h"
+#include "sysemu/sysemu.h"
+
+int vm_stop(RunState state)
+{
+ abort();
+}
diff --git a/stubs/vmstate.c b/stubs/vmstate.c
new file mode 100644
index 000000000..778bc3fc6
--- /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)
+{
+}