aliguori | 03ff3ca | 2008-09-15 15:51:35 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Compatibility for qemu-img/qemu-nbd |
| 3 | * |
| 4 | * Copyright IBM, Corp. 2008 |
| 5 | * |
| 6 | * Authors: |
| 7 | * Anthony Liguori <aliguori@us.ibm.com> |
| 8 | * |
| 9 | * This work is licensed under the terms of the GNU GPL, version 2. See |
| 10 | * the COPYING file in the top-level directory. |
| 11 | * |
Paolo Bonzini | 6b620ca | 2012-01-13 17:44:23 +0100 | [diff] [blame] | 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. |
aliguori | 03ff3ca | 2008-09-15 15:51:35 +0000 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | #include "qemu-common.h" |
aliguori | 376253e | 2009-03-05 23:01:23 +0000 | [diff] [blame] | 17 | #include "monitor.h" |
aliguori | 03ff3ca | 2008-09-15 15:51:35 +0000 | [diff] [blame] | 18 | #include "qemu-timer.h" |
Blue Swirl | 0bf9e31 | 2009-07-20 17:19:25 +0000 | [diff] [blame] | 19 | #include "qemu-log.h" |
Anthony Liguori | 1ed520c | 2011-11-14 15:09:47 -0600 | [diff] [blame] | 20 | #include "migration.h" |
Paolo Bonzini | cbcfa04 | 2011-09-12 16:20:11 +0200 | [diff] [blame] | 21 | #include "main-loop.h" |
| 22 | #include "qemu_socket.h" |
| 23 | #include "slirp/libslirp.h" |
aliguori | 03ff3ca | 2008-09-15 15:51:35 +0000 | [diff] [blame] | 24 | |
| 25 | #include <sys/time.h> |
| 26 | |
Blue Swirl | 0bf9e31 | 2009-07-20 17:19:25 +0000 | [diff] [blame] | 27 | FILE *logfile; |
| 28 | |
aliguori | 03ff3ca | 2008-09-15 15:51:35 +0000 | [diff] [blame] | 29 | struct QEMUBH |
| 30 | { |
| 31 | QEMUBHFunc *cb; |
| 32 | void *opaque; |
| 33 | }; |
| 34 | |
Markus Armbruster | 526f0ac | 2010-03-22 10:29:04 +0100 | [diff] [blame] | 35 | Monitor *cur_mon; |
| 36 | |
| 37 | int monitor_cur_is_qmp(void) |
| 38 | { |
| 39 | return 0; |
| 40 | } |
| 41 | |
| 42 | void monitor_set_error(Monitor *mon, QError *qerror) |
| 43 | { |
| 44 | } |
| 45 | |
| 46 | void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap) |
| 47 | { |
| 48 | } |
| 49 | |
aliguori | 376253e | 2009-03-05 23:01:23 +0000 | [diff] [blame] | 50 | void monitor_printf(Monitor *mon, const char *fmt, ...) |
aliguori | 03ff3ca | 2008-09-15 15:51:35 +0000 | [diff] [blame] | 51 | { |
| 52 | } |
| 53 | |
aliguori | 376253e | 2009-03-05 23:01:23 +0000 | [diff] [blame] | 54 | void monitor_print_filename(Monitor *mon, const char *filename) |
aliguori | 03ff3ca | 2008-09-15 15:51:35 +0000 | [diff] [blame] | 55 | { |
| 56 | } |
| 57 | |
Luiz Capitulino | 0d1ea87 | 2009-11-26 22:59:03 -0200 | [diff] [blame] | 58 | void monitor_protocol_event(MonitorEvent event, QObject *data) |
| 59 | { |
| 60 | } |
| 61 | |
Andreas Färber | 49cb826 | 2012-01-16 01:46:52 +0100 | [diff] [blame] | 62 | int64_t cpu_get_clock(void) |
aliguori | 03ff3ca | 2008-09-15 15:51:35 +0000 | [diff] [blame] | 63 | { |
Paolo Bonzini | 8a83205 | 2012-04-12 14:00:52 +0200 | [diff] [blame] | 64 | return qemu_get_clock_ns(rt_clock); |
aliguori | 03ff3ca | 2008-09-15 15:51:35 +0000 | [diff] [blame] | 65 | } |
Kevin Wolf | 4e59b54 | 2011-02-22 18:42:31 +0100 | [diff] [blame] | 66 | |
Andreas Färber | 49cb826 | 2012-01-16 01:46:52 +0100 | [diff] [blame] | 67 | int64_t cpu_get_icount(void) |
Paolo Bonzini | cbcfa04 | 2011-09-12 16:20:11 +0200 | [diff] [blame] | 68 | { |
| 69 | abort(); |
| 70 | } |
| 71 | |
| 72 | void qemu_mutex_lock_iothread(void) |
Kevin Wolf | 4e59b54 | 2011-02-22 18:42:31 +0100 | [diff] [blame] | 73 | { |
| 74 | } |
Stefan Hajnoczi | 5fc09ca | 2011-05-09 16:45:39 +0100 | [diff] [blame] | 75 | |
Paolo Bonzini | cbcfa04 | 2011-09-12 16:20:11 +0200 | [diff] [blame] | 76 | void qemu_mutex_unlock_iothread(void) |
Stefan Hajnoczi | 5fc09ca | 2011-05-09 16:45:39 +0100 | [diff] [blame] | 77 | { |
| 78 | } |
| 79 | |
Paolo Bonzini | cbcfa04 | 2011-09-12 16:20:11 +0200 | [diff] [blame] | 80 | int use_icount; |
| 81 | |
| 82 | void qemu_clock_warp(QEMUClock *clock) |
Stefan Hajnoczi | 5fc09ca | 2011-05-09 16:45:39 +0100 | [diff] [blame] | 83 | { |
| 84 | } |
| 85 | |
Michael Roth | d34e8f6 | 2012-01-21 11:13:53 -0600 | [diff] [blame] | 86 | int qemu_init_main_loop(void) |
Stefan Hajnoczi | 5fc09ca | 2011-05-09 16:45:39 +0100 | [diff] [blame] | 87 | { |
Paolo Bonzini | cbcfa04 | 2011-09-12 16:20:11 +0200 | [diff] [blame] | 88 | init_clocks(); |
| 89 | init_timer_alarm(); |
Michael Roth | d34e8f6 | 2012-01-21 11:13:53 -0600 | [diff] [blame] | 90 | return main_loop_init(); |
Paolo Bonzini | cbcfa04 | 2011-09-12 16:20:11 +0200 | [diff] [blame] | 91 | } |
| 92 | |
| 93 | void slirp_select_fill(int *pnfds, fd_set *readfds, |
| 94 | fd_set *writefds, fd_set *xfds) |
| 95 | { |
| 96 | } |
| 97 | |
| 98 | void slirp_select_poll(fd_set *readfds, fd_set *writefds, |
| 99 | fd_set *xfds, int select_error) |
| 100 | { |
Stefan Hajnoczi | 5fc09ca | 2011-05-09 16:45:39 +0100 | [diff] [blame] | 101 | } |
Anthony Liguori | 1ed520c | 2011-11-14 15:09:47 -0600 | [diff] [blame] | 102 | |
| 103 | void migrate_add_blocker(Error *reason) |
| 104 | { |
| 105 | } |
| 106 | |
| 107 | void migrate_del_blocker(Error *reason) |
| 108 | { |
| 109 | } |