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 <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QMP: Output support
In the new Monitor output is always performed by only twofunctions: do_info() and monitor_call_handler().
To support QMP output, we modify those functions to check if weare in control mode. If so, we call monitor_protocol_emitter()...
QMP: do_info() checks
This commit adds specific QMP checks to do_info(), so thatit behaves as expected in QMP mode.
QMP: Input support
The JSON stream parser is used to do QMP input. When thereare enough characters to be parsed it calls Monitor'shandle_qmp_command() function to handle the input.
This function's job is to check if the input is correct andcall the appropriate handler. In other words, it does for QMP...
QMP: Allow 'query-' commands
The 'info' command makes sense for the user protocol, but for QMPit doesn't, as its return data is not well defined. That is, itcan return anything.
To fix this Avi proposes having 'query-' commands when in protocolmode. For example, 'info balloon' would become 'query-balloon'....
QMP: Asynchronous events infrastructure
Asynchronous events are generated with a call tomonitor_protocol_event().
This function builds the right data-type and emit the eventright away. The emitted data is always a JSON object and itsformat is as follows:...
monitor: Rename monitor_handle_command()
As this series will add a new kind of Monitor command, it's betterto rename monitor_handle_command() to what it really is:handle_user_command().
This will avoid confusion.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
monitor: Introduce 'info commands'
List QMP available commands. Only valid in control mode, wherehas to be used as 'query-commands.
QError: Add errors needed by QMP
Only QERR_QMP_BAD_INPUT_OBJECT is QMP specific, the others canbe used in different contexts by other subsystems.
Please, note that QERR_JSON_PARSING signals any parsing errorfrom the json parser. We will need it until the parser gets...
QMP: Initial support
This commit adds initial QMP support in QEMU. It's importantto notice that most QMP code will be part of the Monitor.
Input will be read by monitor_control_read(). Currently itdoes nothing but next patches will add proper input support....
View all revisions | View revisions
Also available in: Atom