Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Jul 1, 2010
  1. @jan-kiszka

    monitor: Allow to exclude commands from QMP

    jan-kiszka authored Luiz Capitulino committed
    Ported commands that are marked 'user_only' will not be considered for
    QMP monitor sessions. This allows to implement new commands that do not
    (yet) provide a sufficiently stable interface for QMP use.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
  2. @jan-kiszka

    monitor: Establish cmd flags and convert the async tag

    jan-kiszka authored Luiz Capitulino committed
    As we want to add more flags to monitor commands, convert the only so
    far existing one accordingly.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Commits on May 3, 2010
  1. QMP: Introduce RESUME event

    Luiz Capitulino authored Anthony Liguori committed
    It's emitted when the Virtual Machine resumes execution.
    
    We currently have the STOP event but don't have the matching
    RESUME one, this means that clients are notified when the VM
    is stopped but don't get anything when it resumes.
    
    Let's fix that as it's already causing some trouble to libvirt.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Commits on Mar 27, 2010
  1. @aurel32

    error: Trim includes after "Infrastructure to track locations..."

    Markus Armbruster authored aurel32 committed
    Missed in commit 827b081.
    
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Commits on Mar 16, 2010
  1. monitor: New monitor_cur_is_qmp()

    Markus Armbruster authored
  2. error: Move qemu_error & friends into their own header

    Markus Armbruster authored
  3. monitor: Factor monitor_set_error() out of qemu_error_internal()

    Markus Armbruster authored
    This separates the monitor part from the QError part.
  4. monitor: Separate "default monitor" and "current monitor" cleanly

    Markus Armbruster authored
    Commits 376253e..731b036 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.
Commits on Mar 9, 2010
  1. QMP: Introduce WATCHDOG event

    Luiz Capitulino authored Anthony Liguori committed
    It's emitted whenever the watchdog device's timer expires. The action
    taken is provided in the 'data' member.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Commits on Mar 8, 2010
  1. QMP: Introduce RTC_CHANGE event

    Luiz Capitulino authored Anthony Liguori committed
    Emitted whenever the RTC time changes.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  2. QMP: Drop DEBUG event

    Luiz Capitulino authored Anthony Liguori committed
    This event has been introduced in the first round of QMP commits,
    turns out that it's based on the usage of the EXCP_DEBUG macro,
    which has discussable semantics when exposed through QMP.
    
    As libvirt doesn't use this, let's just drop it.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Commits on Feb 19, 2010
  1. Monitor: Convert do_change() to cmd_new_ret()

    Luiz Capitulino authored Anthony Liguori committed
    Not that trivial as the call chain also has to be modified.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Commits on Feb 10, 2010
  1. QMP: BLOCK_IO_ERROR event handling

    Luiz Capitulino authored Anthony Liguori committed
    This commit adds the basic definitions for the BLOCK_IO_ERROR
    event, but actual event emission will be introduced by the
    next commits.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Commits on Jan 26, 2010
  1. New API for asynchronous monitor commands

    Adam Litke authored Anthony Liguori committed
    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: Adam Litke <agl@us.ibm.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Commits on Jan 19, 2010
  1. QMP: Introduce VNC_INITIALIZED event

    Luiz Capitulino authored Anthony Liguori committed
    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: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  2. QMP: Introduce VNC_DISCONNECTED event

    Luiz Capitulino authored Anthony Liguori committed
    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: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  3. QMP: Introduce VNC_CONNECTED event

    Luiz Capitulino authored Anthony Liguori committed
    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: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Commits on Dec 12, 2009
  1. @kraxel

    Revert "monitor: Command-line flag to enable control mode"

    kraxel authored Anthony Liguori committed
    This reverts commit adcb181.
    
    Conflicts:
    
    	monitor.h
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Commits on Dec 4, 2009
  1. @blueswirl

    monitor: rename EVENT_* to QEVENT_* to avoid conflict on mingw32

    blueswirl authored
    Partially fixes mingw32 build.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Commits on Dec 3, 2009
  1. QMP: Introduce basic asynchronous events

    Luiz Capitulino authored Anthony Liguori committed
    Debug, shutdown, reset, powerdown and stop are all basic events,
    as they are very simple they can be added in the same commit.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  2. QMP: Asynchronous events infrastructure

    Luiz Capitulino authored Anthony Liguori committed
    Asynchronous events are generated with a call to
    monitor_protocol_event().
    
    This function builds the right data-type and emit the event
    right away. The emitted data is always a JSON object and its
    format is as follows:
    
    { "event": json-string,
      "timestamp": { "seconds": json-number, "microseconds": json-number },
      "data": json-value }
    
    This design is based on ideas by Amit Shah <amit.shah@redhat.com>.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  3. monitor: Command-line flag to enable control mode

    Luiz Capitulino authored Anthony Liguori committed
    This commit adds a flag called 'control' to the '-monitor'
    command-line option. This flag enables control mode.
    
    The syntax is:
    
    qemu [...] -monitor control,<device>
    
    Where <device> is a chardev (excluding 'vc', for obvious reasons).
    
    For example:
    
    $ qemu [...] -monitor control,tcp:localhost:4444,server
    
    Will run QEMU in control mode, waiting for a client TCP connection
    on localhost port 4444.
    
    NOTE: I've tried using QemuOpts for this, but turns out that it
    will try to parse the device part, which should be untouched.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  4. monitor: Introduce MONITOR_USE_CONTROL flag

    Luiz Capitulino authored Anthony Liguori committed
    This flag will be set when Monitor enters "control mode", in
    which the output will be defined by the QEMU Monitor Protocol.
    
    This also introduces a macro to check if the flag is set.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Commits on Sep 4, 2009
  1. monitor: Export QDict header

    Luiz Capitulino authored Anthony Liguori committed
    Command handlers will have to use QDict functions, so export
    qdict.h through monitor.h.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Commits on Jul 27, 2009
  1. @markmc

    Add monitor_get_fd() command for fetching named fds

    markmc authored Anthony Liguori committed
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Commits on Mar 5, 2009
  1. monitor: Introduce MONITOR_USE_READLINE flag (Jan Kiszka)

    aliguori authored
    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: 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@6717 c046a42c-6fe2-441c-8c8c-71466251a162
  2. monitor: Decouple terminals (Jan Kiszka)

    aliguori authored
    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
  3. monitor: Drop banner hiding (Jan Kiszka)

    aliguori authored
    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: 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@6713 c046a42c-6fe2-441c-8c8c-71466251a162
  4. monitor: Rework API (Jan Kiszka)

    aliguori authored
    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: 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@6711 c046a42c-6fe2-441c-8c8c-71466251a162
Something went wrong with that request. Please try again.