summaryrefslogtreecommitdiffstats
path: root/qemu/qmp-commands.hx
diff options
context:
space:
mode:
Diffstat (limited to 'qemu/qmp-commands.hx')
-rw-r--r--qemu/qmp-commands.hx963
1 files changed, 785 insertions, 178 deletions
diff --git a/qemu/qmp-commands.hx b/qemu/qmp-commands.hx
index ba630b1e7..de896a5a3 100644
--- a/qemu/qmp-commands.hx
+++ b/qemu/qmp-commands.hx
@@ -63,7 +63,7 @@ EQMP
{
.name = "quit",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_quit,
+ .mhandler.cmd_new = qmp_marshal_quit,
},
SQMP
@@ -84,7 +84,7 @@ EQMP
{
.name = "eject",
.args_type = "force:-f,device:B",
- .mhandler.cmd_new = qmp_marshal_input_eject,
+ .mhandler.cmd_new = qmp_marshal_eject,
},
SQMP
@@ -110,7 +110,7 @@ EQMP
{
.name = "change",
.args_type = "device:B,target:F,arg:s?",
- .mhandler.cmd_new = qmp_marshal_input_change,
+ .mhandler.cmd_new = qmp_marshal_change,
},
SQMP
@@ -146,7 +146,7 @@ EQMP
{
.name = "screendump",
.args_type = "filename:F",
- .mhandler.cmd_new = qmp_marshal_input_screendump,
+ .mhandler.cmd_new = qmp_marshal_screendump,
},
SQMP
@@ -169,7 +169,7 @@ EQMP
{
.name = "stop",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_stop,
+ .mhandler.cmd_new = qmp_marshal_stop,
},
SQMP
@@ -190,7 +190,7 @@ EQMP
{
.name = "cont",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_cont,
+ .mhandler.cmd_new = qmp_marshal_cont,
},
SQMP
@@ -211,7 +211,7 @@ EQMP
{
.name = "system_wakeup",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_system_wakeup,
+ .mhandler.cmd_new = qmp_marshal_system_wakeup,
},
SQMP
@@ -232,7 +232,7 @@ EQMP
{
.name = "system_reset",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_system_reset,
+ .mhandler.cmd_new = qmp_marshal_system_reset,
},
SQMP
@@ -253,7 +253,7 @@ EQMP
{
.name = "system_powerdown",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_system_powerdown,
+ .mhandler.cmd_new = qmp_marshal_system_powerdown,
},
SQMP
@@ -310,7 +310,7 @@ EQMP
{
.name = "device_del",
.args_type = "id:s",
- .mhandler.cmd_new = qmp_marshal_input_device_del,
+ .mhandler.cmd_new = qmp_marshal_device_del,
},
SQMP
@@ -321,19 +321,24 @@ Remove a device.
Arguments:
-- "id": the device's ID (json-string)
+- "id": the device's ID or QOM path (json-string)
Example:
-> { "execute": "device_del", "arguments": { "id": "net1" } }
<- { "return": {} }
+Example:
+
+-> { "execute": "device_del", "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
+<- { "return": {} }
+
EQMP
{
.name = "send-key",
.args_type = "keys:q,hold-time:i?",
- .mhandler.cmd_new = qmp_marshal_input_send_key,
+ .mhandler.cmd_new = qmp_marshal_send_key,
},
SQMP
@@ -364,7 +369,7 @@ EQMP
{
.name = "cpu",
.args_type = "index:i",
- .mhandler.cmd_new = qmp_marshal_input_cpu,
+ .mhandler.cmd_new = qmp_marshal_cpu,
},
SQMP
@@ -389,7 +394,7 @@ EQMP
{
.name = "cpu-add",
.args_type = "id:i",
- .mhandler.cmd_new = qmp_marshal_input_cpu_add,
+ .mhandler.cmd_new = qmp_marshal_cpu_add,
},
SQMP
@@ -412,7 +417,7 @@ EQMP
{
.name = "memsave",
.args_type = "val:l,size:i,filename:s,cpu:i?",
- .mhandler.cmd_new = qmp_marshal_input_memsave,
+ .mhandler.cmd_new = qmp_marshal_memsave,
},
SQMP
@@ -441,7 +446,7 @@ EQMP
{
.name = "pmemsave",
.args_type = "val:l,size:i,filename:s",
- .mhandler.cmd_new = qmp_marshal_input_pmemsave,
+ .mhandler.cmd_new = qmp_marshal_pmemsave,
},
SQMP
@@ -469,7 +474,7 @@ EQMP
{
.name = "inject-nmi",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_inject_nmi,
+ .mhandler.cmd_new = qmp_marshal_inject_nmi,
},
SQMP
@@ -492,7 +497,7 @@ EQMP
{
.name = "ringbuf-write",
.args_type = "device:s,data:s,format:s?",
- .mhandler.cmd_new = qmp_marshal_input_ringbuf_write,
+ .mhandler.cmd_new = qmp_marshal_ringbuf_write,
},
SQMP
@@ -507,8 +512,6 @@ Arguments:
- "data": data to write (json-string)
- "format": data format (json-string, optional)
- Possible values: "utf8" (default), "base64"
- Bug: invalid base64 is currently not rejected.
- Whitespace *is* invalid.
Example:
@@ -523,7 +526,7 @@ EQMP
{
.name = "ringbuf-read",
.args_type = "device:s,size:i,format:s?",
- .mhandler.cmd_new = qmp_marshal_input_ringbuf_read,
+ .mhandler.cmd_new = qmp_marshal_ringbuf_read,
},
SQMP
@@ -559,7 +562,7 @@ EQMP
{
.name = "xen-save-devices-state",
.args_type = "filename:F",
- .mhandler.cmd_new = qmp_marshal_input_xen_save_devices_state,
+ .mhandler.cmd_new = qmp_marshal_xen_save_devices_state,
},
SQMP
@@ -586,7 +589,7 @@ EQMP
{
.name = "xen-set-global-dirty-log",
.args_type = "enable:b",
- .mhandler.cmd_new = qmp_marshal_input_xen_set_global_dirty_log,
+ .mhandler.cmd_new = qmp_marshal_xen_set_global_dirty_log,
},
SQMP
@@ -610,7 +613,7 @@ EQMP
{
.name = "migrate",
.args_type = "detach:-d,blk:-b,inc:-i,uri:s",
- .mhandler.cmd_new = qmp_marshal_input_migrate,
+ .mhandler.cmd_new = qmp_marshal_migrate,
},
SQMP
@@ -643,7 +646,7 @@ EQMP
{
.name = "migrate_cancel",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_migrate_cancel,
+ .mhandler.cmd_new = qmp_marshal_migrate_cancel,
},
SQMP
@@ -664,7 +667,7 @@ EQMP
{
.name = "migrate-incoming",
.args_type = "uri:s",
- .mhandler.cmd_new = qmp_marshal_input_migrate_incoming,
+ .mhandler.cmd_new = qmp_marshal_migrate_incoming,
},
SQMP
@@ -692,7 +695,7 @@ EQMP
{
.name = "migrate-set-cache-size",
.args_type = "value:o",
- .mhandler.cmd_new = qmp_marshal_input_migrate_set_cache_size,
+ .mhandler.cmd_new = qmp_marshal_migrate_set_cache_size,
},
SQMP
@@ -713,9 +716,28 @@ Example:
EQMP
{
+ .name = "migrate-start-postcopy",
+ .args_type = "",
+ .mhandler.cmd_new = qmp_marshal_migrate_start_postcopy,
+ },
+
+SQMP
+migrate-start-postcopy
+----------------------
+
+Switch an in-progress migration to postcopy mode. Ignored after the end of
+migration (or once already in postcopy).
+
+Example:
+-> { "execute": "migrate-start-postcopy" }
+<- { "return": {} }
+
+EQMP
+
+ {
.name = "query-migrate-cache-size",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_migrate_cache_size,
+ .mhandler.cmd_new = qmp_marshal_query_migrate_cache_size,
},
SQMP
@@ -737,7 +759,7 @@ EQMP
{
.name = "migrate_set_speed",
.args_type = "value:o",
- .mhandler.cmd_new = qmp_marshal_input_migrate_set_speed,
+ .mhandler.cmd_new = qmp_marshal_migrate_set_speed,
},
SQMP
@@ -760,7 +782,7 @@ EQMP
{
.name = "migrate_set_downtime",
.args_type = "value:T",
- .mhandler.cmd_new = qmp_marshal_input_migrate_set_downtime,
+ .mhandler.cmd_new = qmp_marshal_migrate_set_downtime,
},
SQMP
@@ -785,7 +807,7 @@ EQMP
.args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
.params = "protocol hostname port tls-port cert-subject",
.help = "set migration information for remote display",
- .mhandler.cmd_new = qmp_marshal_input_client_migrate_info,
+ .mhandler.cmd_new = qmp_marshal_client_migrate_info,
},
SQMP
@@ -816,10 +838,10 @@ EQMP
{
.name = "dump-guest-memory",
- .args_type = "paging:b,protocol:s,begin:i?,end:i?,format:s?",
- .params = "-p protocol [begin] [length] [format]",
+ .args_type = "paging:b,protocol:s,detach:b?,begin:i?,end:i?,format:s?",
+ .params = "-p protocol [-d] [begin] [length] [format]",
.help = "dump guest memory to file",
- .mhandler.cmd_new = qmp_marshal_input_dump_guest_memory,
+ .mhandler.cmd_new = qmp_marshal_dump_guest_memory,
},
SQMP
@@ -833,6 +855,9 @@ Arguments:
- "paging": do paging to get guest's memory mapping (json-bool)
- "protocol": destination file(started with "file:") or destination file
descriptor (started with "fd:") (json-string)
+- "detach": if specified, command will return immediately, without waiting
+ for the dump to finish. The user can track progress using
+ "query-dump". (json-bool)
- "begin": the starting physical address. It's optional, and should be specified
with length together (json-int)
- "length": the memory size, in bytes. It's optional, and should be specified
@@ -855,7 +880,7 @@ EQMP
{
.name = "query-dump-guest-memory-capability",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_dump_guest_memory_capability,
+ .mhandler.cmd_new = qmp_marshal_query_dump_guest_memory_capability,
},
SQMP
@@ -873,6 +898,55 @@ Example:
EQMP
{
+ .name = "query-dump",
+ .args_type = "",
+ .params = "",
+ .help = "query background dump status",
+ .mhandler.cmd_new = qmp_marshal_query_dump,
+ },
+
+SQMP
+query-dump
+----------
+
+Query background dump status.
+
+Arguments: None.
+
+Example:
+
+-> { "execute": "query-dump" }
+<- { "return": { "status": "active", "completed": 1024000,
+ "total": 2048000 } }
+
+EQMP
+
+#if defined TARGET_S390X
+ {
+ .name = "dump-skeys",
+ .args_type = "filename:F",
+ .mhandler.cmd_new = qmp_marshal_dump_skeys,
+ },
+#endif
+
+SQMP
+dump-skeys
+----------
+
+Save guest storage keys to file.
+
+Arguments:
+
+- "filename": file path (json-string)
+
+Example:
+
+-> { "execute": "dump-skeys", "arguments": { "filename": "/tmp/skeys" } }
+<- { "return": {} }
+
+EQMP
+
+ {
.name = "netdev_add",
.args_type = "netdev:O",
.mhandler.cmd_new = qmp_netdev_add,
@@ -892,7 +966,9 @@ Arguments:
Example:
--> { "execute": "netdev_add", "arguments": { "type": "user", "id": "netdev1" } }
+-> { "execute": "netdev_add",
+ "arguments": { "type": "user", "id": "netdev1",
+ "dnssearch": "example.org" } }
<- { "return": {} }
Note: The supported device options are the same ones supported by the '-netdev'
@@ -904,7 +980,7 @@ EQMP
{
.name = "netdev_del",
.args_type = "id:s",
- .mhandler.cmd_new = qmp_marshal_input_netdev_del,
+ .mhandler.cmd_new = qmp_marshal_netdev_del,
},
SQMP
@@ -928,7 +1004,7 @@ EQMP
{
.name = "object-add",
.args_type = "qom-type:s,id:s,props:q?",
- .mhandler.cmd_new = qmp_object_add,
+ .mhandler.cmd_new = qmp_marshal_object_add,
},
SQMP
@@ -954,7 +1030,7 @@ EQMP
{
.name = "object-del",
.args_type = "id:s",
- .mhandler.cmd_new = qmp_marshal_input_object_del,
+ .mhandler.cmd_new = qmp_marshal_object_del,
},
SQMP
@@ -979,7 +1055,7 @@ EQMP
{
.name = "block_resize",
.args_type = "device:s?,node-name:s?,size:o",
- .mhandler.cmd_new = qmp_marshal_input_block_resize,
+ .mhandler.cmd_new = qmp_marshal_block_resize,
},
SQMP
@@ -1004,7 +1080,7 @@ EQMP
{
.name = "block-stream",
.args_type = "device:B,base:s?,speed:o?,backing-file:s?,on-error:s?",
- .mhandler.cmd_new = qmp_marshal_input_block_stream,
+ .mhandler.cmd_new = qmp_marshal_block_stream,
},
SQMP
@@ -1047,7 +1123,7 @@ EQMP
{
.name = "block-commit",
.args_type = "device:B,base:s?,top:s?,backing-file:s?,speed:o?",
- .mhandler.cmd_new = qmp_marshal_input_block_commit,
+ .mhandler.cmd_new = qmp_marshal_block_commit,
},
SQMP
@@ -1111,7 +1187,7 @@ EQMP
.name = "drive-backup",
.args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
"bitmap:s?,on-source-error:s?,on-target-error:s?",
- .mhandler.cmd_new = qmp_marshal_input_drive_backup,
+ .mhandler.cmd_new = qmp_marshal_drive_backup,
},
SQMP
@@ -1165,7 +1241,7 @@ EQMP
.name = "blockdev-backup",
.args_type = "sync:s,device:B,target:B,speed:i?,"
"on-source-error:s?,on-target-error:s?",
- .mhandler.cmd_new = qmp_marshal_input_blockdev_backup,
+ .mhandler.cmd_new = qmp_marshal_blockdev_backup,
},
SQMP
@@ -1205,44 +1281,55 @@ EQMP
{
.name = "block-job-set-speed",
.args_type = "device:B,speed:o",
- .mhandler.cmd_new = qmp_marshal_input_block_job_set_speed,
+ .mhandler.cmd_new = qmp_marshal_block_job_set_speed,
},
{
.name = "block-job-cancel",
.args_type = "device:B,force:b?",
- .mhandler.cmd_new = qmp_marshal_input_block_job_cancel,
+ .mhandler.cmd_new = qmp_marshal_block_job_cancel,
},
{
.name = "block-job-pause",
.args_type = "device:B",
- .mhandler.cmd_new = qmp_marshal_input_block_job_pause,
+ .mhandler.cmd_new = qmp_marshal_block_job_pause,
},
{
.name = "block-job-resume",
.args_type = "device:B",
- .mhandler.cmd_new = qmp_marshal_input_block_job_resume,
+ .mhandler.cmd_new = qmp_marshal_block_job_resume,
},
{
.name = "block-job-complete",
.args_type = "device:B",
- .mhandler.cmd_new = qmp_marshal_input_block_job_complete,
+ .mhandler.cmd_new = qmp_marshal_block_job_complete,
},
{
.name = "transaction",
- .args_type = "actions:q",
- .mhandler.cmd_new = qmp_marshal_input_transaction,
+ .args_type = "actions:q,properties:q?",
+ .mhandler.cmd_new = qmp_marshal_transaction,
},
SQMP
transaction
-----------
-Atomically operate on one or more block devices. The only supported operations
-for now are drive-backup, internal and external snapshotting. A list of
-dictionaries is accepted, that contains the actions to be performed.
-If there is any failure performing any of the operations, all operations
-for the group are abandoned.
+Atomically operate on one or more block devices. Operations that are
+currently supported:
+
+ - drive-backup
+ - blockdev-backup
+ - blockdev-snapshot-sync
+ - blockdev-snapshot-internal-sync
+ - abort
+ - block-dirty-bitmap-add
+ - block-dirty-bitmap-clear
+
+Refer to the qemu/qapi-schema.json file for minimum required QEMU
+versions for these operations. A list of dictionaries is accepted,
+that contains the actions to be performed. If there is any failure
+performing any of the operations, all operations for the group are
+abandoned.
For external snapshots, the dictionary contains the device, the file to use for
the new snapshot, and the format. The default format, if not specified, is
@@ -1269,8 +1356,12 @@ it later with qemu-img or other command.
Arguments:
actions array:
- - "type": the operation to perform. The only supported
- value is "blockdev-snapshot-sync". (json-string)
+ - "type": the operation to perform (json-string). Possible
+ values: "drive-backup", "blockdev-backup",
+ "blockdev-snapshot-sync",
+ "blockdev-snapshot-internal-sync",
+ "abort", "block-dirty-bitmap-add",
+ "block-dirty-bitmap-clear"
- "data": a dictionary. The contents depend on the value
of "type". When "type" is "blockdev-snapshot-sync":
- "device": device name to snapshot (json-string)
@@ -1310,7 +1401,7 @@ EQMP
{
.name = "block-dirty-bitmap-add",
.args_type = "node:B,name:s,granularity:i?",
- .mhandler.cmd_new = qmp_marshal_input_block_dirty_bitmap_add,
+ .mhandler.cmd_new = qmp_marshal_block_dirty_bitmap_add,
},
SQMP
@@ -1338,7 +1429,7 @@ EQMP
{
.name = "block-dirty-bitmap-remove",
.args_type = "node:B,name:s",
- .mhandler.cmd_new = qmp_marshal_input_block_dirty_bitmap_remove,
+ .mhandler.cmd_new = qmp_marshal_block_dirty_bitmap_remove,
},
SQMP
@@ -1366,7 +1457,7 @@ EQMP
{
.name = "block-dirty-bitmap-clear",
.args_type = "node:B,name:s",
- .mhandler.cmd_new = qmp_marshal_input_block_dirty_bitmap_clear,
+ .mhandler.cmd_new = qmp_marshal_block_dirty_bitmap_clear,
},
SQMP
@@ -1395,7 +1486,7 @@ EQMP
{
.name = "blockdev-snapshot-sync",
.args_type = "device:s?,node-name:s?,snapshot-file:s,snapshot-node-name:s?,format:s?,mode:s?",
- .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_sync,
+ .mhandler.cmd_new = qmp_marshal_blockdev_snapshot_sync,
},
SQMP
@@ -1429,9 +1520,47 @@ Example:
EQMP
{
+ .name = "blockdev-snapshot",
+ .args_type = "node:s,overlay:s",
+ .mhandler.cmd_new = qmp_marshal_blockdev_snapshot,
+ },
+
+SQMP
+blockdev-snapshot
+-----------------
+Since 2.5
+
+Create a snapshot, by installing 'node' as the backing image of
+'overlay'. Additionally, if 'node' is associated with a block
+device, the block device changes to using 'overlay' as its new active
+image.
+
+Arguments:
+
+- "node": device that will have a snapshot created (json-string)
+- "overlay": device that will have 'node' as its backing image (json-string)
+
+Example:
+
+-> { "execute": "blockdev-add",
+ "arguments": { "options": { "driver": "qcow2",
+ "node-name": "node1534",
+ "file": { "driver": "file",
+ "filename": "hd1.qcow2" },
+ "backing": "" } } }
+
+<- { "return": {} }
+
+-> { "execute": "blockdev-snapshot", "arguments": { "node": "ide-hd0",
+ "overlay": "node1534" } }
+<- { "return": {} }
+
+EQMP
+
+ {
.name = "blockdev-snapshot-internal-sync",
.args_type = "device:B,name:s",
- .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_internal_sync,
+ .mhandler.cmd_new = qmp_marshal_blockdev_snapshot_internal_sync,
},
SQMP
@@ -1461,7 +1590,7 @@ EQMP
.name = "blockdev-snapshot-delete-internal-sync",
.args_type = "device:B,id:s?,name:s?",
.mhandler.cmd_new =
- qmp_marshal_input_blockdev_snapshot_delete_internal_sync,
+ qmp_marshal_blockdev_snapshot_delete_internal_sync,
},
SQMP
@@ -1505,7 +1634,7 @@ EQMP
"on-source-error:s?,on-target-error:s?,"
"unmap:b?,"
"granularity:i?,buf-size:i?",
- .mhandler.cmd_new = qmp_marshal_input_drive_mirror,
+ .mhandler.cmd_new = qmp_marshal_drive_mirror,
},
SQMP
@@ -1533,7 +1662,7 @@ Arguments:
- "speed": maximum speed of the streaming job, in bytes per second
(json-int)
- "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
-- "buf_size": maximum amount of data in flight from source to target, in bytes
+- "buf-size": maximum amount of data in flight from source to target, in bytes
(json-int, default 10M)
- "sync": what parts of the disk image should be copied to the destination;
possibilities include "full" for all the disk, "top" for only the sectors
@@ -1563,9 +1692,57 @@ Example:
EQMP
{
+ .name = "blockdev-mirror",
+ .args_type = "sync:s,device:B,target:B,replaces:s?,speed:i?,"
+ "on-source-error:s?,on-target-error:s?,"
+ "granularity:i?,buf-size:i?",
+ .mhandler.cmd_new = qmp_marshal_blockdev_mirror,
+ },
+
+SQMP
+blockdev-mirror
+------------
+
+Start mirroring a block device's writes to another block device. target
+specifies the target of mirror operation.
+
+Arguments:
+
+- "device": device name to operate on (json-string)
+- "target": device name to mirror to (json-string)
+- "replaces": the block driver node name to replace when finished
+ (json-string, optional)
+- "speed": maximum speed of the streaming job, in bytes per second
+ (json-int)
+- "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
+- "buf_size": maximum amount of data in flight from source to target, in bytes
+ (json-int, default 10M)
+- "sync": what parts of the disk image should be copied to the destination;
+ possibilities include "full" for all the disk, "top" for only the sectors
+ allocated in the topmost image, or "none" to only replicate new I/O
+ (MirrorSyncMode).
+- "on-source-error": the action to take on an error on the source
+ (BlockdevOnError, default 'report')
+- "on-target-error": the action to take on an error on the target
+ (BlockdevOnError, default 'report')
+
+The default value of the granularity is the image cluster size clamped
+between 4096 and 65536, if the image format defines one. If the format
+does not define a cluster size, the default value of the granularity
+is 65536.
+
+Example:
+
+-> { "execute": "blockdev-mirror", "arguments": { "device": "ide-hd0",
+ "target": "target0",
+ "sync": "full" } }
+<- { "return": {} }
+
+EQMP
+ {
.name = "change-backing-file",
.args_type = "device:s,image-node-name:s,backing-file:s",
- .mhandler.cmd_new = qmp_marshal_input_change_backing_file,
+ .mhandler.cmd_new = qmp_marshal_change_backing_file,
},
SQMP
@@ -1604,7 +1781,7 @@ EQMP
{
.name = "balloon",
.args_type = "value:M",
- .mhandler.cmd_new = qmp_marshal_input_balloon,
+ .mhandler.cmd_new = qmp_marshal_balloon,
},
SQMP
@@ -1627,7 +1804,7 @@ EQMP
{
.name = "set_link",
.args_type = "name:s,up:b",
- .mhandler.cmd_new = qmp_marshal_input_set_link,
+ .mhandler.cmd_new = qmp_marshal_set_link,
},
SQMP
@@ -1653,7 +1830,7 @@ EQMP
.args_type = "fdname:s",
.params = "getfd name",
.help = "receive a file descriptor via SCM rights and assign it a name",
- .mhandler.cmd_new = qmp_marshal_input_getfd,
+ .mhandler.cmd_new = qmp_marshal_getfd,
},
SQMP
@@ -1686,7 +1863,7 @@ EQMP
.args_type = "fdname:s",
.params = "closefd name",
.help = "close a file descriptor previously passed via SCM rights",
- .mhandler.cmd_new = qmp_marshal_input_closefd,
+ .mhandler.cmd_new = qmp_marshal_closefd,
},
SQMP
@@ -1711,7 +1888,7 @@ EQMP
.args_type = "fdset-id:i?,opaque:s?",
.params = "add-fd fdset-id opaque",
.help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
- .mhandler.cmd_new = qmp_marshal_input_add_fd,
+ .mhandler.cmd_new = qmp_marshal_add_fd,
},
SQMP
@@ -1750,7 +1927,7 @@ EQMP
.args_type = "fdset-id:i,fd:i?",
.params = "remove-fd fdset-id fd",
.help = "Remove a file descriptor from an fd set",
- .mhandler.cmd_new = qmp_marshal_input_remove_fd,
+ .mhandler.cmd_new = qmp_marshal_remove_fd,
},
SQMP
@@ -1782,7 +1959,7 @@ EQMP
.name = "query-fdsets",
.args_type = "",
.help = "Return information describing all fd sets",
- .mhandler.cmd_new = qmp_marshal_input_query_fdsets,
+ .mhandler.cmd_new = qmp_marshal_query_fdsets,
},
SQMP
@@ -1831,7 +2008,7 @@ EQMP
{
.name = "block_passwd",
.args_type = "device:s?,node-name:s?,password:s",
- .mhandler.cmd_new = qmp_marshal_input_block_passwd,
+ .mhandler.cmd_new = qmp_marshal_block_passwd,
},
SQMP
@@ -1856,8 +2033,8 @@ EQMP
{
.name = "block_set_io_throttle",
- .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l,bps_max:l?,bps_rd_max:l?,bps_wr_max:l?,iops_max:l?,iops_rd_max:l?,iops_wr_max:l?,iops_size:l?,group:s?",
- .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle,
+ .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l,bps_max:l?,bps_rd_max:l?,bps_wr_max:l?,iops_max:l?,iops_rd_max:l?,iops_wr_max:l?,bps_max_length:l?,bps_rd_max_length:l?,bps_wr_max_length:l?,iops_max_length:l?,iops_rd_max_length:l?,iops_wr_max_length:l?,iops_size:l?,group:s?",
+ .mhandler.cmd_new = qmp_marshal_block_set_io_throttle,
},
SQMP
@@ -1875,14 +2052,20 @@ Arguments:
- "iops": total I/O operations per second (json-int)
- "iops_rd": read I/O operations per second (json-int)
- "iops_wr": write I/O operations per second (json-int)
-- "bps_max": total max in bytes (json-int)
-- "bps_rd_max": read max in bytes (json-int)
-- "bps_wr_max": write max in bytes (json-int)
-- "iops_max": total I/O operations max (json-int)
-- "iops_rd_max": read I/O operations max (json-int)
-- "iops_wr_max": write I/O operations max (json-int)
-- "iops_size": I/O size in bytes when limiting (json-int)
-- "group": throttle group name (json-string)
+- "bps_max": total throughput limit during bursts, in bytes (json-int, optional)
+- "bps_rd_max": read throughput limit during bursts, in bytes (json-int, optional)
+- "bps_wr_max": write throughput limit during bursts, in bytes (json-int, optional)
+- "iops_max": total I/O operations per second during bursts (json-int, optional)
+- "iops_rd_max": read I/O operations per second during bursts (json-int, optional)
+- "iops_wr_max": write I/O operations per second during bursts (json-int, optional)
+- "bps_max_length": maximum length of the @bps_max burst period, in seconds (json-int, optional)
+- "bps_rd_max_length": maximum length of the @bps_rd_max burst period, in seconds (json-int, optional)
+- "bps_wr_max_length": maximum length of the @bps_wr_max burst period, in seconds (json-int, optional)
+- "iops_max_length": maximum length of the @iops_max burst period, in seconds (json-int, optional)
+- "iops_rd_max_length": maximum length of the @iops_rd_max burst period, in seconds (json-int, optional)
+- "iops_wr_max_length": maximum length of the @iops_wr_max burst period, in seconds (json-int, optional)
+- "iops_size": I/O size in bytes when limiting (json-int, optional)
+- "group": throttle group name (json-string, optional)
Example:
@@ -1899,6 +2082,7 @@ Example:
"iops_max": 0,
"iops_rd_max": 0,
"iops_wr_max": 0,
+ "bps_max_length": 60,
"iops_size": 0 } }
<- { "return": {} }
@@ -1907,7 +2091,7 @@ EQMP
{
.name = "set_password",
.args_type = "protocol:s,password:s,connected:s?",
- .mhandler.cmd_new = qmp_marshal_input_set_password,
+ .mhandler.cmd_new = qmp_marshal_set_password,
},
SQMP
@@ -1933,7 +2117,7 @@ EQMP
{
.name = "expire_password",
.args_type = "protocol:s,time:s",
- .mhandler.cmd_new = qmp_marshal_input_expire_password,
+ .mhandler.cmd_new = qmp_marshal_expire_password,
},
SQMP
@@ -1958,7 +2142,7 @@ EQMP
{
.name = "add_client",
.args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
- .mhandler.cmd_new = qmp_marshal_input_add_client,
+ .mhandler.cmd_new = qmp_marshal_add_client,
},
SQMP
@@ -2009,7 +2193,7 @@ EQMP
{
.name = "human-monitor-command",
.args_type = "command-line:s,cpu-index:i?",
- .mhandler.cmd_new = qmp_marshal_input_human_monitor_command,
+ .mhandler.cmd_new = qmp_marshal_human_monitor_command,
},
SQMP
@@ -2088,7 +2272,7 @@ EQMP
{
.name = "query-version",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_version,
+ .mhandler.cmd_new = qmp_marshal_query_version,
},
SQMP
@@ -2125,7 +2309,7 @@ EQMP
{
.name = "query-commands",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_commands,
+ .mhandler.cmd_new = qmp_marshal_query_commands,
},
SQMP
@@ -2162,7 +2346,24 @@ EQMP
{
.name = "query-events",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_events,
+ .mhandler.cmd_new = qmp_marshal_query_events,
+ },
+
+SQMP
+query-qmp-schema
+----------------
+
+Return the QMP wire schema. The returned value is a json-array of
+named schema entities. Entities are commands, events and various
+types. See docs/qapi-code-gen.txt for information on their structure
+and intended use.
+
+EQMP
+
+ {
+ .name = "query-qmp-schema",
+ .args_type = "",
+ .mhandler.cmd_new = qmp_query_qmp_schema,
},
SQMP
@@ -2207,7 +2408,7 @@ EQMP
{
.name = "query-chardev",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_chardev,
+ .mhandler.cmd_new = qmp_marshal_query_chardev,
},
SQMP
@@ -2248,7 +2449,7 @@ EQMP
{
.name = "query-chardev-backends",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_chardev_backends,
+ .mhandler.cmd_new = qmp_marshal_query_chardev_backends,
},
SQMP
@@ -2432,7 +2633,7 @@ EQMP
{
.name = "query-block",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_block,
+ .mhandler.cmd_new = qmp_marshal_query_block,
},
SQMP
@@ -2456,12 +2657,70 @@ Each json-object contain the following:
- "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
- "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
- "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
- - "wr_highest_offset": Highest offset of a sector written since the
- BlockDriverState has been opened (json-int)
+ - "wr_highest_offset": The offset after the greatest byte written to the
+ BlockDriverState since it has been opened (json-int)
- "rd_merged": number of read requests that have been merged into
another request (json-int)
- "wr_merged": number of write requests that have been merged into
another request (json-int)
+ - "idle_time_ns": time since the last I/O operation, in
+ nanoseconds. If the field is absent it means
+ that there haven't been any operations yet
+ (json-int, optional)
+ - "failed_rd_operations": number of failed read operations
+ (json-int)
+ - "failed_wr_operations": number of failed write operations
+ (json-int)
+ - "failed_flush_operations": number of failed flush operations
+ (json-int)
+ - "invalid_rd_operations": number of invalid read operations
+ (json-int)
+ - "invalid_wr_operations": number of invalid write operations
+ (json-int)
+ - "invalid_flush_operations": number of invalid flush operations
+ (json-int)
+ - "account_invalid": whether invalid operations are included in
+ the last access statistics (json-bool)
+ - "account_failed": whether failed operations are included in the
+ latency and last access statistics
+ (json-bool)
+ - "timed_stats": A json-array containing statistics collected in
+ specific intervals, with the following members:
+ - "interval_length": interval used for calculating the
+ statistics, in seconds (json-int)
+ - "min_rd_latency_ns": minimum latency of read operations in
+ the defined interval, in nanoseconds
+ (json-int)
+ - "min_wr_latency_ns": minimum latency of write operations in
+ the defined interval, in nanoseconds
+ (json-int)
+ - "min_flush_latency_ns": minimum latency of flush operations
+ in the defined interval, in
+ nanoseconds (json-int)
+ - "max_rd_latency_ns": maximum latency of read operations in
+ the defined interval, in nanoseconds
+ (json-int)
+ - "max_wr_latency_ns": maximum latency of write operations in
+ the defined interval, in nanoseconds
+ (json-int)
+ - "max_flush_latency_ns": maximum latency of flush operations
+ in the defined interval, in
+ nanoseconds (json-int)
+ - "avg_rd_latency_ns": average latency of read operations in
+ the defined interval, in nanoseconds
+ (json-int)
+ - "avg_wr_latency_ns": average latency of write operations in
+ the defined interval, in nanoseconds
+ (json-int)
+ - "avg_flush_latency_ns": average latency of flush operations
+ in the defined interval, in
+ nanoseconds (json-int)
+ - "avg_rd_queue_depth": average number of pending read
+ operations in the defined interval
+ (json-number)
+ - "avg_wr_queue_depth": average number of pending write
+ operations in the defined interval
+ (json-number).
- "parent": Contains recursively the statistics of the underlying
protocol (e.g. the host file for a qcow2 image). If there is
no underlying protocol, this field is omitted
@@ -2486,7 +2745,10 @@ Example:
"flush_total_times_ns":49653
"flush_operations":61,
"rd_merged":0,
- "wr_merged":0
+ "wr_merged":0,
+ "idle_time_ns":2953431879,
+ "account_invalid":true,
+ "account_failed":false
}
},
"stats":{
@@ -2500,7 +2762,10 @@ Example:
"rd_total_times_ns":3465673657
"flush_total_times_ns":49653,
"rd_merged":0,
- "wr_merged":0
+ "wr_merged":0,
+ "idle_time_ns":2953431879,
+ "account_invalid":true,
+ "account_failed":false
}
},
{
@@ -2516,7 +2781,9 @@ Example:
"rd_total_times_ns":0
"flush_total_times_ns":0,
"rd_merged":0,
- "wr_merged":0
+ "wr_merged":0,
+ "account_invalid":false,
+ "account_failed":false
}
},
{
@@ -2532,7 +2799,9 @@ Example:
"rd_total_times_ns":0
"flush_total_times_ns":0,
"rd_merged":0,
- "wr_merged":0
+ "wr_merged":0,
+ "account_invalid":false,
+ "account_failed":false
}
},
{
@@ -2548,7 +2817,9 @@ Example:
"rd_total_times_ns":0
"flush_total_times_ns":0,
"rd_merged":0,
- "wr_merged":0
+ "wr_merged":0,
+ "account_invalid":false,
+ "account_failed":false
}
}
]
@@ -2559,7 +2830,7 @@ EQMP
{
.name = "query-blockstats",
.args_type = "query-nodes:b?",
- .mhandler.cmd_new = qmp_marshal_input_query_blockstats,
+ .mhandler.cmd_new = qmp_marshal_query_blockstats,
},
SQMP
@@ -2574,6 +2845,8 @@ Return a json-array. Each CPU is represented by a json-object, which contains:
- "current": true if this is the current CPU, false otherwise (json-bool)
- "halted": true if the cpu is halted, false otherwise (json-bool)
- "qom_path": path to the CPU object in the QOM tree (json-str)
+- "arch": architecture of the cpu, which determines what additional
+ keys will be present (json-str)
- Current program counter. The key's name depends on the architecture:
"pc": i386/x86_64 (json-int)
"nip": PPC (json-int)
@@ -2591,6 +2864,7 @@ Example:
"current":true,
"halted":false,
"qom_path":"/machine/unattached/device[0]",
+ "arch":"x86",
"pc":3227107138,
"thread_id":3134
},
@@ -2599,6 +2873,7 @@ Example:
"current":false,
"halted":true,
"qom_path":"/machine/unattached/device[2]",
+ "arch":"x86",
"pc":7108165,
"thread_id":3135
}
@@ -2610,7 +2885,7 @@ EQMP
{
.name = "query-cpus",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_cpus,
+ .mhandler.cmd_new = qmp_marshal_query_cpus,
},
SQMP
@@ -2649,7 +2924,7 @@ EQMP
{
.name = "query-iothreads",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_iothreads,
+ .mhandler.cmd_new = qmp_marshal_query_iothreads,
},
SQMP
@@ -2866,7 +3141,7 @@ EQMP
{
.name = "query-pci",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_pci,
+ .mhandler.cmd_new = qmp_marshal_query_pci,
},
SQMP
@@ -2890,7 +3165,7 @@ EQMP
{
.name = "query-kvm",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_kvm,
+ .mhandler.cmd_new = qmp_marshal_query_kvm,
},
SQMP
@@ -2930,7 +3205,7 @@ EQMP
{
.name = "query-status",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_status,
+ .mhandler.cmd_new = qmp_marshal_query_status,
},
SQMP
@@ -2974,7 +3249,7 @@ EQMP
{
.name = "query-mice",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_mice,
+ .mhandler.cmd_new = qmp_marshal_query_mice,
},
SQMP
@@ -3037,12 +3312,12 @@ EQMP
{
.name = "query-vnc",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_vnc,
+ .mhandler.cmd_new = qmp_marshal_query_vnc,
},
{
.name = "query-vnc-servers",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_vnc_servers,
+ .mhandler.cmd_new = qmp_marshal_query_vnc_servers,
},
SQMP
@@ -3119,7 +3394,7 @@ EQMP
{
.name = "query-spice",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_spice,
+ .mhandler.cmd_new = qmp_marshal_query_spice,
},
#endif
@@ -3143,7 +3418,7 @@ EQMP
{
.name = "query-name",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_name,
+ .mhandler.cmd_new = qmp_marshal_query_name,
},
SQMP
@@ -3166,7 +3441,7 @@ EQMP
{
.name = "query-uuid",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_uuid,
+ .mhandler.cmd_new = qmp_marshal_query_uuid,
},
SQMP
@@ -3215,7 +3490,7 @@ EQMP
{
.name = "query-command-line-options",
.args_type = "option:s?",
- .mhandler.cmd_new = qmp_marshal_input_query_command_line_options,
+ .mhandler.cmd_new = qmp_marshal_query_command_line_options,
},
SQMP
@@ -3393,7 +3668,7 @@ EQMP
{
.name = "query-migrate",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_migrate,
+ .mhandler.cmd_new = qmp_marshal_query_migrate,
},
SQMP
@@ -3406,7 +3681,9 @@ Enable/Disable migration capabilities
- "rdma-pin-all": pin all pages when using RDMA during migration
- "auto-converge": throttle down guest to help convergence of migration
- "zero-blocks": compress zero blocks during block migration
+- "compress": use multiple compression threads to accelerate live migration
- "events": generate events for each migration state change
+- "postcopy-ram": postcopy mode for live migration
Arguments:
@@ -3421,7 +3698,7 @@ EQMP
.name = "migrate-set-capabilities",
.args_type = "capabilities:q",
.params = "capability:s,state:b",
- .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
+ .mhandler.cmd_new = qmp_marshal_migrate_set_capabilities,
},
SQMP
query-migrate-capabilities
@@ -3434,20 +3711,31 @@ Query current migration capabilities
- "rdma-pin-all" : RDMA Pin Page state (json-bool)
- "auto-converge" : Auto Converge state (json-bool)
- "zero-blocks" : Zero Blocks state (json-bool)
+ - "compress": Multiple compression threads state (json-bool)
+ - "events": Migration state change event state (json-bool)
+ - "postcopy-ram": postcopy ram state (json-bool)
Arguments:
Example:
-> { "execute": "query-migrate-capabilities" }
-<- { "return": [ { "state": false, "capability": "xbzrle" } ] }
+<- {"return": [
+ {"state": false, "capability": "xbzrle"},
+ {"state": false, "capability": "rdma-pin-all"},
+ {"state": false, "capability": "auto-converge"},
+ {"state": false, "capability": "zero-blocks"},
+ {"state": false, "capability": "compress"},
+ {"state": true, "capability": "events"},
+ {"state": false, "capability": "postcopy-ram"}
+ ]}
EQMP
{
.name = "query-migrate-capabilities",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_migrate_capabilities,
+ .mhandler.cmd_new = qmp_marshal_query_migrate_capabilities,
},
SQMP
@@ -3459,6 +3747,10 @@ Set migration parameters
- "compress-level": set compression level during migration (json-int)
- "compress-threads": set compression thread count for migration (json-int)
- "decompress-threads": set decompression thread count for migration (json-int)
+- "x-cpu-throttle-initial": set initial percentage of time guest cpus are
+ throttled for auto-converge (json-int)
+- "x-cpu-throttle-increment": set throttle increasing percentage for
+ auto-converge (json-int)
Arguments:
@@ -3472,8 +3764,8 @@ EQMP
{
.name = "migrate-set-parameters",
.args_type =
- "compress-level:i?,compress-threads:i?,decompress-threads:i?",
- .mhandler.cmd_new = qmp_marshal_input_migrate_set_parameters,
+ "compress-level:i?,compress-threads:i?,decompress-threads:i?,x-cpu-throttle-initial:i?,x-cpu-throttle-increment:i?",
+ .mhandler.cmd_new = qmp_marshal_migrate_set_parameters,
},
SQMP
query-migrate-parameters
@@ -3485,6 +3777,10 @@ Query current migration parameters
- "compress-level" : compression level value (json-int)
- "compress-threads" : compression thread count value (json-int)
- "decompress-threads" : decompression thread count value (json-int)
+ - "x-cpu-throttle-initial" : initial percentage of time guest cpus are
+ throttled (json-int)
+ - "x-cpu-throttle-increment" : throttle increasing percentage for
+ auto-converge (json-int)
Arguments:
@@ -3493,9 +3789,11 @@ Example:
-> { "execute": "query-migrate-parameters" }
<- {
"return": {
- "decompress-threads", 2,
- "compress-threads", 8,
- "compress-level", 1
+ "decompress-threads": 2,
+ "x-cpu-throttle-increment": 10,
+ "compress-threads": 8,
+ "compress-level": 1,
+ "x-cpu-throttle-initial": 20
}
}
@@ -3504,7 +3802,7 @@ EQMP
{
.name = "query-migrate-parameters",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_migrate_parameters,
+ .mhandler.cmd_new = qmp_marshal_query_migrate_parameters,
},
SQMP
@@ -3532,88 +3830,88 @@ EQMP
{
.name = "query-balloon",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_balloon,
+ .mhandler.cmd_new = qmp_marshal_query_balloon,
},
{
.name = "query-block-jobs",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_block_jobs,
+ .mhandler.cmd_new = qmp_marshal_query_block_jobs,
},
{
.name = "qom-list",
.args_type = "path:s",
- .mhandler.cmd_new = qmp_marshal_input_qom_list,
+ .mhandler.cmd_new = qmp_marshal_qom_list,
},
{
.name = "qom-set",
.args_type = "path:s,property:s,value:q",
- .mhandler.cmd_new = qmp_qom_set,
+ .mhandler.cmd_new = qmp_marshal_qom_set,
},
{
.name = "qom-get",
.args_type = "path:s,property:s",
- .mhandler.cmd_new = qmp_qom_get,
+ .mhandler.cmd_new = qmp_marshal_qom_get,
},
{
.name = "nbd-server-start",
- .args_type = "addr:q",
- .mhandler.cmd_new = qmp_marshal_input_nbd_server_start,
+ .args_type = "addr:q,tls-creds:s?",
+ .mhandler.cmd_new = qmp_marshal_nbd_server_start,
},
{
.name = "nbd-server-add",
.args_type = "device:B,writable:b?",
- .mhandler.cmd_new = qmp_marshal_input_nbd_server_add,
+ .mhandler.cmd_new = qmp_marshal_nbd_server_add,
},
{
.name = "nbd-server-stop",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_nbd_server_stop,
+ .mhandler.cmd_new = qmp_marshal_nbd_server_stop,
},
{
.name = "change-vnc-password",
.args_type = "password:s",
- .mhandler.cmd_new = qmp_marshal_input_change_vnc_password,
+ .mhandler.cmd_new = qmp_marshal_change_vnc_password,
},
{
.name = "qom-list-types",
.args_type = "implements:s?,abstract:b?",
- .mhandler.cmd_new = qmp_marshal_input_qom_list_types,
+ .mhandler.cmd_new = qmp_marshal_qom_list_types,
},
{
.name = "device-list-properties",
.args_type = "typename:s",
- .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
+ .mhandler.cmd_new = qmp_marshal_device_list_properties,
},
{
.name = "query-machines",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_machines,
+ .mhandler.cmd_new = qmp_marshal_query_machines,
},
{
.name = "query-cpu-definitions",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_cpu_definitions,
+ .mhandler.cmd_new = qmp_marshal_query_cpu_definitions,
},
{
.name = "query-target",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_target,
+ .mhandler.cmd_new = qmp_marshal_query_target,
},
{
.name = "query-tpm",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_tpm,
+ .mhandler.cmd_new = qmp_marshal_query_tpm,
},
SQMP
@@ -3647,7 +3945,7 @@ EQMP
{
.name = "query-tpm-models",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_tpm_models,
+ .mhandler.cmd_new = qmp_marshal_query_tpm_models,
},
SQMP
@@ -3668,7 +3966,7 @@ EQMP
{
.name = "query-tpm-types",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_tpm_types,
+ .mhandler.cmd_new = qmp_marshal_query_tpm_types,
},
SQMP
@@ -3689,7 +3987,7 @@ EQMP
{
.name = "chardev-add",
.args_type = "id:s,backend:q",
- .mhandler.cmd_new = qmp_marshal_input_chardev_add,
+ .mhandler.cmd_new = qmp_marshal_chardev_add,
},
SQMP
@@ -3726,7 +4024,7 @@ EQMP
{
.name = "chardev-remove",
.args_type = "id:s",
- .mhandler.cmd_new = qmp_marshal_input_chardev_remove,
+ .mhandler.cmd_new = qmp_marshal_chardev_remove,
},
@@ -3749,7 +4047,7 @@ EQMP
{
.name = "query-rx-filter",
.args_type = "name:s?",
- .mhandler.cmd_new = qmp_marshal_input_query_rx_filter,
+ .mhandler.cmd_new = qmp_marshal_query_rx_filter,
},
SQMP
@@ -3815,7 +4113,7 @@ EQMP
{
.name = "blockdev-add",
.args_type = "options:q",
- .mhandler.cmd_new = qmp_marshal_input_blockdev_add,
+ .mhandler.cmd_new = qmp_marshal_blockdev_add,
},
SQMP
@@ -3825,8 +4123,8 @@ blockdev-add
Add a block device.
This command is still a work in progress. It doesn't support all
-block drivers, it lacks a matching blockdev-del, and more. Stay away
-from it unless you want to help with its development.
+block drivers among other things. Stay away from it unless you want
+to help with its development.
Arguments:
@@ -3872,9 +4170,237 @@ Example (2):
EQMP
{
+ .name = "x-blockdev-del",
+ .args_type = "id:s?,node-name:s?",
+ .mhandler.cmd_new = qmp_marshal_x_blockdev_del,
+ },
+
+SQMP
+x-blockdev-del
+------------
+Since 2.5
+
+Deletes a block device thas has been added using blockdev-add.
+The selected device can be either a block backend or a graph node.
+
+In the former case the backend will be destroyed, along with its
+inserted medium if there's any. The command will fail if the backend
+or its medium are in use.
+
+In the latter case the node will be destroyed. The command will fail
+if the node is attached to a block backend or is otherwise being
+used.
+
+One of "id" or "node-name" must be specified, but not both.
+
+This command is still a work in progress and is considered
+experimental. Stay away from it unless you want to help with its
+development.
+
+Arguments:
+
+- "id": Name of the block backend device to delete (json-string, optional)
+- "node-name": Name of the graph node to delete (json-string, optional)
+
+Example:
+
+-> { "execute": "blockdev-add",
+ "arguments": {
+ "options": {
+ "driver": "qcow2",
+ "id": "drive0",
+ "file": {
+ "driver": "file",
+ "filename": "test.qcow2"
+ }
+ }
+ }
+ }
+
+<- { "return": {} }
+
+-> { "execute": "x-blockdev-del",
+ "arguments": { "id": "drive0" }
+ }
+<- { "return": {} }
+
+EQMP
+
+ {
+ .name = "blockdev-open-tray",
+ .args_type = "device:s,force:b?",
+ .mhandler.cmd_new = qmp_marshal_blockdev_open_tray,
+ },
+
+SQMP
+blockdev-open-tray
+------------------
+
+Opens a block device's tray. If there is a block driver state tree inserted as a
+medium, it will become inaccessible to the guest (but it will remain associated
+to the block device, so closing the tray will make it accessible again).
+
+If the tray was already open before, this will be a no-op.
+
+Once the tray opens, a DEVICE_TRAY_MOVED event is emitted. There are cases in
+which no such event will be generated, these include:
+- if the guest has locked the tray, @force is false and the guest does not
+ respond to the eject request
+- if the BlockBackend denoted by @device does not have a guest device attached
+ to it
+- if the guest device does not have an actual tray and is empty, for instance
+ for floppy disk drives
+
+Arguments:
+
+- "device": block device name (json-string)
+- "force": if false (the default), an eject request will be sent to the guest if
+ it has locked the tray (and the tray will not be opened immediately);
+ if true, the tray will be opened regardless of whether it is locked
+ (json-bool, optional)
+
+Example:
+
+-> { "execute": "blockdev-open-tray",
+ "arguments": { "device": "ide1-cd0" } }
+
+<- { "timestamp": { "seconds": 1418751016,
+ "microseconds": 716996 },
+ "event": "DEVICE_TRAY_MOVED",
+ "data": { "device": "ide1-cd0",
+ "tray-open": true } }
+
+<- { "return": {} }
+
+EQMP
+
+ {
+ .name = "blockdev-close-tray",
+ .args_type = "device:s",
+ .mhandler.cmd_new = qmp_marshal_blockdev_close_tray,
+ },
+
+SQMP
+blockdev-close-tray
+-------------------
+
+Closes a block device's tray. If there is a block driver state tree associated
+with the block device (which is currently ejected), that tree will be loaded as
+the medium.
+
+If the tray was already closed before, this will be a no-op.
+
+Arguments:
+
+- "device": block device name (json-string)
+
+Example:
+
+-> { "execute": "blockdev-close-tray",
+ "arguments": { "device": "ide1-cd0" } }
+
+<- { "timestamp": { "seconds": 1418751345,
+ "microseconds": 272147 },
+ "event": "DEVICE_TRAY_MOVED",
+ "data": { "device": "ide1-cd0",
+ "tray-open": false } }
+
+<- { "return": {} }
+
+EQMP
+
+ {
+ .name = "x-blockdev-remove-medium",
+ .args_type = "device:s",
+ .mhandler.cmd_new = qmp_marshal_x_blockdev_remove_medium,
+ },
+
+SQMP
+x-blockdev-remove-medium
+------------------------
+
+Removes a medium (a block driver state tree) from a block device. That block
+device's tray must currently be open (unless there is no attached guest device).
+
+If the tray is open and there is no medium inserted, this will be a no-op.
+
+This command is still a work in progress and is considered experimental.
+Stay away from it unless you want to help with its development.
+
+Arguments:
+
+- "device": block device name (json-string)
+
+Example:
+
+-> { "execute": "x-blockdev-remove-medium",
+ "arguments": { "device": "ide1-cd0" } }
+
+<- { "error": { "class": "GenericError",
+ "desc": "Tray of device 'ide1-cd0' is not open" } }
+
+-> { "execute": "blockdev-open-tray",
+ "arguments": { "device": "ide1-cd0" } }
+
+<- { "timestamp": { "seconds": 1418751627,
+ "microseconds": 549958 },
+ "event": "DEVICE_TRAY_MOVED",
+ "data": { "device": "ide1-cd0",
+ "tray-open": true } }
+
+<- { "return": {} }
+
+-> { "execute": "x-blockdev-remove-medium",
+ "arguments": { "device": "ide1-cd0" } }
+
+<- { "return": {} }
+
+EQMP
+
+ {
+ .name = "x-blockdev-insert-medium",
+ .args_type = "device:s,node-name:s",
+ .mhandler.cmd_new = qmp_marshal_x_blockdev_insert_medium,
+ },
+
+SQMP
+x-blockdev-insert-medium
+------------------------
+
+Inserts a medium (a block driver state tree) into a block device. That block
+device's tray must currently be open (unless there is no attached guest device)
+and there must be no medium inserted already.
+
+This command is still a work in progress and is considered experimental.
+Stay away from it unless you want to help with its development.
+
+Arguments:
+
+- "device": block device name (json-string)
+- "node-name": root node of the BDS tree to insert into the block device
+
+Example:
+
+-> { "execute": "blockdev-add",
+ "arguments": { "options": { "node-name": "node0",
+ "driver": "raw",
+ "file": { "driver": "file",
+ "filename": "fedora.iso" } } } }
+
+<- { "return": {} }
+
+-> { "execute": "x-blockdev-insert-medium",
+ "arguments": { "device": "ide1-cd0",
+ "node-name": "node0" } }
+
+<- { "return": {} }
+
+EQMP
+
+ {
.name = "query-named-block-nodes",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_named_block_nodes,
+ .mhandler.cmd_new = qmp_marshal_query_named_block_nodes,
},
SQMP
@@ -3934,9 +4460,62 @@ Example:
EQMP
{
+ .name = "blockdev-change-medium",
+ .args_type = "device:B,filename:F,format:s?,read-only-mode:s?",
+ .mhandler.cmd_new = qmp_marshal_blockdev_change_medium,
+ },
+
+SQMP
+blockdev-change-medium
+----------------------
+
+Changes the medium inserted into a block device by ejecting the current medium
+and loading a new image file which is inserted as the new medium.
+
+Arguments:
+
+- "device": device name (json-string)
+- "filename": filename of the new image (json-string)
+- "format": format of the new image (json-string, optional)
+- "read-only-mode": new read-only mode (json-string, optional)
+ - Possible values: "retain" (default), "read-only", "read-write"
+
+Examples:
+
+1. Change a removable medium
+
+-> { "execute": "blockdev-change-medium",
+ "arguments": { "device": "ide1-cd0",
+ "filename": "/srv/images/Fedora-12-x86_64-DVD.iso",
+ "format": "raw" } }
+<- { "return": {} }
+
+2. Load a read-only medium into a writable drive
+
+-> { "execute": "blockdev-change-medium",
+ "arguments": { "device": "isa-fd0",
+ "filename": "/srv/images/ro.img",
+ "format": "raw",
+ "read-only-mode": "retain" } }
+
+<- { "error":
+ { "class": "GenericError",
+ "desc": "Could not open '/srv/images/ro.img': Permission denied" } }
+
+-> { "execute": "blockdev-change-medium",
+ "arguments": { "device": "isa-fd0",
+ "filename": "/srv/images/ro.img",
+ "format": "raw",
+ "read-only-mode": "read-only" } }
+
+<- { "return": {} }
+
+EQMP
+
+ {
.name = "query-memdev",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_memdev,
+ .mhandler.cmd_new = qmp_marshal_query_memdev,
},
SQMP
@@ -3974,7 +4553,7 @@ EQMP
{
.name = "query-memory-devices",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_memory_devices,
+ .mhandler.cmd_new = qmp_marshal_query_memory_devices,
},
SQMP
@@ -4001,7 +4580,7 @@ EQMP
{
.name = "query-acpi-ospm-status",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_query_acpi_ospm_status,
+ .mhandler.cmd_new = qmp_marshal_query_acpi_ospm_status,
},
SQMP
@@ -4024,7 +4603,7 @@ EQMP
{
.name = "rtc-reset-reinjection",
.args_type = "",
- .mhandler.cmd_new = qmp_marshal_input_rtc_reset_reinjection,
+ .mhandler.cmd_new = qmp_marshal_rtc_reset_reinjection,
},
#endif
@@ -4045,7 +4624,7 @@ EQMP
{
.name = "trace-event-get-state",
.args_type = "name:s",
- .mhandler.cmd_new = qmp_marshal_input_trace_event_get_state,
+ .mhandler.cmd_new = qmp_marshal_trace_event_get_state,
},
SQMP
@@ -4063,7 +4642,7 @@ EQMP
{
.name = "trace-event-set-state",
.args_type = "name:s,enable:b,ignore-unavailable:b?",
- .mhandler.cmd_new = qmp_marshal_input_trace_event_set_state,
+ .mhandler.cmd_new = qmp_marshal_trace_event_set_state,
},
SQMP
@@ -4079,21 +4658,22 @@ Example:
EQMP
{
- .name = "x-input-send-event",
+ .name = "input-send-event",
.args_type = "console:i?,events:q",
- .mhandler.cmd_new = qmp_marshal_input_x_input_send_event,
+ .mhandler.cmd_new = qmp_marshal_input_send_event,
},
SQMP
-@x-input-send-event
+@input-send-event
-----------------
Send input event to guest.
Arguments:
-- "console": console index. (json-int, optional)
-- "events": list of input events.
+- "device": display device (json-string, optional)
+- "head": display head (json-int, optional)
+- "events": list of input events
The consoles are visible in the qom tree, under
/backend/console[$index]. They have a device link and head property, so
@@ -4105,24 +4685,24 @@ Example (1):
Press left mouse button.
--> { "execute": "x-input-send-event",
- "arguments": { "console": 0,
+-> { "execute": "input-send-event",
+ "arguments": { "device": "video0",
"events": [ { "type": "btn",
- "data" : { "down": true, "button": "Left" } } ] } }
+ "data" : { "down": true, "button": "left" } } ] } }
<- { "return": {} }
--> { "execute": "x-input-send-event",
- "arguments": { "console": 0,
+-> { "execute": "input-send-event",
+ "arguments": { "device": "video0",
"events": [ { "type": "btn",
- "data" : { "down": false, "button": "Left" } } ] } }
+ "data" : { "down": false, "button": "left" } } ] } }
<- { "return": {} }
Example (2):
Press ctrl-alt-del.
--> { "execute": "x-input-send-event",
- "arguments": { "console": 0, "events": [
+-> { "execute": "input-send-event",
+ "arguments": { "events": [
{ "type": "key", "data" : { "down": true,
"key": {"type": "qcode", "data": "ctrl" } } },
{ "type": "key", "data" : { "down": true,
@@ -4135,10 +4715,10 @@ Example (3):
Move mouse pointer to absolute coordinates (20000, 400).
--> { "execute": "x-input-send-event" ,
- "arguments": { "console": 0, "events": [
- { "type": "abs", "data" : { "axis": "X", "value" : 20000 } },
- { "type": "abs", "data" : { "axis": "Y", "value" : 400 } } ] } }
+-> { "execute": "input-send-event" ,
+ "arguments": { "events": [
+ { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
+ { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
<- { "return": {} }
EQMP
@@ -4146,7 +4726,7 @@ EQMP
{
.name = "block-set-write-threshold",
.args_type = "node-name:s,write-threshold:l",
- .mhandler.cmd_new = qmp_marshal_input_block_set_write_threshold,
+ .mhandler.cmd_new = qmp_marshal_block_set_write_threshold,
},
SQMP
@@ -4174,7 +4754,7 @@ EQMP
{
.name = "query-rocker",
.args_type = "name:s",
- .mhandler.cmd_new = qmp_marshal_input_query_rocker,
+ .mhandler.cmd_new = qmp_marshal_query_rocker,
},
SQMP
@@ -4195,7 +4775,7 @@ EQMP
{
.name = "query-rocker-ports",
.args_type = "name:s",
- .mhandler.cmd_new = qmp_marshal_input_query_rocker_ports,
+ .mhandler.cmd_new = qmp_marshal_query_rocker_ports,
},
SQMP
@@ -4220,7 +4800,7 @@ EQMP
{
.name = "query-rocker-of-dpa-flows",
.args_type = "name:s,tbl-id:i?",
- .mhandler.cmd_new = qmp_marshal_input_query_rocker_of_dpa_flows,
+ .mhandler.cmd_new = qmp_marshal_query_rocker_of_dpa_flows,
},
SQMP
@@ -4249,7 +4829,7 @@ EQMP
{
.name = "query-rocker-of-dpa-groups",
.args_type = "name:s,type:i?",
- .mhandler.cmd_new = qmp_marshal_input_query_rocker_of_dpa_groups,
+ .mhandler.cmd_new = qmp_marshal_query_rocker_of_dpa_groups,
},
SQMP
@@ -4273,3 +4853,30 @@ Example:
{"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3840,
"pop-vlan": 1, "id": 251658240}
]}
+
+EQMP
+
+#if defined TARGET_ARM
+ {
+ .name = "query-gic-capabilities",
+ .args_type = "",
+ .mhandler.cmd_new = qmp_marshal_query_gic_capabilities,
+ },
+#endif
+
+SQMP
+query-gic-capabilities
+---------------
+
+Return a list of GICCapability objects, describing supported GIC
+(Generic Interrupt Controller) versions.
+
+Arguments: None
+
+Example:
+
+-> { "execute": "query-gic-capabilities" }
+<- { "return": [{ "version": 2, "emulated": true, "kernel": false },
+ { "version": 3, "emulated": false, "kernel": true } ] }
+
+EQMP