1. 07 9月, 2012 1 次提交
  2. 15 8月, 2012 1 次提交
  3. 14 8月, 2012 1 次提交
    • L
      qmp: add SUSPEND_DISK event · 25df49f6
      Luiz Capitulino 提交于
      Emitted when the guest makes a request to enter S4 state.
      
      There are three possible ways of having this event, as described here:
      
       http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg02307.html
      
      I've decided to add a new event and make it indepedent of SHUTDOWN.
      This means that the SHUTDOWN event will eventually follow the
      SUSPEND_DISK event.
      
      I've choosen this way because of two reasons:
      
       1. Having an indepedent event makes it possible to query for its
          existence by using query-events
      
       2. In the future, we may allow the user to change what QEMU should
          do as a result of the guest entering S4. So it's a good idea to
          keep both events separated
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      25df49f6
  4. 16 6月, 2012 1 次提交
    • D
      Add event notification for guest balloon changes · 973603a8
      Daniel P. Berrange 提交于
      After setting a balloon target value, applications have to
      continually poll 'query-balloon' to determine whether the
      guest has reacted to this request. The virtio-balloon backend
      knows exactly when the guest has reacted though, and thus it
      is possible to emit a JSON event to tell the mgmt application
      whenever the guest balloon changes.
      
      This introduces a new 'qemu_balloon_changed()' API which is
      to be called by balloon driver backends, whenever they have
      a change in balloon value. This takes the 'actual' balloon
      value, as would be found in the BalloonInfo struct.
      
      The qemu_balloon_change API emits a JSON monitor event which
      looks like:
      
        {"timestamp": {"seconds": 1337162462, "microseconds": 814521},
         "event": "BALLOON_CHANGE", "data": {"actual": 944766976}}
      
      * balloon.c, balloon.h: Introduce qemu_balloon_changed() for
        emitting balloon change events on the monitor
      * hw/virtio-balloon.c: Invoke qemu_balloon_changed() whenever
        the guest changes the balloon actual value
      * monitor.c, monitor.h: Define QEVENT_BALLOON_CHANGE
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Acked-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      973603a8
  5. 05 6月, 2012 1 次提交
    • D
      Add 'query-events' command to QMP to query async events · 4860853d
      Daniel P. Berrange 提交于
      Sometimes it is neccessary for an application to determine
      whether a particular QMP event is available, so they can
      decide whether to use compatibility code instead. This
      introduces a new 'query-events' command to QMP to do just
      that
      
       { "execute": "query-events" }
       {"return": [{"name": "WAKEUP"},
                   {"name": "SUSPEND"},
                   {"name": "DEVICE_TRAY_MOVED"},
                   {"name": "BLOCK_JOB_CANCELLED"},
                   {"name": "BLOCK_JOB_COMPLETED"},
                   ...snip...
                   {"name": "SHUTDOWN"}]}
      
      * monitor.c: Turn MonitorEvent -> string conversion
        into a lookup from a static table of constant strings.
        Add impl of qmp_query_events monitor command handler
      * qapi-schema.json, qmp-commands.hx: Define contract of
        query-events command
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      4860853d
  6. 25 2月, 2012 1 次提交
  7. 23 2月, 2012 1 次提交
  8. 26 1月, 2012 2 次提交
  9. 18 1月, 2012 1 次提交
  10. 15 12月, 2011 1 次提交
  11. 06 12月, 2011 1 次提交
  12. 27 10月, 2011 2 次提交
  13. 09 12月, 2010 1 次提交
    • G
      spice: connection events. · 6f8c63fb
      Gerd Hoffmann 提交于
      This patch adds support for connection events to spice.  The events are
      quite simliar to the vnc events.  Unlike vnc spice uses multiple tcp
      channels though.  qemu will report every single tcp connection (aka
      spice channel).  If you want track spice sessions only you can filter
      for the main channel (channel-type == 1).
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      6f8c63fb
  14. 03 10月, 2010 2 次提交
  15. 01 10月, 2010 2 次提交
  16. 02 7月, 2010 2 次提交
  17. 04 5月, 2010 1 次提交
  18. 27 3月, 2010 1 次提交
  19. 17 3月, 2010 1 次提交
  20. 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
  21. 09 3月, 2010 3 次提交
  22. 20 2月, 2010 1 次提交
  23. 11 2月, 2010 1 次提交
  24. 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
  25. 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
  26. 12 12月, 2009 1 次提交
  27. 05 12月, 2009 1 次提交
  28. 03 12月, 2009 2 次提交