monitor: Decouple terminals (Jan Kiszka)

Currently all registered (and activate) monitor terminals work in
broadcast mode: Everyone sees what someone else types on some other
terminal and what the monitor reports back. This model is broken when
you have a management monitor terminal that is automatically operated
and some other terminal used for independent guest inspection. Such
additional terminals can be multiplexed device channels or a gdb
frontend connected to QEMU's stub.

Therefore, this patch decouples the buffers and states of all monitor
terminals, allowing the user to operate them independently. It finally
starts to use the 'mon' parameter that was introduced earlier with the
API rework. It also defines the default monitor: the first instantance
that has the MONITOR_IS_DEFAULT flag set, and that is the monitor
created via the "-monitor" command line switch (or "vc" if none is
given).

As the patch requires to rework the monitor suspension interface, it
also takes the freedom to make it "truely" suspending (so far suspending
meant suppressing the prompt, but inputs were still processed).

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6715 c046a42c-6fe2-441c-8c8c-71466251a162
8 files changed
tree: f7d973b9d4c22585593089b59ce72cf2e3855db2
  1. audio/
  2. bsd-user/
  3. darwin-user/
  4. fpu/
  5. gdb-xml/
  6. hw/
  7. keymaps/
  8. linux-user/
  9. pc-bios/
  10. slirp/
  11. target-alpha/
  12. target-arm/
  13. target-cris/
  14. target-i386/
  15. target-m68k/
  16. target-mips/
  17. target-ppc/
  18. target-sh4/
  19. target-sparc/
  20. tcg/
  21. tests/
  22. .gitignore
  23. a.out.h
  24. aes.c
  25. aes.h
  26. aio.c
  27. alpha-dis.c
  28. alpha.ld
  29. arm-dis.c
  30. arm-semi.c
  31. arm.ld
  32. balloon.h
  33. block-bochs.c
  34. block-cloop.c
  35. block-cow.c
  36. block-dmg.c
  37. block-nbd.c
  38. block-parallels.c
  39. block-qcow.c
  40. block-qcow2.c
  41. block-raw-posix.c
  42. block-raw-win32.c
  43. block-vmdk.c
  44. block-vpc.c
  45. block-vvfat.c
  46. block.c
  47. block.h
  48. block_int.h
  49. bswap.h
  50. bt-host.c
  51. bt-vhci.c
  52. buffered_file.c
  53. buffered_file.h
  54. cache-utils.c
  55. cache-utils.h
  56. Changelog
  57. cocoa.m
  58. configure
  59. console.c
  60. console.h
  61. COPYING
  62. COPYING.LIB
  63. cpu-all.h
  64. cpu-defs.h
  65. cpu-exec.c
  66. cris-dis.c
  67. curses.c
  68. curses_keys.h
  69. cutils.c
  70. d3des.c
  71. d3des.h
  72. def-helper.h
  73. device_tree.c
  74. device_tree.h
  75. dis-asm.h
  76. disas.c
  77. disas.h
  78. dma-helpers.c
  79. dma.h
  80. dyngen-exec.h
  81. elf.h
  82. elf_ops.h
  83. exec-all.h
  84. exec.c
  85. feature_to_c.sh
  86. gdbstub.c
  87. gdbstub.h
  88. gen-icount.h
  89. host-utils.c
  90. host-utils.h
  91. hostregs_helper.h
  92. hpet.h
  93. hppa-dis.c
  94. hppa.ld
  95. i386-dis.c
  96. i386.ld
  97. ia64.ld
  98. keymaps.c
  99. kqemu.c
  100. kqemu.h
  101. kvm-all.c
  102. kvm.h
  103. libfdt_env.h
  104. LICENSE
  105. loader.c
  106. m68k-dis.c
  107. m68k-semi.c
  108. m68k.ld
  109. MAINTAINERS
  110. Makefile
  111. Makefile.target
  112. migration-exec.c
  113. migration-tcp.c
  114. migration.c
  115. migration.h
  116. mips-dis.c
  117. mips.ld
  118. mipsel.ld
  119. monitor.c
  120. monitor.h
  121. nbd.c
  122. nbd.h
  123. net-checksum.c
  124. net.c
  125. net.h
  126. osdep.c
  127. osdep.h
  128. pci-ids.txt
  129. posix-aio-compat.c
  130. posix-aio-compat.h
  131. ppc-dis.c
  132. ppc.ld
  133. ppc64.ld
  134. qemu-aio.h
  135. qemu-binfmt-conf.sh
  136. qemu-char.c
  137. qemu-char.h
  138. qemu-common.h
  139. qemu-doc.texi
  140. qemu-img.c
  141. qemu-img.texi
  142. qemu-lock.h
  143. qemu-log.h
  144. qemu-malloc.c
  145. qemu-nbd.c
  146. qemu-nbd.texi
  147. qemu-sockets.c
  148. qemu-tech.texi
  149. qemu-timer.h
  150. qemu-tool.c
  151. qemu_socket.h
  152. readline.c
  153. readline.h
  154. README
  155. rules.mak
  156. s390-dis.c
  157. s390.ld
  158. savevm.c
  159. sdl.c
  160. sdl_keysym.h
  161. sh4-dis.c
  162. softmmu-semi.h
  163. softmmu_defs.h
  164. softmmu_exec.h
  165. softmmu_header.h
  166. softmmu_template.h
  167. sparc-dis.c
  168. sparc.ld
  169. sparc64.ld
  170. sys-queue.h
  171. sysemu.h
  172. tap-win32.c
  173. texi2pod.pl
  174. thunk.c
  175. thunk.h
  176. TODO
  177. translate-all.c
  178. uboot_image.h
  179. usb-bsd.c
  180. usb-linux.c
  181. usb-stub.c
  182. VERSION
  183. vgafont.h
  184. vl.c
  185. vnc.c
  186. vnc.h
  187. vnc_keysym.h
  188. vnchextile.h
  189. x86_64.ld
  190. x_keymap.c
  191. x_keymap.h