diff options
Diffstat (limited to 'qemu/stubs')
50 files changed, 237 insertions, 64 deletions
diff --git a/qemu/stubs/Makefile.objs b/qemu/stubs/Makefile.objs index 9937a1295..4b258a673 100644 --- a/qemu/stubs/Makefile.objs +++ b/qemu/stubs/Makefile.objs @@ -1,8 +1,7 @@ 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 += bdrv-next-monitor-owned.o +stub-obj-y += blk-commit-all.o +stub-obj-y += blockdev-close-all-bdrv-states.o stub-obj-y += clock-warp.o stub-obj-y += cpu-get-clock.o stub-obj-y += cpu-get-icount.o @@ -23,18 +22,22 @@ 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 += replay.o +stub-obj-y += replay-user.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 +stub-obj-y += target-monitor-defs.o +stub-obj-y += target-get-monitor-def.o +stub-obj-y += vhost.o +stub-obj-y += iohandler.o diff --git a/qemu/stubs/arch-query-cpu-def.c b/qemu/stubs/arch-query-cpu-def.c index a975ab453..cefe4beb8 100644 --- a/qemu/stubs/arch-query-cpu-def.c +++ b/qemu/stubs/arch-query-cpu-def.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/arch_init.h" #include "qapi/qmp/qerror.h" diff --git a/qemu/stubs/bdrv-commit-all.c b/qemu/stubs/bdrv-commit-all.c deleted file mode 100644 index a8e0a9541..000000000 --- a/qemu/stubs/bdrv-commit-all.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "qemu-common.h" -#include "block/block.h" - -int bdrv_commit_all(void) -{ - return 0; -} diff --git a/qemu/stubs/bdrv-next-monitor-owned.c b/qemu/stubs/bdrv-next-monitor-owned.c new file mode 100644 index 000000000..2acf6c3ec --- /dev/null +++ b/qemu/stubs/bdrv-next-monitor-owned.c @@ -0,0 +1,8 @@ +#include "qemu/osdep.h" +#include "qemu-common.h" +#include "block/block.h" + +BlockDriverState *bdrv_next_monitor_owned(BlockDriverState *bs) +{ + return NULL; +} diff --git a/qemu/stubs/blk-commit-all.c b/qemu/stubs/blk-commit-all.c new file mode 100644 index 000000000..c82fb7f5f --- /dev/null +++ b/qemu/stubs/blk-commit-all.c @@ -0,0 +1,8 @@ +#include "qemu/osdep.h" +#include "qemu-common.h" +#include "sysemu/block-backend.h" + +int blk_commit_all(void) +{ + return 0; +} diff --git a/qemu/stubs/blockdev-close-all-bdrv-states.c b/qemu/stubs/blockdev-close-all-bdrv-states.c new file mode 100644 index 000000000..f1f1d9cdc --- /dev/null +++ b/qemu/stubs/blockdev-close-all-bdrv-states.c @@ -0,0 +1,6 @@ +#include "qemu/osdep.h" +#include "block/block_int.h" + +void blockdev_close_all_bdrv_states(void) +{ +} diff --git a/qemu/stubs/chr-baum-init.c b/qemu/stubs/chr-baum-init.c deleted file mode 100644 index f5cc6ce1f..000000000 --- a/qemu/stubs/chr-baum-init.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "qemu-common.h" -#include "sysemu/char.h" - -CharDriverState *chr_baum_init(void) -{ - return NULL; -} diff --git a/qemu/stubs/chr-msmouse.c b/qemu/stubs/chr-msmouse.c deleted file mode 100644 index 812f8b0ab..000000000 --- a/qemu/stubs/chr-msmouse.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "qemu-common.h" -#include "sysemu/char.h" - -CharDriverState *qemu_chr_open_msmouse(void) -{ - return 0; -} diff --git a/qemu/stubs/chr-testdev.c b/qemu/stubs/chr-testdev.c deleted file mode 100644 index 23112a2c0..000000000 --- a/qemu/stubs/chr-testdev.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "qemu-common.h" -#include "sysemu/char.h" - -CharDriverState *chr_testdev_init(void) -{ - return 0; -} diff --git a/qemu/stubs/clock-warp.c b/qemu/stubs/clock-warp.c index 5565118d1..8acb58a77 100644 --- a/qemu/stubs/clock-warp.c +++ b/qemu/stubs/clock-warp.c @@ -1,7 +1,8 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/timer.h" -void qemu_clock_warp(QEMUClockType type) +void qemu_start_warp_timer(void) { } diff --git a/qemu/stubs/cpu-get-clock.c b/qemu/stubs/cpu-get-clock.c index 5b34c976d..1d07523b8 100644 --- a/qemu/stubs/cpu-get-clock.c +++ b/qemu/stubs/cpu-get-clock.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/timer.h" diff --git a/qemu/stubs/cpu-get-icount.c b/qemu/stubs/cpu-get-icount.c index d68585965..3a6f2ab00 100644 --- a/qemu/stubs/cpu-get-icount.c +++ b/qemu/stubs/cpu-get-icount.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/timer.h" diff --git a/qemu/stubs/cpus.c b/qemu/stubs/cpus.c index 8e6f06b11..e19272297 100644 --- a/qemu/stubs/cpus.c +++ b/qemu/stubs/cpus.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qom/cpu.h" diff --git a/qemu/stubs/dump.c b/qemu/stubs/dump.c index 8c24eda84..d9ee23f1e 100644 --- a/qemu/stubs/dump.c +++ b/qemu/stubs/dump.c @@ -11,6 +11,7 @@ * */ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/dump-arch.h" #include "qmp-commands.h" diff --git a/qemu/stubs/fd-register.c b/qemu/stubs/fd-register.c index d0c34fd2a..f91aa3418 100644 --- a/qemu/stubs/fd-register.c +++ b/qemu/stubs/fd-register.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/main-loop.h" diff --git a/qemu/stubs/fdset-add-fd.c b/qemu/stubs/fdset-add-fd.c index ee1643708..bf9e60aed 100644 --- a/qemu/stubs/fdset-add-fd.c +++ b/qemu/stubs/fdset-add-fd.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "monitor/monitor.h" diff --git a/qemu/stubs/fdset-find-fd.c b/qemu/stubs/fdset-find-fd.c index 4f18344ba..1d9caf37e 100644 --- a/qemu/stubs/fdset-find-fd.c +++ b/qemu/stubs/fdset-find-fd.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "monitor/monitor.h" diff --git a/qemu/stubs/fdset-get-fd.c b/qemu/stubs/fdset-get-fd.c index 7112c155e..5325044b5 100644 --- a/qemu/stubs/fdset-get-fd.c +++ b/qemu/stubs/fdset-get-fd.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "monitor/monitor.h" diff --git a/qemu/stubs/fdset-remove-fd.c b/qemu/stubs/fdset-remove-fd.c index 7f6d61e61..47ea29721 100644 --- a/qemu/stubs/fdset-remove-fd.c +++ b/qemu/stubs/fdset-remove-fd.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "monitor/monitor.h" diff --git a/qemu/stubs/gdbstub.c b/qemu/stubs/gdbstub.c index f6a4553a3..2b7aee50d 100644 --- a/qemu/stubs/gdbstub.c +++ b/qemu/stubs/gdbstub.c @@ -1,5 +1,4 @@ -#include "stdbool.h" /* bool (in exec/gdbstub.h) */ -#include "stddef.h" /* NULL */ +#include "qemu/osdep.h" #include "exec/gdbstub.h" /* xml_builtin */ const char *const xml_builtin[][2] = { diff --git a/qemu/stubs/get-fd.c b/qemu/stubs/get-fd.c index 9f2c65cf0..7dfdfb55f 100644 --- a/qemu/stubs/get-fd.c +++ b/qemu/stubs/get-fd.c @@ -1,3 +1,5 @@ +#include "qemu/osdep.h" +#include "qapi/error.h" #include "qemu-common.h" #include "monitor/monitor.h" diff --git a/qemu/stubs/get-next-serial.c b/qemu/stubs/get-next-serial.c index 40c56d13d..6ff6a6d3b 100644 --- a/qemu/stubs/get-next-serial.c +++ b/qemu/stubs/get-next-serial.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" CharDriverState *serial_hds[0]; diff --git a/qemu/stubs/get-vm-name.c b/qemu/stubs/get-vm-name.c index e5f619ffa..fa990136b 100644 --- a/qemu/stubs/get-vm-name.c +++ b/qemu/stubs/get-vm-name.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" const char *qemu_get_vm_name(void) diff --git a/qemu/stubs/iohandler.c b/qemu/stubs/iohandler.c new file mode 100644 index 000000000..22b0ee5b0 --- /dev/null +++ b/qemu/stubs/iohandler.c @@ -0,0 +1,8 @@ +#include "qemu/osdep.h" +#include "qemu-common.h" +#include "qemu/main-loop.h" + +AioContext *iohandler_get_aio_context(void) +{ + abort(); +} diff --git a/qemu/stubs/iothread-lock.c b/qemu/stubs/iothread-lock.c index dda6f6b58..9b6db2e74 100644 --- a/qemu/stubs/iothread-lock.c +++ b/qemu/stubs/iothread-lock.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/main-loop.h" diff --git a/qemu/stubs/is-daemonized.c b/qemu/stubs/is-daemonized.c index c0ee9171a..d5cd1dc37 100644 --- a/qemu/stubs/is-daemonized.c +++ b/qemu/stubs/is-daemonized.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" /* Win32 has its own inline stub */ diff --git a/qemu/stubs/kvm.c b/qemu/stubs/kvm.c index e7c60b6e0..ddd620499 100644 --- a/qemu/stubs/kvm.c +++ b/qemu/stubs/kvm.c @@ -1,7 +1,8 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/kvm.h" -int kvm_arch_irqchip_create(KVMState *s) +int kvm_arch_irqchip_create(MachineState *ms, KVMState *s) { return 0; } diff --git a/qemu/stubs/machine-init-done.c b/qemu/stubs/machine-init-done.c index 28a92555b..9a0d62514 100644 --- a/qemu/stubs/machine-init-done.c +++ b/qemu/stubs/machine-init-done.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/sysemu.h" diff --git a/qemu/stubs/migr-blocker.c b/qemu/stubs/migr-blocker.c index 300df6e20..8ab3604df 100644 --- a/qemu/stubs/migr-blocker.c +++ b/qemu/stubs/migr-blocker.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "migration/migration.h" diff --git a/qemu/stubs/mon-is-qmp.c b/qemu/stubs/mon-is-qmp.c index dd26f19c8..a8344ced8 100644 --- a/qemu/stubs/mon-is-qmp.c +++ b/qemu/stubs/mon-is-qmp.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "monitor/monitor.h" diff --git a/qemu/stubs/mon-printf.c b/qemu/stubs/mon-printf.c index 0ce2ca692..e7c1e0cf7 100644 --- a/qemu/stubs/mon-printf.c +++ b/qemu/stubs/mon-printf.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "monitor/monitor.h" diff --git a/qemu/stubs/monitor-init.c b/qemu/stubs/monitor-init.c index 563902b41..de1bc7cd5 100644 --- a/qemu/stubs/monitor-init.c +++ b/qemu/stubs/monitor-init.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "monitor/monitor.h" diff --git a/qemu/stubs/notify-event.c b/qemu/stubs/notify-event.c index 32f7289d3..14e52268a 100644 --- a/qemu/stubs/notify-event.c +++ b/qemu/stubs/notify-event.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/main-loop.h" diff --git a/qemu/stubs/qemu-chr-open-spice.c b/qemu/stubs/qemu-chr-open-spice.c deleted file mode 100644 index f1c4849d9..000000000 --- a/qemu/stubs/qemu-chr-open-spice.c +++ /dev/null @@ -1,14 +0,0 @@ -#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/qemu/stubs/qmp_pc_dimm_device_list.c b/qemu/stubs/qmp_pc_dimm_device_list.c index b584bd8b2..def211564 100644 --- a/qemu/stubs/qmp_pc_dimm_device_list.c +++ b/qemu/stubs/qmp_pc_dimm_device_list.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qom/object.h" #include "hw/mem/pc-dimm.h" @@ -5,8 +6,3 @@ 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/qemu/stubs/qtest.c b/qemu/stubs/qtest.c index dc17594bb..891eb954f 100644 --- a/qemu/stubs/qtest.c +++ b/qemu/stubs/qtest.c @@ -8,7 +8,13 @@ * See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "sysemu/qtest.h" /* Needed for qtest_allowed() */ bool qtest_allowed; + +bool qtest_driver(void) +{ + return false; +} diff --git a/qemu/stubs/replay-user.c b/qemu/stubs/replay-user.c new file mode 100644 index 000000000..b29e7ebba --- /dev/null +++ b/qemu/stubs/replay-user.c @@ -0,0 +1,33 @@ +/* + * replay.c + * + * Copyright (c) 2010-2015 Institute for System Programming + * of the Russian Academy of Sciences. + * + * 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/osdep.h" +#include "sysemu/replay.h" + +bool replay_exception(void) +{ + return true; +} + +bool replay_has_exception(void) +{ + return false; +} + +bool replay_interrupt(void) +{ + return true; +} + +bool replay_has_interrupt(void) +{ + return false; +} diff --git a/qemu/stubs/replay.c b/qemu/stubs/replay.c new file mode 100644 index 000000000..de9fa1ec9 --- /dev/null +++ b/qemu/stubs/replay.c @@ -0,0 +1,69 @@ +#include "qemu/osdep.h" +#include "sysemu/replay.h" +#include "sysemu/sysemu.h" + +ReplayMode replay_mode; + +int64_t replay_save_clock(unsigned int kind, int64_t clock) +{ + abort(); + return 0; +} + +int64_t replay_read_clock(unsigned int kind) +{ + abort(); + return 0; +} + +bool replay_checkpoint(ReplayCheckpoint checkpoint) +{ + return true; +} + +bool replay_events_enabled(void) +{ + return false; +} + +void replay_finish(void) +{ +} + +void replay_register_char_driver(CharDriverState *chr) +{ +} + +void replay_chr_be_write(CharDriverState *s, uint8_t *buf, int len) +{ + abort(); +} + +void replay_char_write_event_save(int res, int offset) +{ + abort(); +} + +void replay_char_write_event_load(int *res, int *offset) +{ + abort(); +} + +int replay_char_read_all_load(uint8_t *buf) +{ + abort(); +} + +void replay_char_read_all_save_error(int res) +{ + abort(); +} + +void replay_char_read_all_save_buf(uint8_t *buf, int offset) +{ + abort(); +} + +void replay_block_event(QEMUBH *bh, uint64_t id) +{ +} diff --git a/qemu/stubs/reset.c b/qemu/stubs/reset.c index ad287251e..5d47711f9 100644 --- a/qemu/stubs/reset.c +++ b/qemu/stubs/reset.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "hw/hw.h" /* Stub functions for binaries that never call qemu_devices_reset(), diff --git a/qemu/stubs/runstate-check.c b/qemu/stubs/runstate-check.c index bd2e3757a..7c5227e84 100644 --- a/qemu/stubs/runstate-check.c +++ b/qemu/stubs/runstate-check.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "sysemu/sysemu.h" bool runstate_check(RunState state) diff --git a/qemu/stubs/set-fd-handler.c b/qemu/stubs/set-fd-handler.c index a8481bc3c..06a5da48f 100644 --- a/qemu/stubs/set-fd-handler.c +++ b/qemu/stubs/set-fd-handler.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/main-loop.h" @@ -8,3 +9,13 @@ void qemu_set_fd_handler(int fd, { abort(); } + +void aio_set_fd_handler(AioContext *ctx, + int fd, + bool is_external, + IOHandler *io_read, + IOHandler *io_write, + void *opaque) +{ + abort(); +} diff --git a/qemu/stubs/slirp.c b/qemu/stubs/slirp.c index bd0ac7f27..dcae51f0e 100644 --- a/qemu/stubs/slirp.c +++ b/qemu/stubs/slirp.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "slirp/slirp.h" diff --git a/qemu/stubs/sysbus.c b/qemu/stubs/sysbus.c index e13496582..d8da90caa 100644 --- a/qemu/stubs/sysbus.c +++ b/qemu/stubs/sysbus.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "hw/qdev-core.h" BusState *sysbus_get_default(void) diff --git a/qemu/stubs/target-get-monitor-def.c b/qemu/stubs/target-get-monitor-def.c new file mode 100644 index 000000000..394e0f9a7 --- /dev/null +++ b/qemu/stubs/target-get-monitor-def.c @@ -0,0 +1,29 @@ +/* + * Stub for target_get_monitor_def. + * + * Copyright IBM Corp., 2015 + * + * Author: Alexey Kardashevskiy <aik@ozlabs.ru> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, + * or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see <http://www.gnu.org/licenses/>. + */ + +#include "qemu/osdep.h" + +int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval); + +int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval) +{ + return -1; +} diff --git a/qemu/stubs/target-monitor-defs.c b/qemu/stubs/target-monitor-defs.c new file mode 100644 index 000000000..ac07b1906 --- /dev/null +++ b/qemu/stubs/target-monitor-defs.c @@ -0,0 +1,8 @@ +#include "qemu/osdep.h" + +const MonitorDef *target_monitor_defs(void); + +const MonitorDef *target_monitor_defs(void) +{ + return NULL; +} diff --git a/qemu/stubs/uuid.c b/qemu/stubs/uuid.c index ffc0ed40a..92ad71783 100644 --- a/qemu/stubs/uuid.c +++ b/qemu/stubs/uuid.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/sysemu.h" #include "qmp-commands.h" diff --git a/qemu/stubs/vc-init.c b/qemu/stubs/vc-init.c deleted file mode 100644 index 308dfa080..000000000 --- a/qemu/stubs/vc-init.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "qemu-common.h" -#include "sysemu/char.h" - -CharDriverState *vc_init(ChardevVC *vc) -{ - return 0; -} diff --git a/qemu/stubs/vhost.c b/qemu/stubs/vhost.c new file mode 100644 index 000000000..2d76cdebd --- /dev/null +++ b/qemu/stubs/vhost.c @@ -0,0 +1,7 @@ +#include "qemu/osdep.h" +#include "hw/virtio/vhost.h" + +bool vhost_has_free_slot(void) +{ + return true; +} diff --git a/qemu/stubs/vm-stop.c b/qemu/stubs/vm-stop.c index 69fd86b2e..8271cad65 100644 --- a/qemu/stubs/vm-stop.c +++ b/qemu/stubs/vm-stop.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "sysemu/sysemu.h" diff --git a/qemu/stubs/vmstate.c b/qemu/stubs/vmstate.c index 778bc3fc6..65906271d 100644 --- a/qemu/stubs/vmstate.c +++ b/qemu/stubs/vmstate.c @@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu-common.h" #include "migration/vmstate.h" |