aboutsummaryrefslogtreecommitdiff
path: root/hmp.h
AgeCommit message (Collapse)Author
2014-06-19hmp: add info memdevHu Tao
This is the hmp counterpart of qmp query-memdev. Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> MST: fix build on 32 bit
2014-06-11monitor: Add delvm and loadvm argument completionHani Benhabiles
Signed-off-by: Hani Benhabiles <hani@linux.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-06-11monitor: Add host_net_remove arguments completionHani Benhabiles
Relies on readline unique completion strings patch to make the added vlan/hub completion values unique, instead of using something like a hash table. Signed-off-by: Hani Benhabiles <hani@linux.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-06-11monitor: Add host_net_add device argument completionHani Benhabiles
Also fix the parameters documentation. Signed-off-by: Hani Benhabiles <hani@linux.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-06-11monitor: Add migrate_set_capability completionHani Benhabiles
Signed-off-by: Hani Benhabiles <hani@linux.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-06-11monitor: Add watchdog_action argument completionHani Benhabiles
Signed-off-by: Hani Benhabiles <hani@linux.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-06-11monitor: Add ringbuf_write and ringbuf_read argument completionHani Benhabiles
Export chr_is_ringbuf() function. Also remove left-over function prototypes while at it. Signed-off-by: Hani Benhabiles <hani@linux.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-05-15monitor: Add netdev_del id argument completion.Hani Benhabiles
Signed-off-by: Hani Benhabiles <hani@linux.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-05-15monitor: Add netdev_add type argument completion.Hani Benhabiles
Also update the command's documentation. Signed-off-by: Hani Benhabiles <hani@linux.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-05-15monitor: Add set_link arguments completion.Hani Benhabiles
Make it possible to query all net clients without specifying an ID when calling qemu_find_net_clients_except(). This also adds the add_completion_option() function which is to be used for other commands completions as well. Signed-off-by: Hani Benhabiles <hani@linux.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-05-15monitor: Add chardev-add backend argument completion.Hani Benhabiles
Signed-off-by: Hani Benhabiles <hani@linux.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-05-15monitor: Add chardev-remove command completion.Hani Benhabiles
Signed-off-by: Hani Benhabiles <hani@linux.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-05-15monitor: Convert sendkey to use command_completion.Hani Benhabiles
Signed-off-by: Hani Benhabiles <hani@linux.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25monitor: Add device_add and device_del completion.Hani Benhabiles
Also fix device_add completion including non-hotpluggable devices. Signed-off-by: Hani Benhabiles <hani@linux.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25monitor: Add command_completion callback to mon_cmd_t.Hani Benhabiles
Convert object_add and object_del commands to use the new callback. Signed-off-by: Hani Benhabiles <hani@linux.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-01-06monitor: add object-add (QMP) and object_add (HMP) commandPaolo Bonzini
Add two commands that are the monitor counterparts of -object. The commands have the same Visitor-based implementation, but use different kinds of visitors so that the HMP command has a DWIM string-based syntax, while the QMP variant accepts a stricter JSON-based properties dictionary. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-01-06monitor: add object-del (QMP) and object_del (HMP) commandPaolo Bonzini
These two commands invoke the "unparent" method of Object. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-01-06qemu-monitor: HMP cpu-add wrapperJason J. Herne
Add HMP cpu-add wrapper to allow cpu hot plugging via monitor. Signed-off-by: Jason J. Herne <jjherne@us.ibm.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-09-12hmp: add interface hmp_snapshot_delete_blkdev_internalWenchao Xia
It is hard to make both id and name optional in hmp console as qmp interface, so this interface require user to specify name. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-09-12hmp: add interface hmp_snapshot_blkdev_internalWenchao Xia
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-07-15block: add drive_backup HMP commandStefan Hajnoczi
Make "drive_backup" available on the HMP monitor: drive_backup [-n] [-f] device target [format] The -n flag requests QEMU to reuse the image found in new-image-file, instead of recreating it from scratch. The -f flag requests QEMU to copy the whole disk, so that the result does not need a backing file. Note that this flag *must* currently be passed since the other sync modes ('none' and 'top') have not been implemented yet. Requiring it ensures that "drive_backup" behaves like "drive_mirror". Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-06-06Make qemu-io commands available in HMPKevin Wolf
It was decided to not make this command available in QMP in order to make clear that this is not supposed to be a stable API and should be used only for testing and debugging purposes. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-12Revert "New QMP command query-cpu-max and HMP command cpu_max"Michal Novotny
This reverts commit 4d700430a20b3d53b7b15bc5f6666f7e570e3f2c as asked by Luiz. The patch has been obsoleted by extending MachineInfo structure by cpu-max field. Signed-off-by: Michal Novotny <minovotn@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-03-25New QMP command query-cpu-max and HMP command cpu_maxMichal Novotny
These commands return the maximum number of CPUs supported by the currently running emulator instance, as defined in its QEMUMachine struct. Signed-off-by: Michal Novotny <minovotn@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-03-12Support for TPM command line optionsStefan Berger
This patch adds support for TPM command line options. The command line options supported here are ./qemu-... -tpmdev passthrough,path=<path to TPM device>,id=<id> -device tpm-tis,tpmdev=<id>,id=<other id> and ./qemu-... -tpmdev help where the latter works similar to -soundhw help and shows a list of available TPM backends (for example 'passthrough'). Using the type parameter, the backend is chosen, i.e., 'passthrough' for the passthrough driver. The interpretation of the other parameters along with determining whether enough parameters were provided is pushed into the backend driver, which needs to implement the interface function 'create' and return a TPMDriverOpts structure if the VM can be started or 'NULL' if not enough or bad parameters were provided. Monitor support for 'info tpm' has been added. It for example prints the following: (qemu) info tpm TPM devices: tpm0: model=tpm-tis \ tpm0: type=passthrough,path=/dev/tpm0,cancel-path=/sys/devices/pnp0/00:09/cancel Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Reviewed-by: Joel Schopp <jschopp@linux.vnet.ibm.com> Message-id: 1361987275-26289-2-git-send-email-stefanb@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-02-06qemu-char: Saner naming of memchar stuff & doc fixesMarkus Armbruster
New device, has never been released, so we can still improve things without worrying about compatibility. Naming is a mess. The code calls the device driver CirMemCharDriver, the public API calls it "memory", "memchardev", or "memchar", and the special commands are named like "memchar-FOO". "memory" is a particularly unfortunate choice, because there's another character device driver called MemoryDriver. Moreover, the device's distinctive property is that it's a ring buffer, not that's in memory. Therefore: * Rename CirMemCharDriver to RingBufCharDriver, and call the thing a "ringbuf" in the API. * Rename QMP and HMP commands from memchar-FOO to ringbuf-FOO. * Rename device parameter from maxcapacity to size (simple words are good for you). * Clearly mark the parameter as optional in documentation. * Fix error reporting so that chardev-add reports to current monitor, not stderr. * Replace cirmem in C identifiers by ringbuf. * Rework documentation. Document the impact of our crappy UTF-8 handling on reading. * QMP examples that even work. I could split this up into multiple commits, but they'd change the same documentation lines multiple times. Not worth it. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-25QAPI: Introduce memchar-read QMP commandLei Li
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-01-25QAPI: Introduce memchar-write QMP commandLei Li
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-01-17HMP: add QDict to info callback handlerWenchao Xia
This patch change all info call back function to take additional QDict * parameter, which allow those command take parameter. Now it is set to NULL at default case. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-01-16chardev: add hmp hotplug commandsGerd Hoffmann
Add chardev-add and chardev-remove commands to the human monitor. chardev-add accepts the same syntax as -chardev, chardev-remove expects a chardev id. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-12-19qapi: move include files to include/qobject/Paolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-11-12hmp: add NBD server commandsPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-24qmp: add drive-mirror commandPaolo Bonzini
This adds the monitor commands that start the mirroring job. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-10-24block: add block-job-completePaolo Bonzini
While streaming can be dropped as soon as it progressed through the whole image, mirroring needs to be completed manually for two reasons: 1) so that management knows exactly when the VM switches to the target; 2) because for other use cases such as replication, we may leave the operation running for the whole life of the virtual machine. Add a new block job command that manually completes background operations. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-09-28qmp: add block-job-pause and block-job-resumePaolo Bonzini
Add QMP commands matching the functionality. Paused jobs cannot be canceled without first resuming them. This ensures that I/O errors are never missed by management. However, an optional force argument can be specified to allow that. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-09-05qapi: convert screendumpLuiz Capitulino
Next commits will update devices to propagate errors. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-09-05qapi: convert sendkeyAmos Kong
Convert 'sendkey' to use QAPI. QAPI passes key's index of mapping table to qmp_send_key(), not keycode. So we use help functions to convert key/code to index of key_defs, and 'index' will be converted to 'keycode' inside qmp_send_key(). For qmp, QAPI would check invalid key and raise error. For hmp, invalid key is checked in hmp_send_key(). 'send-key' of QMP doesn't support key in hexadecimal format. Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-08-13Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori
* qmp/queue/qmp: (48 commits) target-ppc: add implementation of query-cpu-definitions (v2) target-i386: add implementation of query-cpu-definitions (v2) qapi: add query-cpu-definitions command (v2) compiler: add macro for GCC weak symbols qapi: add query-machines command qapi: mark QOM commands stable qmp: introduce device-list-properties command qmp: add SUSPEND_DISK event qmp: qmp-events.txt: add missing doc for the SUSPEND event qmp: qmp-events.txt: put events in alphabetical order qmp: emit the WAKEUP event when the guest is put to run qmp: don't emit the RESET event on wakeup from S3 scripts: qapi-commands.py: qmp-commands.h: include qdict.h docs: writing-qmp-commands.txt: update error section error, qerror: drop QDict member qerror: drop qerror_table and qerror_format() error, qerror: pass desc string to error calls error: drop error_get_qobject()/error_set_qobject() qemu-ga: switch to the new error format on the wire qmp: switch to the new error format on the wire ...
2012-08-13hmp: hmp.h: include qdict.hLuiz Capitulino
hmp.h is relying on qdict.h being provided by qapi-types.h. Fix this, as a future commit will change qapi-types.h not to provide qdict.h. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2012-08-08Add migrate_set_cache_size commandOrit Wasserman
Change XBZRLE cache size in bytes (the size should be a power of 2, it will be rounded down to the nearest power of 2). If XBZRLE cache size is too small there will be many cache miss. New query-migrate-cache-size QMP command and 'info migrate_cache_size' HMP command to query cache value. Signed-off-by: Benoit Hudzia <benoit.hudzia@sap.com> Signed-off-by: Petter Svard <petters@cs.umu.se> Signed-off-by: Aidan Shribman <aidan.shribman@sap.com> Signed-off-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2012-08-08Add migrate-set-capabilitiesOrit Wasserman
The management can enable/disable a capability for the next migration by using migrate-set-capabilities QMP command. The user can use migrate_set_capability HMP command. Signed-off-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2012-08-08Add migration capabilitiesOrit Wasserman
The management can query the current migration capabilities using query-migrate-capabilities QMP command. The user can use 'info migrate_capabilities' HMP command. Currently only XBZRLE capability is available. Signed-off-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2012-07-13qapi: Convert getfd and closefdCorey Bryant
Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-06-04qapi: convert netdev_delLuiz Capitulino
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-By: Laszlo Ersek <lersek@redhat.com>
2012-06-04qapi: convert netdev_addLuiz Capitulino
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>
2012-06-04introduce a new monitor command 'dump-guest-memory' to dump guest's memoryWen Congyang
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>
2012-04-09qapi: convert device_delLuiz Capitulino
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>
2012-03-15qapi: Convert migrateLuiz Capitulino
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>
2012-02-24suspend: add system_wakeup monitor commandGerd Hoffmann
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>
2012-01-26qmp: add query-block-jobsStefan Hajnoczi
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>