target-i386: kvm_cpu_fill_host: use GET_SUPPORTED_CPUID
[qemu/ar7.git] / qemu-tool.c
blobda4c05aaf7b661fdabba3335bad1ebccafb3f55c
1 /*
2 * Compatibility for qemu-img/qemu-nbd
4 * Copyright IBM, Corp. 2008
6 * Authors:
7 * Anthony Liguori <aliguori@us.ibm.com>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
12 * Contributions after 2012-01-13 are licensed under the terms of the
13 * GNU GPL, version 2 or (at your option) any later version.
16 #include "qemu-common.h"
17 #include "monitor.h"
18 #include "qemu-timer.h"
19 #include "qemu-log.h"
20 #include "migration.h"
21 #include "main-loop.h"
22 #include "sysemu.h"
23 #include "qemu_socket.h"
24 #include "slirp/libslirp.h"
26 #include <sys/time.h>
28 struct QEMUBH
30 QEMUBHFunc *cb;
31 void *opaque;
34 const char *qemu_get_vm_name(void)
36 return NULL;
39 Monitor *cur_mon;
41 int monitor_get_fd(Monitor *mon, const char *name, Error **errp)
43 error_setg(errp, "only QEMU supports file descriptor passing");
44 return -1;
47 void vm_stop(RunState state)
49 abort();
52 int monitor_cur_is_qmp(void)
54 return 0;
57 void monitor_set_error(Monitor *mon, QError *qerror)
61 void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap)
65 void monitor_printf(Monitor *mon, const char *fmt, ...)
69 void monitor_print_filename(Monitor *mon, const char *filename)
73 void monitor_protocol_event(MonitorEvent event, QObject *data)
77 int monitor_fdset_get_fd(int64_t fdset_id, int flags)
79 return -1;
82 int monitor_fdset_dup_fd_add(int64_t fdset_id, int dup_fd)
84 return -1;
87 int monitor_fdset_dup_fd_remove(int dup_fd)
89 return -1;
92 int monitor_fdset_dup_fd_find(int dup_fd)
94 return -1;
97 int64_t cpu_get_clock(void)
99 return qemu_get_clock_ns(rt_clock);
102 int64_t cpu_get_icount(void)
104 abort();
107 void qemu_mutex_lock_iothread(void)
111 void qemu_mutex_unlock_iothread(void)
115 int use_icount;
117 void qemu_clock_warp(QEMUClock *clock)
121 int qemu_init_main_loop(void)
123 init_clocks();
124 init_timer_alarm();
125 return main_loop_init();
128 void slirp_update_timeout(uint32_t *timeout)
132 void slirp_select_fill(int *pnfds, fd_set *readfds,
133 fd_set *writefds, fd_set *xfds)
137 void slirp_select_poll(fd_set *readfds, fd_set *writefds,
138 fd_set *xfds, int select_error)
142 void migrate_add_blocker(Error *reason)
146 void migrate_del_blocker(Error *reason)