summaryrefslogtreecommitdiffstats
path: root/hmp.c
Commit message (Collapse)AuthorAgeFilesLines
...
* qapi: Convert getfd and closefdCorey Bryant2012-07-131-0/+18
| | | | | Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* Add spent time for migrationJuan Quintela2012-06-291-0/+2
| | | | | | | | | | We add time spent for migration to the output of "info migrate" command. 'total_time' means time since the start fo migration if migration is 'active', and total time of migration if migration is completed. As we are also interested in transferred ram when migration completes, adding all ram statistics Signed-off-by: Juan Quintela <quintela@redhat.com>
* qmp: include monitor.h when neededPaolo Bonzini2012-06-151-0/+1
| | | | | | | This is needed to get file descriptors from SCM_RIGHTS. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: convert netdev_delLuiz Capitulino2012-06-041-0/+9
| | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
* qapi: convert netdev_addLuiz Capitulino2012-06-041-0/+21
| | | | | | | | | | | | | | | | | | | | | This is not a full QAPI conversion, but an intermediate step. In essence, do_netdev_add() is split into three functions: 1. netdev_add(): performs the actual work. This function is fully converted to Error (thus, it's "qapi-friendly") 2. qmp_netdev_add(): the QMP front-end for netdev_add(). This is coded by hand and not auto-generated (gen=no in the schema). The reason for this it's a lot easier and simpler to with QemuOpts this way 3. hmp_netdev_add(): HMP front-end. This design was suggested by Paolo Bonzini. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
* introduce a new monitor command 'dump-guest-memory' to dump guest's memoryWen Congyang2012-06-041-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | The command's usage: dump-guest-memory [-p] protocol [begin] [length] The supported protocol can be file or fd: 1. file: the protocol starts with "file:", and the following string is the file's path. 2. fd: the protocol starts with "fd:", and the following string is the fd's name. Note: 1. If you want to use gdb to process the core, please specify -p option. The reason why the -p option is not default is: a. guest machine in a catastrophic state can have corrupted memory, which we cannot trust. b. The guest machine can be in read-mode even if paging is enabled. For example: the guest machine uses ACPI to sleep, and ACPI sleep state goes in real-mode. 2. If you don't want to dump all guest's memory, please specify the start physical address and the length. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* stream: fix HMP block_job_set_speedPaolo Bonzini2012-05-101-1/+1
| | | | | | | The change of the argument name from value to speed was not propagated there. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* spice_info: add mouse_modeAlon Levy2012-05-031-0/+2
| | | | | | | | Add mouse_mode, either server or mouse, to qmp and hmp commands, based on spice_server_is_server_mouse added in spice-server 0.10.3. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* block: add 'speed' optional parameter to block-streamStefan Hajnoczi2012-04-271-1/+3
| | | | | | | | | | | | Allow streaming operations to be started with an initial speed limit. This eliminates the window of time between starting streaming and issuing block-job-set-speed. Users should use the new optional 'speed' parameter instead so that speed limits are in effect immediately when the job starts. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: convert device_delLuiz Capitulino2012-04-091-0/+9
| | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* qapi: Convert migrateLuiz Capitulino2012-03-151-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | The migrate command is one of those commands where HMP and QMP completely mix up together. This made the conversion to the QAPI (which separates the command into QMP and HMP parts) a bit difficult. The first important change to be noticed is that this commit completes the removal of the Monitor object from migration code, started by the previous commit. Another important and tricky change is about supporting the non-detached mode. That is, if the user doesn't pass '-d' the migrate command will lock the monitor and will only release it when migration is finished. To support this in the new HMP command (hmp_migrate()), it is necessary to create a timer which runs every second and checks if the migration is still active. If it is, the timer callback will re-schedule itself to run one second in the future. If the migration has already finished, the monitor lock is released and the user can use it normally. All these changes should be transparent to the user. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qmp: convert blockdev-snapshot-sync to a wrapper around transactionsPaolo Bonzini2012-03-121-1/+5
| | | | | | | | | Simplify the blockdev-snapshot-sync code and gain failsafe operation by turning it into a wrapper around the new transaction command. A new option is also added matching "mode". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* suspend: add system_wakeup monitor commandGerd Hoffmann2012-02-241-0/+5
| | | | | | | | This patch adds the system_wakeup monitor command which will simply wake up suspended guests. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qmp: add query-block-jobsStefan Hajnoczi2012-01-261-0/+36
| | | | | | | | | 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>
* qmp: add block_job_cancel commandStefan Hajnoczi2012-01-261-0/+10
| | | | | | | | | | 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>
* qmp: add block_job_set_speed commandStefan Hajnoczi2012-01-261-0/+11
| | | | | | | | | Add block_job_set_speed, which sets the maximum speed for a background block operation. 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>
* qmp: add block_stream commandStefan Hajnoczi2012-01-261-0/+11
| | | | | | | | | | | | 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>
* qapi: Convert block_set_io_throttleLuiz Capitulino2012-01-181-0/+14
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert changeLuiz Capitulino2012-01-181-0/+57
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert ejectLuiz Capitulino2012-01-181-0/+10
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert expire_passwordLuiz Capitulino2012-01-181-0/+10
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert set_passwordLuiz Capitulino2012-01-181-0/+11
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* prepare for future GPLv2+ relicensingPaolo Bonzini2012-01-131-0/+2
| | | | | | | | | All files under GPLv2 will get GPLv2+ changes starting tomorrow. event_notifier.c and exec-obsolete.h were only ever touched by Red Hat employees and can be relicensed now. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* hmp: Fix freeing of PciInfoListStefan Berger2012-01-131-4/+4
| | | | | | | | Remember the original PciInfoList in info_list and use the info variable to traverse the list. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* qapi: Convert migrate_set_speedLuiz Capitulino2011-12-061-0/+6
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert migrate_set_downtimeLuiz Capitulino2011-12-061-0/+6
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert migrate_cancelLuiz Capitulino2011-12-061-0/+5
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert blockdev_snapshot_syncLuiz Capitulino2011-12-061-0/+19
| | | | | | | | | | | | | | | | | | | | | | Unfortunately, this conversion required an additional change. In the old QMP command, the 'snapshot-file' argument is specified as optional. The idea is to take the snapshot internally if 'snapshot-file' is not passed. However, internal snapshots are not supported yet so the command returns a MissingParamater error if 'snapshot-file' is not passed. Which makes the argument actually required and will cause compatibility breakage if we change that in the future. To fix this the QAPI converted blockdev_snapshot_sync command makes the 'snapshot-file' argument required. Again, in practice it's actually required, so this is not incompatible. If we do implement internal snapshots someday, we'll need a new argument for it. Note that this discussion doesn't affect HMP. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert block_resizeLuiz Capitulino2011-12-061-0/+10
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert balloonLuiz Capitulino2011-12-061-0/+12
| | | | | | | | | Note that the command being dropped uses the deprecated MONITOR_CMD_ASYNC API, but the new command is a regular synchronous command. There shouldn't be visible differences though, as MONITOR_CMD_ASYNC is internal only. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert block_passwdLuiz Capitulino2011-12-061-0/+10
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert set_linkLuiz Capitulino2011-12-061-0/+10
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert inject-nmiLuiz Capitulino2011-12-061-0/+8
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert contLuiz Capitulino2011-12-061-0/+32
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert pmemsaveLuiz Capitulino2011-12-061-0/+11
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert memsaveLuiz Capitulino2011-12-061-0/+19
| | | | | | | 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>
* hmp/qmp: add block_set_io_throttleZhi Yong Wu2011-12-051-0/+10
| | | | | | Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qapi: Convert query-pciLuiz Capitulino2011-10-271-0/+101
| | | | | | | | | 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>
* qapi: Convert query-balloonLuiz Capitulino2011-10-271-0/+39
| | | | | | | | | | | | 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>
* qapi: Convert query-spiceLuiz Capitulino2011-10-271-0/+43
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert query-vncLuiz Capitulino2011-10-271-0/+46
| | | | | | | | | | | | | | | | | | | | | | | 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>
* qapi: Convert query-blockstatsLuiz Capitulino2011-10-271-0/+34
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert query-blockLuiz Capitulino2011-10-271-0/+42
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert query-cpusLuiz Capitulino2011-10-271-0/+39
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert the cpu commandLuiz Capitulino2011-10-271-0/+12
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert query-migrateLuiz Capitulino2011-10-271-0/+31
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert query-miceLuiz Capitulino2011-10-271-0/+20
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert system_powerdownLuiz Capitulino2011-10-041-0/+5
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert system_resetLuiz Capitulino2011-10-041-0/+5
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert stopLuiz Capitulino2011-10-041-0/+5
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
OpenPOWER on IntegriCloud