summaryrefslogtreecommitdiff
path: root/monitor.c
AgeCommit message (Collapse)AuthorFilesLines
2012-02-18target-xtensa: implement info tlb monitor commandMax Filippov1-2/+2
Command dumps valid ITLB and DTLB entries. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2012-01-26qmp: add query-block-jobsStefan Hajnoczi1-0/+7
Add query-block-jobs, which shows the progress of ongoing block device operations. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-01-26qmp: add block_job_cancel commandStefan Hajnoczi1-0/+3
Add block_job_cancel, which stops an active block streaming operation. When the operation has been cancelled the new BLOCK_JOB_CANCELLED event is emitted. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-01-26qmp: add block_stream commandStefan Hajnoczi1-0/+3
Add the block_stream command, which starts copy backing file contents into the image file. Also add the BLOCK_JOB_COMPLETED QMP event which is emitted when image streaming completes. Later patches add control over the background copy speed, cancelation, and querying running streaming operations. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-01-18qapi: Convert changeLuiz Capitulino1-74/+0
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-01-18qerror: Extend QERR_DEVICE_ENCRYPTEDLuiz Capitulino1-1/+2
Include the name of the encrypted file. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-01-18monitor: expose readline stateAnthony Liguori1-3/+8
HMP is now implemented in terms of QMP. The monitor has a bunch of logic to deal with HMP right now like readline support. Export it from the monitor so we can consume it in hmp.c. In short time, hmp.c will take over all of the readline bits. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-01-18qapi: Convert expire_passwordLuiz Capitulino1-39/+0
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-01-18qapi: Convert set_passwordLuiz Capitulino1-57/+0
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-01-18vnc: Simplify vnc_display_password()Luiz Capitulino1-1/+6
Drop the qerror_report() call from it and let its callers set the error themselves. This also allows for dropping the 'ret' variable. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06qapi: Convert human-monitor-commandLuiz Capitulino1-9/+14
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06qapi: Convert inject-nmiLuiz Capitulino1-19/+0
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06qapi: Convert contLuiz Capitulino1-59/+15
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06qapi: Convert pmemsaveLuiz Capitulino1-37/+0
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06qapi: Convert memsaveLuiz Capitulino1-38/+0
Please, note that the QMP command has a new 'cpu-index' parameter. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06qapi: Complete system_powerdown conversionLuiz Capitulino1-10/+0
Commit 5bc465e4b1b6f4582a400c0a7033a1c841744278 converted only the HMP part of the system_powerdown command to the QAPI, this commit completes it by converting the QMP part too. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-11-17monitor: Fix file_completion() to check for stat() failureMarkus Armbruster1-2/+2
stat() can fail for a file name just read with readdir(). Easiest way to trigger is a dangling symbolic link --- look ma, no race! When it fails, file_completion() uses sb.st_mode uninitialized. If the directory bit happens to be set, it appends a "/" to the completed name. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-11-01Sort the help info shown in monitor at runtimeWayne Xia1-4/+26
This patch would try sort the command list in monitor at runtime. As a result, command help and help info would show a more friendly sorted command list. For eg: (qemu)help acl_add acl_policy acl_remove acl_reset acl_show balloon block_passwd ... the command list is sorted. v3: using qsort function to sort the command list. Tested-by: Wenyi Gao <wenyi@linux.vnet.ibm.com> Signed-off-by: Wayne Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-10-31Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori1-289/+24
Conflicts: ui/spice-core.c
2011-10-31Merge remote-tracking branch 'spice/spice.v45' into stagingAnthony Liguori1-2/+4
2011-10-27Monitor: do_info(): Drop QMP command handling codeLuiz Capitulino1-31/+1
Previous commits converted all existing QMP commands to the QAPI, now each info command does its own QMP call. Let's then drop all QMP command handling code from do_info(). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-27QMP: Drop the query commands dispatch tableLuiz Capitulino1-58/+5
Because QMP development originated in the monitor, it has inherited the monitor's distinction between query- and non-query commands. However, previous commits unified both commands and the distinction is gone. This commit drops the query commands dispatch table and does some simplifications along the way. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-27qapi: Convert query-pciLuiz Capitulino1-10/+1
This also fixes a bug with the old version: QMP would invert device id and vendor id. This would look ok on HMP because it was printing "device:vendor" instead of "vendor:device". Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-27qapi: Convert query-balloonLuiz Capitulino1-12/+1
Please, note that some of the code supporting memory statistics is still around (eg. virtio_balloon_receive_stats() and reset_stats()). Also, the qmp_query_balloon() function is synchronous and thus doesn't make any use of the (not fully working) monitor's asynchronous command support (the old non-qapi implementation did). Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-27qapi: Convert query-spiceLuiz Capitulino1-12/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-27qapi: Convert query-vncLuiz Capitulino1-10/+1
There are three important remarks in relation to the non-qapi command: 1. This commit also fixes the behavior of the 'query-vnc' and 'info vnc' commands to return an error when qemu is built without VNC support (ie. --disable-vnc). The non-qapi command would return the OK response in QMP and no response in HMP 2. The qapi version explicitly marks the fields 'host', 'family', 'service' and 'auth' as optional. Their are not documented as optional in the non-qapi command doc, but they would not be returned if vnc support is disabled. The qapi version maintains the same semantics, but documents those fields correctly 3. The 'clients' field, which is a list, is marked as optional but is always returned. If there are no clients connected an empty list is returned. This is not the Right Way to this in the qapi but it's how the non-qapi command used to work Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-27qapi: Convert query-blockstatsLuiz Capitulino1-10/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-27qapi: Convert query-blockLuiz Capitulino1-10/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-27qapi: Convert query-cpusLuiz Capitulino1-100/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-27qapi: Convert the cpu commandLuiz Capitulino1-11/+0
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-27Monitor: Introduce monitor_get_cpu_index()Luiz Capitulino1-0/+5
Returns 'cur_mons's CPU index. A future commit will use it. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-27Monitor: Make mon_set_cpu() publicLuiz Capitulino1-6/+5
Also rename it to monitor_set_cpu(). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-27qapi: Convert query-migrateLuiz Capitulino1-10/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-27qapi: Convert query-miceLuiz Capitulino1-10/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-26target-sparc: Change fpr representation to doubles.Richard Henderson1-48/+48
This allows a more efficient representation for 64-bit hosts. It should be about the same for 32-bit hosts, as we can still access the individual pieces of the double. Signed-off-by: Richard Henderson <rth@twiddle.net>
2011-10-25spice: turn client_migrate_info to asyncYonit Halperin1-2/+4
RHBZ 737921 Spice client is required to connect to the migration target before/as migration starts. Since after migration starts, the target qemu is blocked and cannot accept new spice client we trigger the connection to the target upon client_migrate_info command. client_migrate_info completion cb will be called after spice client has been connected to the target (or a timeout). See following patches and spice patches. Signed-off-by: Yonit Halperin <yhalperi@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-10-16monitor: Restrict pic/irq_info to supporting targetsJan Kiszka1-0/+21
This allows to drop various stubs and move the i8359 into hwlib. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-10-11block: Keep track of devices' I/O statusLuiz Capitulino1-0/+6
This commit adds support to the BlockDriverState type to keep track of devices' I/O status. There are three possible status: BDRV_IOS_OK (no error), BDRV_IOS_ENOSPC (no space error) and BDRV_IOS_FAILED (any other error). The distinction between no space and other errors is important because a management application may want to watch for no space in order to extend the space assigned to the VM and put it to run again. Qemu devices supporting the I/O status feature have to enable it explicitly by calling bdrv_iostatus_enable() _and_ have to be configured to stop the VM on errors (ie. werror=stop|enospc or rerror=stop). In case of multiple errors being triggered in sequence only the first one is stored. The I/O status is always reset to BDRV_IOS_OK when the 'cont' command is issued. Next commits will add support to some devices and extend the query-block/info block commands to return the I/O status information. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-10-10Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori1-248/+33
2011-10-08Merge branch 'tracing' of git://repo.or.cz/qemu/stefanhaBlue Swirl1-2/+5
* 'tracing' of git://repo.or.cz/qemu/stefanha: trace: add arguments to bdrv_co_io_em() trace event trace: trace monitor qmp dispatch/completion trace: trace bdrv_open_common() hmp: re-enable trace-file command
2011-10-06ppc: booke206: add "info tlb" supportScott Wood1-2/+3
Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-04qapi: Convert system_resetLuiz Capitulino1-10/+0
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04qapi: Convert stopLuiz Capitulino1-9/+0
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04qapi: Convert quitLuiz Capitulino1-12/+0
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04qapi: Convert query-commandsLuiz Capitulino1-25/+15
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04qapi: Convert query-chardevLuiz Capitulino1-10/+1
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Tested-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04qapi: Convert query-uuidLuiz Capitulino1-27/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04qapi: Convert query-statusLuiz Capitulino1-40/+1
Please, note that the RunState type as defined in sysemu.h and its runstate_as_string() function are being dropped in favor of the RunState type generated by the QAPI. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04RunState: Rename enum values as generated by the QAPILuiz Capitulino1-5/+5
Next commit will convert the query-status command to use the RunState type as generated by the QAPI. In order to "transparently" replace the current enum by the QAPI one, we have to make some changes to some enum values. As the changes are simple renames, I'll do them in one shot. The changes are: - Rename the prefix from RSTATE_ to RUN_STATE_ - RUN_STATE_SAVEVM to RUN_STATE_SAVE_VM - RUN_STATE_IN_MIGRATE to RUN_STATE_INMIGRATE - RUN_STATE_PANICKED to RUN_STATE_INTERNAL_ERROR - RUN_STATE_POST_MIGRATE to RUN_STATE_POSTMIGRATE - RUN_STATE_PRE_LAUNCH to RUN_STATE_PRELAUNCH - RUN_STATE_PRE_MIGRATE to RUN_STATE_PREMIGRATE - RUN_STATE_RESTORE to RUN_STATE_RESTORE_VM - RUN_STATE_PRE_MIGRATE to RUN_STATE_FINISH_MIGRATE Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04qapi: Convert query-kvmLuiz Capitulino1-35/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>