History | View | Annotate | Download (3.1 kB)
monitor: Enable adding an inherited fd to an fd set
qmp_add_fd() gets an fd that was received over a socket withSCM_RIGHTS and adds it to an fd set. This patch adds supportthat will enable adding an fd that was inherited on thecommand line to an fd set....
block: introduce BLOCK_JOB_READY event
Even for jobs that need to be manually completed, management may wantto take care itself of the completion, not requiring the user to issuea command to terminate the job. In this case we want to avoid thatthey poll us continuously, waiting for completion to become available....
Merge remote-tracking branch 'kwolf/for-anthony' into staging
block: introduce block job error
The following behaviors are possible:
'report': The behavior is the same as in 1.1. An I/O error,respectively during a read or a write, will complete the job immediatelywith an error code.
'ignore': An I/O error, respectively during a read or a write, will be...
monitor: add Error * argument to monitor_get_fd
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
monitor: Rename+move net_handle_fd_param -> monitor_handle_fd_param
This patch renames+moves the net_handle_fd_param() caller used toobtain a file descriptor from either qemu_parse_fd() (the normal case)or from monitor_get_fd() (migration case) into a generically prefixed...
spice migration: add QEVENT_SPICE_MIGRATE_COMPLETED
When migrating, libvirt queries the migration status, and upon migrationcompletions, it closes the migration src. On the other hand, whenmigration is completed, spice transfers data from the src to destination...
block: Enable qemu_open/close to work with fd sets
When qemu_open is passed a filename of the "/dev/fdset/nnn" format (where nnn is the fdset ID), an fd with matching accessmode flags will be searched for within the specified monitorfd set. If the fd is found, a dup of the fd will be returned...
qmp: add SUSPEND_DISK event
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....
Add event notification for guest balloon changes
After setting a balloon target value, applications have tocontinually poll 'query-balloon' to determine whether theguest has reacted to this request. The virtio-balloon backendknows exactly when the guest has reacted though, and thus it...
Add 'query-events' command to QMP to query async events
Sometimes it is neccessary for an application to determinewhether a particular QMP event is available, so they candecide whether to use compatibility code instead. Thisintroduces a new 'query-events' command to QMP to do just...
suspend: add qmp events
Send qmp events on suspend and wakeup so libvirthas a chance to track the vm state.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qmp: add DEVICE_TRAY_MOVED event
It's emitted whenever the tray is moved by the guest or by HMP/QMPcommands.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>Acked-by: Kevin Wolf <kwolf@redhat.com>
qmp: add block_job_cancel command
Add block_job_cancel, which stops an active block streaming operation.When the operation has been cancelled the new BLOCK_JOB_CANCELLED eventis emitted.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Acked-by: Luiz Capitulino <lcapitulino@redhat.com>...
qmp: add block_stream command
Add the block_stream command, which starts copy backing file contentsinto the image file. Also add the BLOCK_JOB_COMPLETED QMP event whichis emitted when image streaming completes. Later patches add controlover the background copy speed, cancelation, and querying running...
monitor: expose readline state
HMP is now implemented in terms of QMP. The monitor has a bunch of logic todeal with HMP right now like readline support. Export it from the monitor sowe can consume it in hmp.c.
In short time, hmp.c will take over all of the readline bits....
qom: qom_{get, set} monitor commands (v2)
This allows clients to read and write device model properties through QMP. QAPIdoesn't support Visitor types yet and these commands are special in that theydon't work with fixed types.
I've added a documentation stub to qapi-schema.json so we can keep consistency...
qapi: Convert cont
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Monitor: Make mon_set_cpu() public
Also rename it to monitor_set_cpu().
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Monitor: Introduce monitor_get_cpu_index()
Returns 'cur_mons's CPU index. A future commit will use it.
spice: connection events.
This patch adds support for connection events to spice. The events arequite simliar to the vnc events. Unlike vnc spice uses multiple tcpchannels though. qemu will report every single tcp connection (akaspice channel). If you want track spice sessions only you can filter...
Merge remote branch 'qmp/for-anthony' into staging
Use GCC_FMT_ATTR (format checking)
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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))...
Monitor: Drop monitor_cmd_user_only()
This function was only needed when QMP and HMP were sharing dispatchtables, this is no longer true so just drop it.
Add option to turn on JSON pretty printing in monitor
Expaned '-mon' arg to allow a 'pretty=on' flag. This makes themonitor pretty print its replies to easy human debugging / reading
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
monitor: Allow to exclude commands from QMP
Ported commands that are marked 'user_only' will not be considered forQMP 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>...
monitor: Establish cmd flags and convert the async tag
As we want to add more flags to monitor commands, convert the only sofar existing one accordingly.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
QMP: Introduce RESUME event
It's emitted when the Virtual Machine resumes execution.
We currently have the STOP event but don't have the matchingRESUME one, this means that clients are notified when the VMis stopped but don't get anything when it resumes....
error: Trim includes after "Infrastructure to track locations..."
Missed in commit 827b0813.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
monitor: New monitor_cur_is_qmp()
monitor: Separate "default monitor" and "current monitor" cleanly
Commits 376253ec..731b0364 introduced global variable cur_mon, whichpoints to the "default monitor" (if any), except during execution ofmonitor_read() or monitor_control_read() it points to the monitor from...
monitor: Factor monitor_set_error() out of qemu_error_internal()
This separates the monitor part from the QError part.
error: Move qemu_error & friends into their own header
QMP: Introduce WATCHDOG event
It's emitted whenever the watchdog device's timer expires. The actiontaken is provided in the 'data' member.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QMP: Introduce RTC_CHANGE event
Emitted whenever the RTC time changes.
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....
Monitor: Convert do_change() to cmd_new_ret()
Not that trivial as the call chain also has to be modified.
QMP: BLOCK_IO_ERROR event handling
This commit adds the basic definitions for the BLOCK_IO_ERRORevent, but actual event emission will be introduced by thenext commits.
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 needsto be suspended, but QMP monitors could continue to to accept other commands....
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 thesession is authenticated) are provided.
Event example:
{ "event": "VNC_INITIALIZED", "timestamp": {"seconds": 1263475302, "microseconds": 150772},...
QMP: Introduce VNC_CONNECTED event
It's emitted when a VNC client connects to QEMU, client's informationsuch as port and IP address are provided.
Note that this event is emitted right when the connection isestablished. This means that it happens before authentication...
QMP: Introduce VNC_DISCONNECTED event
It's emitted when a VNC client disconnects from QEMU, client'sinformation such as port and IP address are provided.
{ "event": "VNC_DISCONNECTED", "timestamp": { "seconds": 1262976601, "microseconds": 975795 },...
Revert "monitor: Command-line flag to enable control mode"
This reverts commit adcb181afe5a951c521411c7a8e9d9b791aa6742.
Conflicts:
monitor.h
monitor: rename EVENT_* to QEVENT_* to avoid conflict on mingw32
Partially fixes mingw32 build.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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.
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: Introduce MONITOR_USE_CONTROL flag
This flag will be set when Monitor enters "control mode", inwhich 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>...
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)....
monitor: Export QDict header
Command handlers will have to use QDict functions, so exportqdict.h through monitor.h.
Add monitor_get_fd() command for fetching named fds
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Introduce MONITOR_USE_READLINE flag (Jan Kiszka)
This allows to create monitor terminals that do not make use of theinteractive readline back-end but rather send complete commands. Thepass-through monitor interface of the gdbstub will be an example....
monitor: Decouple terminals (Jan Kiszka)
Currently all registered (and activate) monitor terminals work inbroadcast mode: Everyone sees what someone else types on some otherterminal and what the monitor reports back. This model is broken whenyou have a management monitor terminal that is automatically operated...
monitor: Drop banner hiding (Jan Kiszka)
There is no use for the hide/show banner option, and it is appliedinconsistently anyway (or what makes the difference between -serial mon:stdio and -nographic for the monitor?). So drop this mode.
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 servicesgain a new parameter (mon) that will once refer to the monitor instancethe output is supposed to appear on. However, the argument remains...