History | View | Annotate | Download (47.8 kB)
readline: decouple readline from the monitor
Make the readline.c functionality reusable. Instead of callingmonitor_printf() and monitor_flush() directly, invoke function pointersprovided by the user.
This way readline.c does not know about Monitor and other users will be...
monitor: add object-del (QMP) and object_del (HMP) command
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>...
monitor: add object-add (QMP) and object_add (HMP) command
Add two commands that are the monitor counterparts of -object. The commandshave the same Visitor-based implementation, but use different kinds ofvisitors so that the HMP command has a DWIM string-based syntax, while...
qemu-monitor: HMP cpu-add wrapper
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>
hmp: drop bogus "[not inserted]"
Commit 3e9fab690d59ac15956c3733fe0794ce1ae4c4af ("block: Add support forthrottling burst max in QMP and the command line.") introduced bogus"[not inserted]" output, possibly due to a merge failure. Remove thisartifact....
hmp: block-stream: fix typo
Found this by enabling C++ errors. The bool and enum argumentsare mistakenly flipped.
Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
hmp: add interface hmp_snapshot_blkdev_internal
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hmp: add interface hmp_snapshot_delete_blkdev_internal
It is hard to make both id and name optional in hmp console as qmpinterface, so this interface require user to specify name.
Merge remote-tracking branch 'mdroth/qga-pull-2013-9-9' into staging
Add c++ keywords to QAPI helper script
Add c++ keywords to avoid errors in compiling with c++ compiler.This also renames class member of PciDeviceInfo to q_class.
Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>...
block: Add support for throttling burst max in QMP and the command line.
The max parameter of the leaky bucket throttling algorithm can be used toallow the guest to do bursts.The max value is a pool of I/O that the guest can use without being throttled...
block: Add iops_size to do the iops accounting for a given io size.
This feature can be used in case where users are avoiding the iops limit bydoing jumbo I/Os hammering the storage backend.
Signed-off-by: Benoit Canet <benoit@irqsave.net>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
aio / timers: Switch entire codebase to the new timer API
This is an autogenerated patch using scripts/switch-timer-api.
Switch the entire code base to using the new timer API.
Note this patch may introduce some line length issues.
Signed-off-by: Alex Bligh <alex@alex.org.uk>...
rdma: account for the time spent in MIG_STATE_SETUP through QMP
Using the previous patches, we're now able to timestamp the SETUPstate. Once we have this time, let the user know about it in theschema.
Reviewed-by: Juan Quintela <quintela@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>...
block: add drive_backup HMP command
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...
hmp: Make "info block" output more readable
HMP is meant for humans and you should notice it.
This changes the output format to use a bit more space to display theinformation more readable and leaves out irrelevant information (e.g.mention only that an image is encrypted, but not when it's not; display...
rdma: export throughput w/ MigrationStats QMP
This exposes throughput (in megabits/sec) through QMP.
Reviewed-by: Juan Quintela <quintela@redhat.com>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Chegu Vinod <chegu_vinod@hp.com>Tested-by: Chegu Vinod <chegu_vinod@hp.com>...
hmp: show ImageInfo in 'info block'
Now human monitor can show image details, include internalsnapshot and backing chain info for every block device.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hmp: add parameters device and -v for info block
With these parameters, user can choose the information to be showed,to avoid message flood in the monitor.
Make qemu-io commands available in HMP
It was decided to not make this command available in QMP in order tomake clear that this is not supposed to be a stable API and should beused only for testing and debugging purposes.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
Merge remote-tracking branch 'bonzini/hw-dirs' into staging
sysemu: avoid proliferation of include/ subdirectories
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Revert "New QMP command query-cpu-max and HMP command cpu_max"
This reverts commit 4d700430a20b3d53b7b15bc5f6666f7e570e3f2c as asked byLuiz. The patch has been obsoleted by extending MachineInfo structureby cpu-max field.
Signed-off-by: Michal Novotny <minovotn@redhat.com>...
Merge remote-tracking branch 'quintela/migration.next' into staging
migration: do not sent zero pages in bulk stage
during bulk stage of ram migration if a page is azero page do not send it at all.the memory at the destination reads as zero anyway.
even if there is an madvise with QEMU_MADV_DONTNEEDat the target upon receipt of a zero page I have observed...
QMP: Remove duplicate TPM type from query-tpm
Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>Reviewed-by: Eric Blake <eblake@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
New QMP command query-cpu-max and HMP command cpu_max
These commands return the maximum number of CPUs supported by thecurrently running emulator instance, as defined in its QEMUMachinestruct.
Signed-off-by: Michal Novotny <minovotn@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Support for TPM command line options
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>...
error: Strip trailing '\n' from error string arguments (again)
Commit 6daf194d and be62a2eb got rid of a bunch, but they keep comingback. Tracked down with this Coccinelle semantic patch:
r expression err, eno, cls, fmt; position p; @@ (...
r
hmp: make memchar-read escape ASCII control chars except \n and \t
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char: Saner naming of memchar stuff & doc fixes
New device, has never been released, so we can still improve thingswithout 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...
qmp: Fix design bug and read beyond buffer in memchar-write
Command memchar-write takes data and size parameter. Begs thequestion what happens when data doesn't match size.
With format base64, qmp_memchar_write() copies the full data argument,regardless of size argument....
qmp: Clean up design of memchar-read
The data returned has a well-defined size, which makes the sizereturned along with it redundant at best. Drop it.
Fix error message in migrate_set_capability HMP command
Signed-off-by: Orit Wasserman <owasserm@redhat.com>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Merge remote-tracking branch 'kwolf/for-anthony' into staging
mirror: allow customizing the granularity
The desired granularity may be very different depending on the kind ofoperation (e.g. continuous replication vs. collapse-to-raw) and whetherthe VM is expected to perform lots of I/O while mirroring is in progress....
mirror: add buf-size argument to drive-mirror
This makes sense when the next commit starts using the extra buffer spaceto perform many I/O operations asynchronously.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
QAPI: Introduce memchar-read QMP command
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
QAPI: Introduce memchar-write QMP command
balloon: drop old stats code & API
Next commit will re-enable balloon stats with a different interface, butthis old code conflicts with it. Let's drop it.
It's important to note that the QMP and HMP interfaces are also droppedby this commit. That shouldn't be a problem though, because:...
HMP: add QDict to info callback handler
This patch change all info call back function to takeadditional QDict * parameter, which allow those commandtake parameter. Now it is set to NULL at default case.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>...
chardev: add hmp hotplug commands
Add chardev-add and chardev-remove commands to the human monitor.chardev-add accepts the same syntax as -chardev, chardev-removeexpects a chardev id.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
softmmu: move remaining include files to include/ subdirectories
misc: move include files to include/qemu/
monitor: move include files to include/monitor/
ui: move files to ui/ and include/ui/
net: reorganize headers
Move public headers to include/net, and leave private headers in net/.Put the virtio headers in include/net/tap.h, removing the multiple copiesthat existed. Leave include/net/tap.h as the interface for NICs, andnet/tap_int.h as the interface for OS-specific parts of the tap backend....
janitor: do not include qemu-char everywhere
Touching char/char.h basically causes the whole of QEMU tobe rebuilt. Avoid this, it is usually unnecessary.
hmp: add NBD server commands
hmp: fix info cpus for sparc targets
On sparc targets, info cpus returns this kind of output:
| info cpus | * CPU #0: pc=0x0000000000424d18pc=0x0000000000424d18npc=0x0000000000424d1c thread_id=19460
pc is printed twice, there is no space between pc, pc and npc....
mirror: add support for on-source-error/on-target-error
Error management is important for mirroring; otherwise, an error on thetarget (even something as "innocent" as ENOSPC) requires to start againwith a full copy. Similar to on_read_error/on_write_error, two separate...
qmp: add drive-mirror command
This adds the monitor commands that start the mirroring job.
block: add block-job-complete
While streaming can be dropped as soon as it progressed through the wholeimage, mirroring needs to be completed manually for two reasons: 1) so thatmanagement knows exactly when the VM switches to the target; 2) becausefor other use cases such as replication, we may leave the operation running...
migration: print total downtime for final phase of migration
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Orit Wasserman <owasserm@redhat.com>
migration: print expected downtime in info migrate
migration: Add dirty_pages_rate to query migrate output
It indicates how many pages were dirtied during the last second.
stream: add on-error argument
This patch adds support for error management to streaming.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qmp: add block-job-pause and block-job-resume
Add QMP commands matching the functionality.
Paused jobs cannot be canceled without first resuming them. Thisensures that I/O errors are never missed by management. However, anoptional force argument can be specified to allow that....
qmp: qmp_send_key(): accept key codes in hex
Before the qapi conversion, the sendkey command could be used tosend key codes in hex directly to the guest. In HMP, this wouldbe like:
(qemu) sendkey 0xdc
However, the qapi conversion broke this, as it only supports sending...
hmp: dump-guest-memory: hardcode protocol argument to "file:"
Today, it's necessary to specify the protocol you want to usewhen dumping the guest memory, for example:
(qemu) dump-guest-memory file:/tmp/guest-memory
This has a few issues:
1. It's cumbersome to type...
Merge branch 'spice.v59' of git://anongit.freedesktop.org/spice/qemu
qapi: convert sendkey
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 toindex of key_defs, and 'index' will be converted to 'keycode'inside qmp_send_key()....
qapi: convert screendump
Next commits will update devices to propagate errors.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
spice: add 'migrated' flag to spice info
The flag is 'true' when spice migration has completed on the src side.It is needed for a case where libvirt dies before migration completesand it misses the event QEVENT_SPICE_MIGRATE_COMPLETED.When libvirt is restored and queries the migration status, it also needs...
migration: move total_time from ram stats to migration info
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Merge remote-tracking branch 'qmp/queue/qmp' into staging
hmp: hmp_change(): use error_get_class()
The error_is_type() function is going to be dropped.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>
hmp_change(): don't access DeviceEncrypted's data
It's not needed. As the device name is already known, we can replacethe duplicated password prompting code by monitor_read_block_device_key().
This overly simplifies hmp_change().
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
hmp: hmp_cont(): don't rely on QERR_DEVICE_ENCRYPTED
This commit changes hmp_cont() to loop through all block devicesand proactively set an encryption key for any encrypted devicemissing a key.
This change is needed because QERR_DEVICE_ENCRYPTED is going to be...
Add migrate_set_cache_size command
Change XBZRLE cache size in bytes (the size should be a power of 2, it will berounded 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...
Add migration accounting for normal and duplicate pages
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>...
Add XBZRLE statistics
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>Signed-off-by: Juan Quintela <quintela@redhat.com>...
Add migration capabilities
The management can query the current migration capabilities usingquery-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>...
Add migrate-set-capabilities
The management can enable/disable a capability for the next migration by usingmigrate-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>...
hmp: show the backing file depth
Signed-off-by: Benoit Canet <benoit@irqsave.net>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: Convert getfd and closefd
Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Add spent time for migration
We add time spent for migration to the output of "info migrate" command. 'total_time' means time since the start fo migration ifmigration is 'active', and total time of migration if migration iscompleted. As we are also interested in transferred ram when...
qmp: include monitor.h when needed
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_add
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")...
qapi: convert netdev_del
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>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 memory
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...
stream: fix HMP block_job_set_speed
The change of the argument name from value to speed was not propagated there.
spice_info: add mouse_mode
Add mouse_mode, either server or mouse, to qmp and hmp commands, basedon 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-stream
Allow streaming operations to be started with an initial speed limit.This eliminates the window of time between starting streaming andissuing block-job-set-speed. Users should use the new optional 'speed'...
qapi: convert device_del
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 migrate
The migrate command is one of those commands where HMP and QMP completelymix up together. This made the conversion to the QAPI (which separates thecommand into QMP and HMP parts) a bit difficult.
The first important change to be noticed is that this commit completes the...
qmp: convert blockdev-snapshot-sync to a wrapper around transactions
Simplify the blockdev-snapshot-sync code and gain failsafe operationby turning it into a wrapper around the new transaction command. A newoption is also added matching "mode".
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
suspend: add system_wakeup monitor command
This patch adds the system_wakeup monitor command which will simplywake up suspended guests.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.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 query-block-jobs
Add query-block-jobs, which shows the progress of ongoing block deviceoperations.
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 command
Add block_job_set_speed, which sets the maximum speed for a backgroundblock operation.
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...
qapi: Convert eject
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: Convert change
qapi: Convert block_set_io_throttle
qapi: Convert set_password
qapi: Convert expire_password
prepare for future GPLv2+ relicensing
All files under GPLv2 will get GPLv2+ changes starting tomorrow.event_notifier.c and exec-obsolete.h were only ever touched by Red Hatemployees and can be relicensed now.