History | View | Annotate | Download (41.3 kB)
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.
hmp: Fix freeing of PciInfoList
Remember the original PciInfoList in info_list and usethe 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 pmemsave
qapi: Convert cont
qapi: Convert inject-nmi
qapi: Convert set_link
qapi: Convert block_passwd
qapi: Convert balloon
Note that the command being dropped uses the deprecated MONITOR_CMD_ASYNCAPI, but the new command is a regular synchronous command. There shouldn'tbe visible differences though, as MONITOR_CMD_ASYNC is internal only.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
qapi: Convert block_resize
qapi: Convert blockdev_snapshot_sync
Unfortunately, this conversion required an additional change.
In the old QMP command, the 'snapshot-file' argument is specified asoptional. The idea is to take the snapshot internally if 'snapshot-file'is not passed. However, internal snapshots are not supported yet so...
qapi: Convert migrate_cancel
qapi: Convert migrate_set_downtime
qapi: Convert migrate_set_speed
qapi: Convert memsave
Please, note that the QMP command has a new 'cpu-index' parameter.
hmp/qmp: add block_set_io_throttle
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-block
qapi: Convert query-blockstats
qapi: Convert query-vnc
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...
qapi: Convert query-spice
qapi: Convert query-balloon
Please, note that some of the code supporting memory statistics isstill around (eg. virtio_balloon_receive_stats() and reset_stats()).
Also, the qmp_query_balloon() function is synchronous and thus doesn'tmake any use of the (not fully working) monitor's asynchronous command...
qapi: Convert query-pci
This also fixes a bug with the old version: QMP would invert device idand vendor id. This would look ok on HMP because it was printing"device:vendor" instead of "vendor:device".