From 3f2546b2ef55b661fd8dd69682b38992225e86f6 Mon Sep 17 00:00:00 2001 From: fishsoupisgood Date: Mon, 29 Apr 2019 01:17:54 +0100 Subject: Initial import of qemu-2.4.1 --- stubs/Makefile.objs | 40 ++++++++++++++++++++++++++++++++++++++++ stubs/arch-query-cpu-def.c | 9 +++++++++ stubs/bdrv-commit-all.c | 7 +++++++ stubs/chr-baum-init.c | 7 +++++++ stubs/chr-msmouse.c | 7 +++++++ stubs/chr-testdev.c | 7 +++++++ stubs/clock-warp.c | 7 +++++++ stubs/cpu-get-clock.c | 7 +++++++ stubs/cpu-get-icount.c | 9 +++++++++ stubs/cpus.c | 10 ++++++++++ stubs/dump.c | 28 ++++++++++++++++++++++++++++ stubs/fd-register.c | 6 ++++++ stubs/fdset-add-fd.c | 7 +++++++ stubs/fdset-find-fd.c | 7 +++++++ stubs/fdset-get-fd.c | 7 +++++++ stubs/fdset-remove-fd.c | 6 ++++++ stubs/gdbstub.c | 7 +++++++ stubs/get-fd.c | 8 ++++++++ stubs/get-next-serial.c | 3 +++ stubs/get-vm-name.c | 7 +++++++ stubs/iothread-lock.c | 15 +++++++++++++++ stubs/is-daemonized.c | 9 +++++++++ stubs/kvm.c | 7 +++++++ stubs/machine-init-done.c | 6 ++++++ stubs/migr-blocker.c | 10 ++++++++++ stubs/mon-is-qmp.c | 9 +++++++++ stubs/mon-printf.c | 10 ++++++++++ stubs/monitor-init.c | 6 ++++++ stubs/notify-event.c | 6 ++++++ stubs/qemu-chr-open-spice.c | 14 ++++++++++++++ stubs/qmp_pc_dimm_device_list.c | 12 ++++++++++++ stubs/qtest.c | 14 ++++++++++++++ stubs/reset.c | 13 +++++++++++++ stubs/runstate-check.c | 6 ++++++ stubs/set-fd-handler.c | 10 ++++++++++ stubs/slirp.c | 11 +++++++++++ stubs/sysbus.c | 6 ++++++ stubs/uuid.c | 12 ++++++++++++ stubs/vc-init.c | 7 +++++++ stubs/vm-stop.c | 12 ++++++++++++ stubs/vmstate.c | 19 +++++++++++++++++++ 41 files changed, 410 insertions(+) create mode 100644 stubs/Makefile.objs create mode 100644 stubs/arch-query-cpu-def.c create mode 100644 stubs/bdrv-commit-all.c create mode 100644 stubs/chr-baum-init.c create mode 100644 stubs/chr-msmouse.c create mode 100644 stubs/chr-testdev.c create mode 100644 stubs/clock-warp.c create mode 100644 stubs/cpu-get-clock.c create mode 100644 stubs/cpu-get-icount.c create mode 100644 stubs/cpus.c create mode 100644 stubs/dump.c create mode 100644 stubs/fd-register.c create mode 100644 stubs/fdset-add-fd.c create mode 100644 stubs/fdset-find-fd.c create mode 100644 stubs/fdset-get-fd.c create mode 100644 stubs/fdset-remove-fd.c create mode 100644 stubs/gdbstub.c create mode 100644 stubs/get-fd.c create mode 100644 stubs/get-next-serial.c create mode 100644 stubs/get-vm-name.c create mode 100644 stubs/iothread-lock.c create mode 100644 stubs/is-daemonized.c create mode 100644 stubs/kvm.c create mode 100644 stubs/machine-init-done.c create mode 100644 stubs/migr-blocker.c create mode 100644 stubs/mon-is-qmp.c create mode 100644 stubs/mon-printf.c create mode 100644 stubs/monitor-init.c create mode 100644 stubs/notify-event.c create mode 100644 stubs/qemu-chr-open-spice.c create mode 100644 stubs/qmp_pc_dimm_device_list.c create mode 100644 stubs/qtest.c create mode 100644 stubs/reset.c create mode 100644 stubs/runstate-check.c create mode 100644 stubs/set-fd-handler.c create mode 100644 stubs/slirp.c create mode 100644 stubs/sysbus.c create mode 100644 stubs/uuid.c create mode 100644 stubs/vc-init.c create mode 100644 stubs/vm-stop.c create mode 100644 stubs/vmstate.c (limited to 'stubs') 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 + * + * 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) +{ +} -- cgit v1.2.3