1. 02 7月, 2010 2 次提交
  2. 04 5月, 2010 1 次提交
  3. 27 3月, 2010 1 次提交
  4. 17 3月, 2010 1 次提交
  5. 16 3月, 2010 3 次提交
    • M
      2f792016
    • M
      monitor: Factor monitor_set_error() out of qemu_error_internal() · d6f46833
      Markus Armbruster 提交于
      This separates the monitor part from the QError part.
      d6f46833
    • M
      monitor: Separate "default monitor" and "current monitor" cleanly · 8631b608
      Markus Armbruster 提交于
      Commits 376253ec..731b0364 introduced global variable cur_mon, which
      points to the "default monitor" (if any), except during execution of
      monitor_read() or monitor_control_read() it points to the monitor from
      which we're reading instead (the "current monitor").  Monitor command
      handlers run within monitor_read() or monitor_control_read().
      
      Default monitor and current monitor are really separate things, and
      squashing them together is confusing and error-prone.
      
      For instance, usb_host_scan() can run both in "info usbhost" and
      periodically via usb_host_auto_check().  It prints to cur_mon, which
      is what we want in the former case: the monitor executing "info
      usbhost".  But since that's the default monitor in the latter case, it
      periodically spams the default monitor there.
      
      A few places use cur_mon to log stuff to the default monitor.  If we
      ever log something while cur_mon points to current monitor instead of
      default monitor, the log temporarily "jumps" to another monitor.
      Whether that can or cannot happen isn't always obvious.
      
      Maybe logging to the default monitor (which may not even exist) is a
      bad idea, and we should log to stderr or a logfile instead.  But
      that's outside the scope of this commit.
      
      Change cur_mon to point to the current monitor.  Create new
      default_mon to point to the default monitor.  Update users of cur_mon
      accordingly.
      
      This fixes the periodical spamming of the default monitor by
      usb_host_scan().  It also stops "log jumping", should that problem
      exist.
      8631b608
  6. 09 3月, 2010 3 次提交
  7. 20 2月, 2010 1 次提交
  8. 11 2月, 2010 1 次提交
  9. 27 1月, 2010 1 次提交
    • A
      New API for asynchronous monitor commands · 940cc30d
      Adam Litke 提交于
      Qemu has a number of commands that can operate asynchronously (savevm, migrate,
      etc) and it will be getting more.  For these commands, the user monitor needs
      to be suspended, but QMP monitors could continue to to accept other commands.
      This patch introduces a new command API that isolates the details of handling
      different monitor types from the actual command execution.
      
      A monitor command can use this API by implementing the mhandler.cmd_async
      handler (or info_async if appropriate).  This function is responsible for
      submitting the command and does not return any data although it may raise
      errors.  When the command completes, the QMPCompletion callback should be
      invoked with its opaque data and the command result.
      
      The process for submitting and completing an asynchronous command is different
      for QMP and user monitors.  A user monitor must be suspended at submit time and
      resumed at completion time.  The user_print() function must be passed to the
      QMPCompletion callback so the result can be displayed properly.  QMP monitors
      are simpler.  No submit time setup is required.  When the command completes,
      monitor_protocol_emitter() writes the result in JSON format.
      
      This API can also be used to implement synchronous commands.  In this case, the
      cmd_async handler should immediately call the QMPCompletion callback.  It is my
      hope that this new interface will work for all commands, leading to a
      drastically simplified monitor.c once all commands are ported.
      Signed-off-by: NAdam Litke <agl@us.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      940cc30d
  10. 20 1月, 2010 3 次提交
    • L
      QMP: Introduce VNC_INITIALIZED event · 0d2ed46a
      Luiz Capitulino 提交于
      It's emitted when a VNC client session is activated by QEMU,
      client's information such as port, IP and auth ID (if the
      session is authenticated) are provided.
      
      Event example:
      
      { "event": "VNC_INITIALIZED",
          "timestamp": {"seconds": 1263475302, "microseconds": 150772},
          "data": {
              "server": { "auth": "sasl", "family": "ipv4",
                          "service": "5901", "host": "0.0.0.0"},
              "client": { "family": "ipv4", "service": "46089",
                          "host": "127.0.0.1", "sasl_username": "lcapitulino" } } }
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      0d2ed46a
    • L
      QMP: Introduce VNC_DISCONNECTED event · 0d72f3d3
      Luiz Capitulino 提交于
      It's emitted when a VNC client disconnects from QEMU, client's
      information such as port and IP address are provided.
      
      Event example:
      
      { "event": "VNC_DISCONNECTED",
          "timestamp": { "seconds": 1262976601, "microseconds": 975795 },
          "data": {
              "server": { "auth": "sasl", "family": "ipv4",
                          "service": "5901", "host": "0.0.0.0" },
              "client": { "family": "ipv4", "service": "58425",
                          "host": "127.0.0.1", "sasl_username": "foo" } } }
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      0d72f3d3
    • L
      QMP: Introduce VNC_CONNECTED event · 586153d9
      Luiz Capitulino 提交于
      It's emitted when a VNC client connects to QEMU, client's information
      such as port and IP address are provided.
      
      Note that this event is emitted right when the connection is
      established. This means that it happens before authentication
      procedure and session initialization.
      
      Event example:
      
      { "event": "VNC_CONNECTED",
          "timestamp": { "seconds": 1262976601, "microseconds": 975795 },
          "data": {
              "server": { "auth": "sasl", "family": "ipv4",
                          "service": "5901", "host": "0.0.0.0" },
              "client": { "family": "ipv4", "service": "58425",
                          "host": "127.0.0.1" } } }
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      586153d9
  11. 12 12月, 2009 1 次提交
  12. 05 12月, 2009 1 次提交
  13. 03 12月, 2009 4 次提交
  14. 04 9月, 2009 1 次提交
  15. 27 7月, 2009 1 次提交
  16. 06 3月, 2009 4 次提交
    • A
      monitor: Introduce MONITOR_USE_READLINE flag (Jan Kiszka) · cde76ee1
      aliguori 提交于
      This allows to create monitor terminals that do not make use of the
      interactive readline back-end but rather send complete commands. The
      pass-through monitor interface of the gdbstub will be an example.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6717 c046a42c-6fe2-441c-8c8c-71466251a162
      cde76ee1
    • A
      monitor: Decouple terminals (Jan Kiszka) · 731b0364
      aliguori 提交于
      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: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6715 c046a42c-6fe2-441c-8c8c-71466251a162
      731b0364
    • A
      monitor: Drop banner hiding (Jan Kiszka) · bb806047
      aliguori 提交于
      There is no use for the hide/show banner option, and it is applied
      inconsistently anyway (or what makes the difference between
       -serial mon:stdio and -nographic for the monitor?). So drop this mode.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6713 c046a42c-6fe2-441c-8c8c-71466251a162
      bb806047
    • A
      monitor: Rework API (Jan Kiszka) · 376253ec
      aliguori 提交于
      Refactor the monitor API and prepare it for decoupled terminals:
      term_print functions are renamed to monitor_* and all monitor services
      gain a new parameter (mon) that will once refer to the monitor instance
      the output is supposed to appear on. However, the argument remains
      unused for now. All monitor command callbacks are also extended by a mon
      parameter so that command handlers are able to pass an appropriate
      reference to monitor output services.
      
      For the case that monitor outputs so far happen without clearly
      identifiable context, the global variable cur_mon is introduced that
      shall once provide a pointer either to the current active monitor (while
      processing commands) or to the default one. On the mid or long term,
      those use case will be obsoleted so that this variable can be removed
      again.
      
      Due to the broad usage of the monitor interface, this patch mostly deals
      with converting users of the monitor API. A few of them are already
      extended to pass 'mon' from the command handler further down to internal
      functions that invoke monitor_printf.
      
      At this chance, monitor-related prototypes are moved from console.h to
      a new monitor.h. The same is done for the readline API.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6711 c046a42c-6fe2-441c-8c8c-71466251a162
      376253ec