History | View | Annotate | Download (72.3 kB)
Merge remote-tracking branch 'afaerber/qom-cpu' into staging
Trivial grammar and spelling fixes
similiar -> similarrecieve -> receivetransfered -> transferredpreperation -> preparation
Most changes are in comments, one modifies a parameter name in a functionprototype.
The spelling fixes were made using codespell....
QMP: Add cpu-add command
Adds "cpu-add id=xxx" QMP command.
cpu-add's "id" argument is a CPU number in a range [0..max-cpus)
Example QMP command: > { "execute": "cpu-add", "arguments": { "id": 2 } } < { "return": {} }
Signed-off-by: Igor Mammedov <imammedo@redhat.com>...
monitor: introduce query-command-line-options
Libvirt has no way to probe if an option or property is supported,This patch introduces a new qmp command to query command lineoption information. hmp command isn't added because it's not needed.
Signed-off-by: Amos Kong <akong@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...
migration: Improve QMP documentation
Signed-off-by: Juan Quintela <quintela@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>
QMP: TPM QMP and man page documentation updates
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>...
qmp: netdev_add is like -netdev, not -net, fix documentation
Cc: qemu-stable@nongnu.orgSigned-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.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.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix example for query-migrate-capabilities
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>
qmp-commands.hx: s/tray-open/tray_open/ to match qapi schema
Currently, we are using 'tray_open' in QMP and 'tray-open' inHMP. However, the QMP documentation was mistakenly using theHMP version.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>Reviewed-by: Eric Blake <eblake@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:...
chardev: add qmp hotplug commands, with null chardev support
Add chardev-add and chardev-remove qmp commands. Hotplugginga null chardev is supported for now, more will be added later.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
chardev: add file chardev support to chardev-add (qmp)
Add support for file chardevs. Output file is mandatory,input file is optional.
chardev: add pty chardev support to chardev-add (qmp)
The ptsname is returned directly, so there is no need touse query-chardev to figure the pty device path.
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...
qmp: add NBD server commands
Adding an NBD server inside QEMU is trivial, since all the logic isin nbd.c and can be shared easily between qemu-nbd and QEMU itself.The main difference is that qemu-nbd serves a single unnamed export,while QEMU serves named exports....
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
Merge remote-tracking branch 'sstabellini/xen-2012-10-03' into staging
QMP, Introduce xen-set-global-dirty-log command.
This command is used during a migration of a guest under Xen. It callsmemory_global_dirty_log_start or memory_global_dirty_log_stop according to theargument pass to the command.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>...
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....
QAPI: add command for live block commit, 'block-commit'
The command for live block commit is added, which has the followingarguments:
device: the block device to perform the commit on (mandatory)base: the base image to commit into; optional (if not specified,...
qapi: convert add_client
Also fixes a few issues while there:
1. The fd returned by monitor_get_fd() leaks in most error conditions 2. monitor_get_fd() return value is not checked. Best case we get an error that is not correctly reported, worse case one of the...
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>
Merge remote-tracking branch 'qmp/queue/qmp' into staging
qapi: add 'query-target' command to return target arch
Add a 'query-target' QAPI command to allow management applicationsto determine what target architecture a QEMU binary is emulatingwithout having to parse the binary name or -help output
$ qmp-shell -p /tmp/qemu...
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>
qapi: Introduce add-fd, remove-fd, query-fdsets
This patch adds support that enables passing of file descriptorsto the QEMU monitor where they will be stored in specified filedescriptor sets.
A file descriptor set can be used by a client like libvirt to...
qmp: introduce device-list-properties command
This can be used in conjunction with qom-list-types to determine the supportedset of devices and their parameters.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: add query-machines command
This provides the same output as -M ? but in a structured way.
qapi: add query-cpu-definitions command (v2)
This command attempts to map to the behavior of -cpu ?. Unfortunately, theoutput of this command differs wildly across targets.
To accommodate this, we use a weak symbol to implement a default version of the...
qmp: switch to the new error format on the wire
IMPORTANT: this BREAKS QMP's compatibility for the error response.
This commit changes QMP's wire protocol to make use of the simplererror format introduced by previous commits.
There are two important (and mostly incompatible) changes:...
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...
Change total_time to total-time in MigrationStats
migration total_time was introduced in commitd5f8a5701d3690b5ec0c34b6a5c0b5a24d274540 for QEMU 1.2
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>...
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>...
block: Use bdrv_get_backing_file_depth()
Use the dedicated counting function in qmp_query_block in order topropagate the backing file depth to HMP and add backing_file_depthto qmp-commands.hx
Signed-off-by: Benoit Canet <benoit@irqsave.net>Reviewed-by: Eric Blake <eblake@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>
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>
Add 'query-events' command to QMP to query async events
Sometimes it is neccessary for an application to determinewhether a particular QMP event is available, so they candecide whether to use compatibility code instead. Thisintroduces a new 'query-events' command to QMP to do just...
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...
block: add mode argument to blockdev-snapshot-sync
block: change block-job-set-speed argument from 'value' to 'speed'
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>
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'...
qmp: make block job command naming consistent
The block streaming and job commands used '_' instead of '-' for reasonsof compatibility with libvirt, which already included support for the'_' naming. However, the semantics of block_job_cancel have changed and...
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>
qmp: add and use q type specifier
"O" is being used by the transaction and qom-set commands to mean "anyQObject", but it really means "do not validate the argument list".Add a new specifier with the correct meaning.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
Merge remote-tracking branch 'sstabellini/saverestore-8' into staging
Introduce "xen-save-devices-state"
- add an "is_ram" flag to SaveStateEntry;
- register_savevm_live sets is_ram for live_savevm devices;
- introduce a "xen-save-devices-state" QAPI command that can be used to savethe state of all devices, but not the RAM or the block devices of the...
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...
rename blockdev-group-snapshot-sync
We will add other kinds of operation. Prepare for this by adjustingthe schema.
add mode field to blockdev-snapshot-sync transaction item
The mode field lets a management application create the snapshotdestination outside QEMU.
Right now, the only modes are "existing" and "absolute-paths". Mirroringintroduces "no-backing-file". In the future "relative-paths" could be...
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".
QMP: Add qmp command for blockdev-group-snapshot-sync
This adds the QMP command for blockdev-group-snapshot-sync. Ittakes an array in as the input, for the argument devlist. Thearray consists of the following elements:
+ device: device to snapshot. e.g. "ide-hd0", "virtio0"...
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>
Add SPICE support to add_client monitor command
With the acceptance of some new APIs to libspice-server.so itis possible to add support for SPICE to the 'add_client'monitor command, bringing parity with VNC. Since SPICE canuse TLS or plain connections, the command also gains a new...
qom: add new command to search for types
This adds a command that allows searching for types that implement a property.This allows you to do things like search for all available PCIDevices. In thefuture, we'll also have a standard interface for things with a BlockDriverState...
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
qapi: Introduce change-vnc-password
New QMP command to change the VNC password.
qapi: Convert change
qapi: Convert block_set_io_throttle
qapi: Convert set_password
qapi: Convert expire_password
qmp: add qom-list command
This can be used to list properties in the device model.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qom: qom_{get, set} monitor commands (v2)
This allows clients to read and write device model properties through QMP. QAPIdoesn't support Visitor types yet and these commands are special in that theydon't work with fixed types.
I've added a documentation stub to qapi-schema.json so we can keep consistency...
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 human-monitor-command
qapi: Convert migrate_cancel
qapi: Convert migrate_set_downtime
qapi: Convert migrate_set_speed