Statistics
| Branch: | Revision:

root / monitor.h @ 9a85d394

History | View | Annotate | Download (1.6 kB)

# Date Author Comment
48f57044 10/05/2010 09:54 pm Anthony Liguori

Merge remote branch 'qmp/for-anthony' into staging

8b7968f7 10/03/2010 09:34 am Stefan Weil

Use GCC_FMT_ATTR (format checking)

Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

e5924d89 10/03/2010 09:34 am Stefan Weil

Replace most gcc format attributes by macro GCC_FMT_ATTR (format checking)

Since version 4.4.x, gcc supports additional format attributes.
attribute ((format (gnu_printf, 1, 2)))
should be used instead of
attribute ((format (printf, 1, 2))...

0e19a627 10/01/2010 04:20 pm Luiz Capitulino

Monitor: Drop monitor_cmd_user_only()

This function was only needed when QMP and HMP were sharing dispatch
tables, this is no longer true so just drop it.

Signed-off-by: Luiz Capitulino <>

39eaab9a 10/01/2010 04:12 pm Daniel P. Berrange

Add option to turn on JSON pretty printing in monitor

Expaned '-mon' arg to allow a 'pretty=on' flag. This makes the
monitor pretty print its replies to easy human debugging / reading

Signed-off-by: Daniel P. Berrange <>
Signed-off-by: Luiz Capitulino <>

a6c4d364 07/01/2010 08:27 pm Jan Kiszka

monitor: Allow to exclude commands from QMP

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 <>...

8ac470c1 07/01/2010 07:58 pm Jan Kiszka

monitor: Establish cmd flags and convert the async tag

As we want to add more flags to monitor commands, convert the only so
far existing one accordingly.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Luiz Capitulino <>

6ed2c484 05/03/2010 08:39 pm Luiz Capitulino

QMP: Introduce RESUME event

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....

fc2377ea 03/27/2010 03:30 pm Markus Armbruster

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

Missed in commit 827b0813.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Aurelien Jarno <>

6620d3ce 03/16/2010 06:01 pm Markus Armbruster

monitor: New monitor_cur_is_qmp()

8631b608 03/16/2010 05:55 pm Markus Armbruster

monitor: Separate "default monitor" and "current monitor" cleanly

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...

d6f46833 03/16/2010 05:55 pm Markus Armbruster

monitor: Factor monitor_set_error() out of qemu_error_internal()

This separates the monitor part from the QError part.

2f792016 03/16/2010 05:55 pm Markus Armbruster

error: Move qemu_error & friends into their own header

9eedeb3b 03/09/2010 04:47 pm Luiz Capitulino

QMP: Introduce WATCHDOG event

It's emitted whenever the watchdog device's timer expires. The action
taken is provided in the 'data' member.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

80cd3478 03/08/2010 07:30 pm Luiz Capitulino

QMP: Introduce RTC_CHANGE event

Emitted whenever the RTC time changes.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

51a3bd71 03/08/2010 07:30 pm Luiz Capitulino

QMP: Drop DEBUG event

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....

0bbc47bb 02/19/2010 11:18 pm Luiz Capitulino

Monitor: Convert do_change() to cmd_new_ret()

Not that trivial as the call chain also has to be modified.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

aa1db6ed 02/10/2010 07:57 pm Luiz Capitulino

QMP: BLOCK_IO_ERROR event handling

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 <>
Signed-off-by: Anthony Liguori <>

940cc30d 01/27/2010 01:08 am Adam Litke

New API for asynchronous monitor commands

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....

0d2ed46a 01/20/2010 12:31 am Luiz Capitulino

QMP: Introduce VNC_INITIALIZED event

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},...

586153d9 01/20/2010 12:31 am Luiz Capitulino

QMP: Introduce VNC_CONNECTED event

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...

0d72f3d3 01/20/2010 12:31 am Luiz Capitulino

QMP: Introduce VNC_DISCONNECTED event

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 },...

4e307fc8 12/12/2009 03:59 pm Gerd Hoffmann

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

This reverts commit adcb181afe5a951c521411c7a8e9d9b791aa6742.

Conflicts:

monitor.h

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

242cd003 12/04/2009 08:05 pm Blue Swirl

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

Partially fixes mingw32 build.

Signed-off-by: Blue Swirl <>

b1a15e7e 12/03/2009 05:41 pm Luiz Capitulino

QMP: Introduce basic asynchronous events

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 <>
Signed-off-by: Anthony Liguori <>

0d1ea871 12/03/2009 05:41 pm Luiz Capitulino

QMP: Asynchronous events infrastructure

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:...

418173c7 12/03/2009 05:41 pm Luiz Capitulino

monitor: Introduce MONITOR_USE_CONTROL flag

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 <>...

adcb181a 12/03/2009 05:41 pm Luiz Capitulino

monitor: Command-line flag to enable control mode

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)....

cdb0def3 09/04/2009 05:37 pm Luiz Capitulino

monitor: Export QDict header

Command handlers will have to use QDict functions, so export
qdict.h through monitor.h.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

7768e04c 07/27/2009 04:39 pm Mark McLoughlin

Add monitor_get_fd() command for fetching named fds

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

cde76ee1 03/06/2009 01:01 am aliguori

monitor: Introduce MONITOR_USE_READLINE flag (Jan Kiszka)

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....

731b0364 03/06/2009 01:01 am aliguori

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...

bb806047 03/06/2009 01:01 am aliguori

monitor: Drop banner hiding (Jan Kiszka)

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 <>...

376253ec 03/06/2009 01:01 am aliguori

monitor: Rework API (Jan Kiszka)

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...