From 3df58d411514f9f1144f8db5ee868892399771ff Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 13 Jan 2017 15:41:15 +0100 Subject: qapi: replace 'o' for list items Replace with '*', the common form for list items. Signed-off-by: Marc-André Lureau Message-Id: <20170113144135.5150-2-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- qapi-schema.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index ce20f16757..9059076dc4 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1883,11 +1883,11 @@ # # Known limitations: # -# o This command is stateless, this means that commands that depend +# * This command is stateless, this means that commands that depend # on state information (such as getfd) might not work # -# o Commands that prompt the user for data (eg. 'cont' when the block -# device is encrypted) don't currently work +# * Commands that prompt the user for data (eg. 'cont' when the block +# device is encrypted) don't currently work ## { 'command': 'human-monitor-command', 'data': {'command-line': 'str', '*cpu-index': 'int'}, -- cgit v1.2.3-55-g7522 From 515b17c27c6c5ca4c741a5cec15523bd73e4dc93 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 13 Jan 2017 15:41:16 +0100 Subject: qapi: move QKeyCode doc body at the top Following documentation guidelines. Signed-off-by: Marc-André Lureau Message-Id: <20170113144135.5150-3-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- qapi-schema.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index 9059076dc4..fa0bce7beb 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3615,6 +3615,10 @@ ## # @QKeyCode: # +# An enumeration of key name. +# +# This is used by the @send-key command. +# # @unmapped: since 2.0 # @pause: since 2.0 # @ro: since 2.4 @@ -3625,10 +3629,6 @@ # @henkan: since 2.9 # @yen: since 2.9 # -# An enumeration of key name. -# -# This is used by the send-key command. -# # Since: 1.3.0 # ## -- cgit v1.2.3-55-g7522 From e22da431a79959b66dc0ed562eca1095e2bce196 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 13 Jan 2017 15:41:17 +0100 Subject: qapi: Format TODO comments more consistently Consistently put a colon after TODO. This will make the TODOs stand out in the documentation we're going to generate. Signed-off-by: Marc-André Lureau Message-Id: <20170113144135.5150-4-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster [Commit message rewritten] Signed-off-by: Markus Armbruster --- qapi-schema.json | 4 ++-- qapi/introspect.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index fa0bce7beb..0a3057eb20 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2314,7 +2314,7 @@ # "mac": "52:54:00:12:34:56" } } # <- { "return": {} } # -# TODO This command effectively bypasses QAPI completely due to its +# TODO: This command effectively bypasses QAPI completely due to its # "additional arguments" business. It shouldn't have been added to # the schema in this form. It should be qapified properly, or # replaced by a properly qapified command. @@ -2515,7 +2515,7 @@ # # Additional arguments depend on the type. # -# TODO This command effectively bypasses QAPI completely due to its +# TODO: This command effectively bypasses QAPI completely due to its # "additional arguments" business. It shouldn't have been added to # the schema in this form. It should be qapified properly, or # replaced by a properly qapified command. diff --git a/qapi/introspect.json b/qapi/introspect.json index fd4dc84196..464097a235 100644 --- a/qapi/introspect.json +++ b/qapi/introspect.json @@ -258,7 +258,7 @@ # # @ret-type: the name of the command's result type. # -# TODO @success-response (currently irrelevant, because it's QGA, not QMP) +# TODO: @success-response (currently irrelevant, because it's QGA, not QMP) # # Since: 2.5 ## -- cgit v1.2.3-55-g7522 From b780e9c3f2a29180397ddcd1f3c5e5a5c49353e7 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 13 Jan 2017 15:41:18 +0100 Subject: qapi: improve device_add schema 'device_add' is still incomplete for now, but we can fix a few arguments: - 'bus' is a common argument, regardless of the device - 'id' is an optional argument Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20170113144135.5150-5-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster --- qapi-schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index 0a3057eb20..863abc418f 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2292,7 +2292,7 @@ # # @bus: #optional the device's parent bus (device tree path) # -# @id: the device's ID, must be unique +# @id: #optional the device's ID, must be unique # # Additional arguments depend on the type. # @@ -2322,7 +2322,7 @@ # Since: 0.13 ## { 'command': 'device_add', - 'data': {'driver': 'str', 'id': 'str'}, + 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'}, 'gen': false } # so we can get the additional arguments ## -- cgit v1.2.3-55-g7522 From 41dc1dc066a59a0421329dba64daf11f78bf6619 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 13 Jan 2017 15:41:19 +0100 Subject: qapi: improve TransactionAction doc TransactionAction is a flat union, document 'type' versions exhaustively, and sort the members. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Message-Id: <20170113144135.5150-6-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster --- qapi-schema.json | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index 863abc418f..5647a600ef 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1795,28 +1795,29 @@ # @TransactionAction: # # A discriminated record of operations that can be performed with -# @transaction. +# @transaction. Action @type can be: # -# Since: 1.1 +# - @abort: since 1.6 +# - @block-dirty-bitmap-add: since 2.5 +# - @block-dirty-bitmap-clear: since 2.5 +# - @blockdev-backup: since 2.3 +# - @blockdev-snapshot: since 2.5 +# - @blockdev-snapshot-internal-sync: since 1.7 +# - @blockdev-snapshot-sync: since 1.1 +# - @drive-backup: since 1.6 # -# drive-backup since 1.6 -# abort since 1.6 -# blockdev-snapshot-internal-sync since 1.7 -# blockdev-backup since 2.3 -# blockdev-snapshot since 2.5 -# block-dirty-bitmap-add since 2.5 -# block-dirty-bitmap-clear since 2.5 +# Since: 1.1 ## { 'union': 'TransactionAction', 'data': { - 'blockdev-snapshot': 'BlockdevSnapshot', - 'blockdev-snapshot-sync': 'BlockdevSnapshotSync', - 'drive-backup': 'DriveBackup', - 'blockdev-backup': 'BlockdevBackup', 'abort': 'Abort', - 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal', 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd', - 'block-dirty-bitmap-clear': 'BlockDirtyBitmap' + 'block-dirty-bitmap-clear': 'BlockDirtyBitmap', + 'blockdev-backup': 'BlockdevBackup', + 'blockdev-snapshot': 'BlockdevSnapshot', + 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal', + 'blockdev-snapshot-sync': 'BlockdevSnapshotSync', + 'drive-backup': 'DriveBackup' } } ## -- cgit v1.2.3-55-g7522 From 5807ff88b1c97052a979050ff8f4246d7dfdc764 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 13 Jan 2017 15:41:21 +0100 Subject: qapi: Reorder doc comments for future doc generator The doc generator we're going to add expects a fairly rigid doc comment structure. Reorder / rephrase some doc comments to please it. Signed-off-by: Marc-André Lureau Message-Id: <20170113144135.5150-8-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster [Commit message rewritten] Signed-off-by: Markus Armbruster --- qapi-schema.json | 10 +++++----- qapi/event.json | 4 ++-- qapi/introspect.json | 3 +-- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index 5647a600ef..a1ceb71bbb 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4739,17 +4739,17 @@ # it should be passed by management with device_add command when # a CPU is being hotplugged. # +# @node-id: #optional NUMA node ID the CPU belongs to +# @socket-id: #optional socket number within node/board the CPU belongs to +# @core-id: #optional core number within socket the CPU belongs to +# @thread-id: #optional thread number within core the CPU belongs to +# # Note: currently there are 4 properties that could be present # but management should be prepared to pass through other # properties with device_add command to allow for future # interface extension. This also requires the filed names to be kept in # sync with the properties passed to -device/device_add. # -# @node-id: #optional NUMA node ID the CPU belongs to -# @socket-id: #optional socket number within node/board the CPU belongs to -# @core-id: #optional core number within socket the CPU belongs to -# @thread-id: #optional thread number within core the CPU belongs to -# # Since: 2.7 ## { 'struct': 'CpuInstanceProperties', diff --git a/qapi/event.json b/qapi/event.json index 37bf34ed6d..c7689b211d 100644 --- a/qapi/event.json +++ b/qapi/event.json @@ -272,9 +272,9 @@ # # Emitted when guest executes ACPI _OST method. # -# Since: 2.1 -# # @info: ACPIOSTInfo type as described in qapi-schema.json +# +# Since: 2.1 ## { 'event': 'ACPI_DEVICE_OST', 'data': { 'info': 'ACPIOSTInfo' } } diff --git a/qapi/introspect.json b/qapi/introspect.json index 464097a235..f6adc439bb 100644 --- a/qapi/introspect.json +++ b/qapi/introspect.json @@ -78,14 +78,13 @@ # @SchemaInfo: # # @name: the entity's name, inherited from @base. +# The SchemaInfo is always referenced by this name. # Commands and events have the name defined in the QAPI schema. # Unlike command and event names, type names are not part of # the wire ABI. Consequently, type names are meaningless # strings here, although they are still guaranteed unique # regardless of @meta-type. # -# All references to other SchemaInfo are by name. -# # @meta-type: the entity's meta type, inherited from @base. # # Additional members depend on the value of @meta-type. -- cgit v1.2.3-55-g7522 From d3a48372a42c62608c2f773376810e6a9c1851fb Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 13 Jan 2017 15:41:23 +0100 Subject: qapi: add some sections in docs Add some more section titles to organize the documentation we're going to generate. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Message-Id: <20170113144135.5150-10-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster --- qapi-schema.json | 4 ++++ qapi/block-core.json | 6 ++++-- qapi/block.json | 10 ++++++++-- qapi/common.json | 6 ++++-- qapi/crypto.json | 5 ++++- qapi/event.json | 6 ++++++ qapi/rocker.json | 4 ++++ qapi/trace.json | 3 +++ 8 files changed, 37 insertions(+), 7 deletions(-) (limited to 'qapi-schema.json') diff --git a/qapi-schema.json b/qapi-schema.json index a1ceb71bbb..8744b1b774 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -20,6 +20,10 @@ # QAPI introspection { 'include': 'qapi/introspect.json' } +## +# = QMP commands +## + ## # @qmp_capabilities: # diff --git a/qapi/block-core.json b/qapi/block-core.json index fb5034c3a9..7f7f10bb49 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1,6 +1,8 @@ # -*- Mode: Python -*- -# -# QAPI block core definitions (vm unrelated) + +## +# == QAPI block core definitions (vm unrelated) +## # QAPI common definitions { 'include': 'common.json' } diff --git a/qapi/block.json b/qapi/block.json index 8e9f59019a..693e234779 100644 --- a/qapi/block.json +++ b/qapi/block.json @@ -1,10 +1,16 @@ # -*- Mode: Python -*- -# -# QAPI block definitions (vm related) + +## +# = QAPI block definitions +## # QAPI block core definitions { 'include': 'block-core.json' } +## +# == QAPI block definitions (vm unrelated) +## + ## # @BiosAtaTranslation: # diff --git a/qapi/common.json b/qapi/common.json index 624a8619c8..d93f159946 100644 --- a/qapi/common.json +++ b/qapi/common.json @@ -1,6 +1,8 @@ # -*- Mode: Python -*- -# -# QAPI common definitions + +## +# = QAPI common definitions +## ## # @QapiErrorClass: diff --git a/qapi/crypto.json b/qapi/crypto.json index f4fd93b813..93a04743ea 100644 --- a/qapi/crypto.json +++ b/qapi/crypto.json @@ -1,6 +1,9 @@ # -*- Mode: Python -*- # -# QAPI crypto definitions + +## +# = QAPI crypto definitions +## ## # @QCryptoTLSCredsEndpoint: diff --git a/qapi/event.json b/qapi/event.json index c7689b211d..0cd4b79ad8 100644 --- a/qapi/event.json +++ b/qapi/event.json @@ -1,3 +1,9 @@ +# -*- Mode: Python -*- + +## +# = Other events +## + ## # @SHUTDOWN: # diff --git a/qapi/rocker.json b/qapi/rocker.json index ace27760f1..1e511cd37a 100644 --- a/qapi/rocker.json +++ b/qapi/rocker.json @@ -1,3 +1,7 @@ +## +# = Rocker switch device +## + ## # @RockerSwitch: # diff --git a/qapi/trace.json b/qapi/trace.json index 4fd39b7792..3ad7df7fdb 100644 --- a/qapi/trace.json +++ b/qapi/trace.json @@ -5,6 +5,9 @@ # This work is licensed under the terms of the GNU GPL, version 2 or later. # See the COPYING file in the top-level directory. +## +# = Tracing commands +## ## # @TraceEventState: -- cgit v1.2.3-55-g7522 From 65ce54f5e2abe58b6447457e1453a517ba8c91f8 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:06:34 +0200 Subject: qmp-commands: move 'add_client' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 18 ------------------ qapi-schema.json | 7 +++++++ 2 files changed, 7 insertions(+), 18 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 18db4cdb82..a2594286f8 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1548,24 +1548,6 @@ Example: "time": "+60" } } <- { "return": {} } -add_client ----------- - -Add a graphics client - -Arguments: - -- "protocol": protocol name (json-string) -- "fdname": file descriptor name (json-string) -- "skipauth": whether to skip authentication (json-bool, optional) -- "tls": whether to perform TLS (json-bool, optional) - -Example: - --> { "execute": "add_client", "arguments": { "protocol": "vnc", - "fdname": "myclient" } } -<- { "return": {} } - qmp_capabilities ---------------- diff --git a/qapi-schema.json b/qapi-schema.json index 8744b1b774..a24e179991 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -89,6 +89,13 @@ # Returns: nothing on success. # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "add_client", "arguments": { "protocol": "vnc", +# "fdname": "myclient" } } +# <- { "return": {} } +# ## { 'command': 'add_client', 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool', -- cgit v1.2.3-55-g7522 From 3aa4c6cd3932f5606f2faa59e5d7a45fe12417bb Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:07:26 +0200 Subject: qmp-commands: move 'query-name' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 14 -------------- qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 14 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index a2594286f8..ceee41fb3b 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -2607,20 +2607,6 @@ Example: } } -query-name ----------- - -Show VM name. - -Return a json-object with the following information: - -- "name": VM's name (json-string, optional) - -Example: - --> { "execute": "query-name" } -<- { "return": { "name": "qemu-name" } } - query-uuid ---------- diff --git a/qapi-schema.json b/qapi-schema.json index a24e179991..e6d7063bc4 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -120,6 +120,12 @@ # Returns: @NameInfo of the guest # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "query-name" } +# <- { "return": { "name": "qemu-name" } } +# ## { 'command': 'query-name', 'returns': 'NameInfo' } -- cgit v1.2.3-55-g7522 From b4f65cd27a049632e77e258bb7503d49a9c54a70 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:07:57 +0200 Subject: qmp-commands: move 'query-kvm' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 15 --------------- qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 15 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index ceee41fb3b..33fa51ebea 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -2405,21 +2405,6 @@ Example: Note: This example has been shortened as the real response is too long. -query-kvm ---------- - -Show KVM information. - -Return a json-object with the following information: - -- "enabled": true if KVM support is enabled, false otherwise (json-bool) -- "present": true if QEMU has KVM support, false otherwise (json-bool) - -Example: - --> { "execute": "query-kvm" } -<- { "return": { "enabled": true, "present": true } } - query-status ------------ diff --git a/qapi-schema.json b/qapi-schema.json index e6d7063bc4..f7ac9f09e3 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -150,6 +150,12 @@ # Returns: @KvmInfo # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "query-kvm" } +# <- { "return": { "enabled": true, "present": true } } +# ## { 'command': 'query-kvm', 'returns': 'KvmInfo' } -- cgit v1.2.3-55-g7522 From 477bc1e4f18acccdd76bed12cbb0b980603fe5ae Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:10:12 +0200 Subject: qmp-commands: move 'query-status' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 31 ------------------------------- qapi-schema.json | 8 ++++++++ 2 files changed, 8 insertions(+), 31 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 33fa51ebea..47ae84011a 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -2405,37 +2405,6 @@ Example: Note: This example has been shortened as the real response is too long. -query-status ------------- - -Return a json-object with the following information: - -- "running": true if the VM is running, or false if it is paused (json-bool) -- "singlestep": true if the VM is in single step mode, - false otherwise (json-bool) -- "status": one of the following values (json-string) - "debug" - QEMU is running on a debugger - "inmigrate" - guest is paused waiting for an incoming migration - "internal-error" - An internal error that prevents further guest - execution has occurred - "io-error" - the last IOP has failed and the device is configured - to pause on I/O errors - "paused" - guest has been paused via the 'stop' command - "postmigrate" - guest is paused following a successful 'migrate' - "prelaunch" - QEMU was started with -S and guest has not started - "finish-migrate" - guest is paused to finish the migration process - "restore-vm" - guest is paused to restore VM state - "running" - guest is actively running - "save-vm" - guest is paused to save the VM state - "shutdown" - guest is shut down (and -no-shutdown is in use) - "watchdog" - the watchdog action is configured to pause and - has been triggered - -Example: - --> { "execute": "query-status" } -<- { "return": { "running": true, "singlestep": false, "status": "running" } } - query-mice ---------- diff --git a/qapi-schema.json b/qapi-schema.json index f7ac9f09e3..5a8975dea3 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -236,6 +236,14 @@ # Returns: @StatusInfo reflecting all VCPUs # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "query-status" } +# <- { "return": { "running": true, +# "singlestep": false, +# "status": "running" } } +# ## { 'command': 'query-status', 'returns': 'StatusInfo' } -- cgit v1.2.3-55-g7522 From 0ed90f77e833037c126f5e5e76956d256a655e5f Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:10:54 +0200 Subject: qmp-commands: move 'query-uuid' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 14 -------------- qapi-schema.json | 8 +++++++- 2 files changed, 7 insertions(+), 15 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 47ae84011a..ab0e38c89f 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -2561,20 +2561,6 @@ Example: } } -query-uuid ----------- - -Show VM UUID. - -Return a json-object with the following information: - -- "UUID": Universally Unique Identifier (json-string) - -Example: - --> { "execute": "query-uuid" } -<- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } } - query-command-line-options -------------------------- diff --git a/qapi-schema.json b/qapi-schema.json index 5a8975dea3..12014a24fd 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -250,7 +250,7 @@ ## # @UuidInfo: # -# Guest UUID information. +# Guest UUID information (Universally Unique Identifier). # # @UUID: the UUID of the guest # @@ -268,6 +268,12 @@ # Returns: The @UuidInfo for the guest # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "query-uuid" } +# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } } +# ## { 'command': 'query-uuid', 'returns': 'UuidInfo' } -- cgit v1.2.3-55-g7522 From 4055aa8d409262188bc0fc139e8d5be38cfd4f3d Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:12:15 +0200 Subject: qmp-commands: move 'query-chardev' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 36 ------------------------------------ qapi-schema.json | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 36 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index ab0e38c89f..ef7366eb4e 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1690,42 +1690,6 @@ named schema entities. Entities are commands, events and various types. See docs/qapi-code-gen.txt for information on their structure and intended use. -query-chardev -------------- - -Each device is represented by a json-object. The returned value is a json-array -of all devices. - -Each json-object contain the following: - -- "label": device's label (json-string) -- "filename": device's file (json-string) -- "frontend-open": open/closed state of the frontend device attached to this - backend (json-bool) - -Example: - --> { "execute": "query-chardev" } -<- { - "return": [ - { - "label": "charchannel0", - "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server", - "frontend-open": false - }, - { - "label": "charmonitor", - "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server", - "frontend-open": true - }, - { - "label": "charserial0", - "filename": "pty:/dev/pts/2", - "frontend-open": true - } - ] - } - query-chardev-backends ------------- diff --git a/qapi-schema.json b/qapi-schema.json index 12014a24fd..5bab9894a9 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -307,6 +307,30 @@ # Returns: a list of @ChardevInfo # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "query-chardev" } +# <- { +# "return": [ +# { +# "label": "charchannel0", +# "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server", +# "frontend-open": false +# }, +# { +# "label": "charmonitor", +# "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server", +# "frontend-open": true +# }, +# { +# "label": "charserial0", +# "filename": "pty:/dev/pts/2", +# "frontend-open": true +# } +# ] +# } +# ## { 'command': 'query-chardev', 'returns': ['ChardevInfo'] } -- cgit v1.2.3-55-g7522 From 90e365c054f64c970697b735d947834f6b65e90e Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:13:09 +0200 Subject: qmp-commands: move 'query-chardev-backends' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 32 -------------------------------- qapi-schema.json | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 32 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index ef7366eb4e..46d6abe612 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1690,38 +1690,6 @@ named schema entities. Entities are commands, events and various types. See docs/qapi-code-gen.txt for information on their structure and intended use. -query-chardev-backends -------------- - -List available character device backends. - -Each backend is represented by a json-object, the returned value is a json-array -of all backends. - -Each json-object contains: - -- "name": backend name (json-string) - -Example: - --> { "execute": "query-chardev-backends" } -<- { - "return":[ - { - "name":"udp" - }, - { - "name":"tcp" - }, - { - "name":"unix" - }, - { - "name":"spiceport" - } - ] - } - query-block ----------- diff --git a/qapi-schema.json b/qapi-schema.json index 5bab9894a9..8fd1e49143 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -353,6 +353,27 @@ # Returns: a list of @ChardevBackendInfo # # Since: 2.0 +# +# Example: +# +# -> { "execute": "query-chardev-backends" } +# <- { +# "return":[ +# { +# "name":"udp" +# }, +# { +# "name":"tcp" +# }, +# { +# "name":"unix" +# }, +# { +# "name":"spiceport" +# } +# ] +# } +# ## { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] } -- cgit v1.2.3-55-g7522 From a4143a845a6d4b078b34aa3c750566cfdea6192a Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:15:20 +0200 Subject: qmp-commands: move 'ringbuf-write' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 20 -------------------- qapi-schema.json | 9 +++++++++ 2 files changed, 9 insertions(+), 20 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 46d6abe612..c22c6f11ca 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -334,26 +334,6 @@ Example: Note: inject-nmi fails when the guest doesn't support injecting. -ringbuf-write -------------- - -Write to a ring buffer character device. - -Arguments: - -- "device": ring buffer character device name (json-string) -- "data": data to write (json-string) -- "format": data format (json-string, optional) - - Possible values: "utf8" (default), "base64" - -Example: - --> { "execute": "ringbuf-write", - "arguments": { "device": "foo", - "data": "abcdefgh", - "format": "utf8" } } -<- { "return": {} } - ringbuf-read ------------- diff --git a/qapi-schema.json b/qapi-schema.json index 8fd1e49143..cff9ae25ed 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -410,6 +410,15 @@ # Returns: Nothing on success # # Since: 1.4 +# +# Example: +# +# -> { "execute": "ringbuf-write", +# "arguments": { "device": "foo", +# "data": "abcdefgh", +# "format": "utf8" } } +# <- { "return": {} } +# ## { 'command': 'ringbuf-write', 'data': {'device': 'str', 'data': 'str', -- cgit v1.2.3-55-g7522 From 4f19a01b3e066b56bf22d83ff12d840c9a213dff Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:15:59 +0200 Subject: qmp-commands: move 'ringbuf-read' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 27 --------------------------- qapi-schema.json | 9 +++++++++ 2 files changed, 9 insertions(+), 27 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index c22c6f11ca..817cc5a721 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -334,33 +334,6 @@ Example: Note: inject-nmi fails when the guest doesn't support injecting. -ringbuf-read -------------- - -Read from a ring buffer character device. - -Arguments: - -- "device": ring buffer character device name (json-string) -- "size": how many bytes to read at most (json-int) - - Number of data bytes, not number of characters in encoded data -- "format": data format (json-string, optional) - - Possible values: "utf8" (default), "base64" - - Naturally, format "utf8" works only when the ring buffer - contains valid UTF-8 text. Invalid UTF-8 sequences get - replaced. Bug: replacement doesn't work. Bug: can screw - up on encountering NUL characters, after the ring buffer - lost data, and when reading stops because the size limit - is reached. - -Example: - --> { "execute": "ringbuf-read", - "arguments": { "device": "foo", - "size": 1000, - "format": "utf8" } } -<- {"return": "abcdefgh"} - xen-save-devices-state ------- diff --git a/qapi-schema.json b/qapi-schema.json index cff9ae25ed..dfd3299774 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -446,6 +446,15 @@ # Returns: data read from the device # # Since: 1.4 +# +# Example: +# +# -> { "execute": "ringbuf-read", +# "arguments": { "device": "foo", +# "size": 1000, +# "format": "utf8" } } +# <- { "return": "abcdefgh" } +# ## { 'command': 'ringbuf-read', 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'}, -- cgit v1.2.3-55-g7522 From 66c2f5a56ce1a1b85b133ad39ee7cc1a599126cf Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:18:23 +0200 Subject: qmp-commands: move 'query-events' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 28 ---------------------------- qapi-schema.json | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 28 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 817cc5a721..f51ffbf442 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1607,34 +1607,6 @@ Example: Note: This example has been shortened as the real response is too long. -query-events --------------- - -List QMP available events. - -Each event is represented by a json-object, the returned value is a json-array -of all events. - -Each json-object contains: - -- "name": event's name (json-string) - -Example: - --> { "execute": "query-events" } -<- { - "return":[ - { - "name":"SHUTDOWN" - }, - { - "name":"RESET" - } - ] - } - -Note: This example has been shortened as the real response is too long. - query-qmp-schema ---------------- diff --git a/qapi-schema.json b/qapi-schema.json index dfd3299774..b621528f85 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -479,6 +479,23 @@ # Returns: A list of @EventInfo for all supported events # # Since: 1.2.0 +# +# Example: +# +# -> { "execute": "query-events" } +# <- { +# "return": [ +# { +# "name":"SHUTDOWN" +# }, +# { +# "name":"RESET" +# } +# ] +# } +# +# Note: This example has been shortened as the real response is too long. +# ## { 'command': 'query-events', 'returns': ['EventInfo'] } -- cgit v1.2.3-55-g7522 From 104b1caf0544292ab27c9281bb48b0d9bd098658 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:24:07 +0200 Subject: qmp-commands: move 'query-migrate' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 169 -------------------------------------------------- qapi-schema.json | 115 +++++++++++++++++++++++++++++++++- 2 files changed, 114 insertions(+), 170 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index f51ffbf442..094e314ce6 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -2458,175 +2458,6 @@ Example: ] } -query-migrate -------------- - -Migration status. - -Return a json-object. If migration is active there will be another json-object -with RAM migration status and if block migration is active another one with -block migration status. - -The main json-object contains the following: - -- "status": migration status (json-string) - - Possible values: "setup", "active", "completed", "failed", "cancelled" -- "total-time": total amount of ms since migration started. If - migration has ended, it returns the total migration - time (json-int) -- "setup-time" amount of setup time in milliseconds _before_ the - iterations begin but _after_ the QMP command is issued. - This is designed to provide an accounting of any activities - (such as RDMA pinning) which may be expensive, but do not - actually occur during the iterative migration rounds - themselves. (json-int) -- "downtime": only present when migration has finished correctly - total amount in ms for downtime that happened (json-int) -- "expected-downtime": only present while migration is active - total amount in ms for downtime that was calculated on - the last bitmap round (json-int) -- "ram": only present if "status" is "active", it is a json-object with the - following RAM information: - - "transferred": amount transferred in bytes (json-int) - - "remaining": amount remaining to transfer in bytes (json-int) - - "total": total amount of memory in bytes (json-int) - - "duplicate": number of pages filled entirely with the same - byte (json-int) - These are sent over the wire much more efficiently. - - "skipped": number of skipped zero pages (json-int) - - "normal" : number of whole pages transferred. I.e. they - were not sent as duplicate or xbzrle pages (json-int) - - "normal-bytes" : number of bytes transferred in whole - pages. This is just normal pages times size of one page, - but this way upper levels don't need to care about page - size (json-int) - - "dirty-sync-count": times that dirty ram was synchronized (json-int) -- "disk": only present if "status" is "active" and it is a block migration, - it is a json-object with the following disk information: - - "transferred": amount transferred in bytes (json-int) - - "remaining": amount remaining to transfer in bytes json-int) - - "total": total disk size in bytes (json-int) -- "xbzrle-cache": only present if XBZRLE is active. - It is a json-object with the following XBZRLE information: - - "cache-size": XBZRLE cache size in bytes - - "bytes": number of bytes transferred for XBZRLE compressed pages - - "pages": number of XBZRLE compressed pages - - "cache-miss": number of XBRZRLE page cache misses - - "cache-miss-rate": rate of XBRZRLE page cache misses - - "overflow": number of times XBZRLE overflows. This means - that the XBZRLE encoding was bigger than just sent the - whole page, and then we sent the whole page instead (as as - normal page). - -Examples: - -1. Before the first migration - --> { "execute": "query-migrate" } -<- { "return": {} } - -2. Migration is done and has succeeded - --> { "execute": "query-migrate" } -<- { "return": { - "status": "completed", - "ram":{ - "transferred":123, - "remaining":123, - "total":246, - "total-time":12345, - "setup-time":12345, - "downtime":12345, - "duplicate":123, - "normal":123, - "normal-bytes":123456, - "dirty-sync-count":15 - } - } - } - -3. Migration is done and has failed - --> { "execute": "query-migrate" } -<- { "return": { "status": "failed" } } - -4. Migration is being performed and is not a block migration: - --> { "execute": "query-migrate" } -<- { - "return":{ - "status":"active", - "ram":{ - "transferred":123, - "remaining":123, - "total":246, - "total-time":12345, - "setup-time":12345, - "expected-downtime":12345, - "duplicate":123, - "normal":123, - "normal-bytes":123456, - "dirty-sync-count":15 - } - } - } - -5. Migration is being performed and is a block migration: - --> { "execute": "query-migrate" } -<- { - "return":{ - "status":"active", - "ram":{ - "total":1057024, - "remaining":1053304, - "transferred":3720, - "total-time":12345, - "setup-time":12345, - "expected-downtime":12345, - "duplicate":123, - "normal":123, - "normal-bytes":123456, - "dirty-sync-count":15 - }, - "disk":{ - "total":20971520, - "remaining":20880384, - "transferred":91136 - } - } - } - -6. Migration is being performed and XBZRLE is active: - --> { "execute": "query-migrate" } -<- { - "return":{ - "status":"active", - "capabilities" : [ { "capability": "xbzrle", "state" : true } ], - "ram":{ - "total":1057024, - "remaining":1053304, - "transferred":3720, - "total-time":12345, - "setup-time":12345, - "expected-downtime":12345, - "duplicate":10, - "normal":3333, - "normal-bytes":3412992, - "dirty-sync-count":15 - }, - "xbzrle-cache":{ - "cache-size":67108864, - "bytes":20971520, - "pages":2444343, - "cache-miss":2244, - "cache-miss-rate":0.123, - "overflow":34434 - } - } - } - migrate-set-capabilities ------------------------ diff --git a/qapi-schema.json b/qapi-schema.json index b621528f85..6ea311c8a3 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -655,11 +655,124 @@ ## # @query-migrate: # -# Returns information about current migration process. +# Returns information about current migration process. If migration +# is active there will be another json-object with RAM migration +# status and if block migration is active another one with block +# migration status. # # Returns: @MigrationInfo # # Since: 0.14.0 +# +# Example: +# +# 1. Before the first migration +# +# -> { "execute": "query-migrate" } +# <- { "return": {} } +# +# 2. Migration is done and has succeeded +# +# -> { "execute": "query-migrate" } +# <- { "return": { +# "status": "completed", +# "ram":{ +# "transferred":123, +# "remaining":123, +# "total":246, +# "total-time":12345, +# "setup-time":12345, +# "downtime":12345, +# "duplicate":123, +# "normal":123, +# "normal-bytes":123456, +# "dirty-sync-count":15 +# } +# } +# } +# +# 3. Migration is done and has failed +# +# -> { "execute": "query-migrate" } +# <- { "return": { "status": "failed" } } +# +# 4. Migration is being performed and is not a block migration: +# +# -> { "execute": "query-migrate" } +# <- { +# "return":{ +# "status":"active", +# "ram":{ +# "transferred":123, +# "remaining":123, +# "total":246, +# "total-time":12345, +# "setup-time":12345, +# "expected-downtime":12345, +# "duplicate":123, +# "normal":123, +# "normal-bytes":123456, +# "dirty-sync-count":15 +# } +# } +# } +# +# 5. Migration is being performed and is a block migration: +# +# -> { "execute": "query-migrate" } +# <- { +# "return":{ +# "status":"active", +# "ram":{ +# "total":1057024, +# "remaining":1053304, +# "transferred":3720, +# "total-time":12345, +# "setup-time":12345, +# "expected-downtime":12345, +# "duplicate":123, +# "normal":123, +# "normal-bytes":123456, +# "dirty-sync-count":15 +# }, +# "disk":{ +# "total":20971520, +# "remaining":20880384, +# "transferred":91136 +# } +# } +# } +# +# 6. Migration is being performed and XBZRLE is active: +# +# -> { "execute": "query-migrate" } +# <- { +# "return":{ +# "status":"active", +# "capabilities" : [ { "capability": "xbzrle", "state" : true } ], +# "ram":{ +# "total":1057024, +# "remaining":1053304, +# "transferred":3720, +# "total-time":12345, +# "setup-time":12345, +# "expected-downtime":12345, +# "duplicate":10, +# "normal":3333, +# "normal-bytes":3412992, +# "dirty-sync-count":15 +# }, +# "xbzrle-cache":{ +# "cache-size":67108864, +# "bytes":20971520, +# "pages":2444343, +# "cache-miss":2244, +# "cache-miss-rate":0.123, +# "overflow":34434 +# } +# } +# } +# ## { 'command': 'query-migrate', 'returns': 'MigrationInfo' } -- cgit v1.2.3-55-g7522 From 0a0bb9644212cce5f906280d543dd73c88f866db Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:25:56 +0200 Subject: qmp-commands: move 'migrate-set-capabilities' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 21 --------------------- qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 21 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 094e314ce6..da7e88b332 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -2458,27 +2458,6 @@ Example: ] } -migrate-set-capabilities ------------------------- - -Enable/Disable migration capabilities - -- "xbzrle": XBZRLE support -- "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 -- "x-colo": COarse-Grain LOck Stepping (COLO) for Non-stop Service - -Arguments: - -Example: - --> { "execute": "migrate-set-capabilities" , "arguments": - { "capabilities": [ { "capability": "xbzrle", "state": true } ] } } - query-migrate-capabilities -------------------------- diff --git a/qapi-schema.json b/qapi-schema.json index 6ea311c8a3..34712f223e 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -846,6 +846,12 @@ # @capabilities: json array of capability modifications to make # # Since: 1.2 +# +# Example: +# +# -> { "execute": "migrate-set-capabilities" , "arguments": +# { "capabilities": [ { "capability": "xbzrle", "state": true } ] } } +# ## { 'command': 'migrate-set-capabilities', 'data': { 'capabilities': ['MigrationCapabilityStatus'] } } -- cgit v1.2.3-55-g7522 From 135b238e5d622b32ad90b94f25d86a180beb884c Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:27:13 +0200 Subject: qmp-commands: move 'query-migrate-capabilities' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 31 ------------------------------- qapi-schema.json | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 31 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index da7e88b332..5fbe938f7a 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -2458,37 +2458,6 @@ Example: ] } -query-migrate-capabilities --------------------------- - -Query current migration capabilities - -- "capabilities": migration capabilities state - - "xbzrle" : XBZRLE state (json-bool) - - "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) - - "x-colo": COarse-Grain LOck Stepping for Non-stop Service (json-bool) - -Arguments: - -Example: - --> { "execute": "query-migrate-capabilities" } -<- {"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"}, - {"state": false, "capability": "x-colo"} - ]} - migrate-set-parameters ---------------------- diff --git a/qapi-schema.json b/qapi-schema.json index 34712f223e..fb2f42864e 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -864,6 +864,21 @@ # Returns: @MigrationCapabilitiesStatus # # Since: 1.2 +# +# Example: +# +# -> { "execute": "query-migrate-capabilities" } +# <- { "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"}, +# {"state": false, "capability": "x-colo"} +# ]} +# ## { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']} -- cgit v1.2.3-55-g7522 From 35db41e5dcf8b9bad6751be41d1cc87aa2272a55 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:28:47 +0200 Subject: qmp-commands: move 'migrate-set-parameters' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 24 ------------------------ qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 24 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 5fbe938f7a..387cb32b22 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -2458,30 +2458,6 @@ Example: ] } -migrate-set-parameters ----------------------- - -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) -- "cpu-throttle-initial": set initial percentage of time guest cpus are - throttled for auto-converge (json-int) -- "cpu-throttle-increment": set throttle increasing percentage for - auto-converge (json-int) -- "max-bandwidth": set maximum speed for migrations (in bytes/sec) (json-int) -- "downtime-limit": set maximum tolerated downtime (in milliseconds) for - migrations (json-int) -- "x-checkpoint-delay": set the delay time for periodic checkpoint (json-int) - -Arguments: - -Example: - --> { "execute": "migrate-set-parameters" , "arguments": - { "compress-level": 1 } } - query-migrate-parameters ------------------------ diff --git a/qapi-schema.json b/qapi-schema.json index fb2f42864e..a03a98b7c9 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -947,6 +947,12 @@ # Set various migration parameters. See MigrationParameters for details. # # Since: 2.4 +# +# Example: +# +# -> { "execute": "migrate-set-parameters" , +# "arguments": { "compress-level": 1 } } +# ## { 'command': 'migrate-set-parameters', 'boxed': true, 'data': 'MigrationParameters' } -- cgit v1.2.3-55-g7522 From cf56cfad3ca963fef0f2856217d19f2e13ed1c90 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:30:37 +0200 Subject: qmp-commands: move 'query-migrate-parameters' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 34 ---------------------------------- qapi-schema.json | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 34 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 387cb32b22..f5cf7daecf 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -2458,40 +2458,6 @@ Example: ] } -query-migrate-parameters ------------------------- - -Query current migration parameters - -- "parameters": migration parameters value - - "compress-level" : compression level value (json-int) - - "compress-threads" : compression thread count value (json-int) - - "decompress-threads" : decompression thread count value (json-int) - - "cpu-throttle-initial" : initial percentage of time guest cpus are - throttled (json-int) - - "cpu-throttle-increment" : throttle increasing percentage for - auto-converge (json-int) - - "max-bandwidth" : maximium migration speed in bytes per second - (json-int) - - "downtime-limit" : maximum tolerated downtime of migration in - milliseconds (json-int) -Arguments: - -Example: - --> { "execute": "query-migrate-parameters" } -<- { - "return": { - "decompress-threads": 2, - "cpu-throttle-increment": 10, - "compress-threads": 8, - "compress-level": 1, - "cpu-throttle-initial": 20, - "max-bandwidth": 33554432, - "downtime-limit": 300 - } - } - query-balloon ------------- diff --git a/qapi-schema.json b/qapi-schema.json index a03a98b7c9..4381ee3efe 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1024,6 +1024,21 @@ # Returns: @MigrationParameters # # Since: 2.4 +# +# Example: +# +# -> { "execute": "query-migrate-parameters" } +# <- { "return": { +# "decompress-threads": 2, +# "cpu-throttle-increment": 10, +# "compress-threads": 8, +# "compress-level": 1, +# "cpu-throttle-initial": 20, +# "max-bandwidth": 33554432, +# "downtime-limit": 300 +# } +# } +# ## { 'command': 'query-migrate-parameters', 'returns': 'MigrationParameters' } -- cgit v1.2.3-55-g7522 From d0d3fc7ff9f50dde85f020b9aa8ef8e076f647cd Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:32:33 +0200 Subject: qmp-commands: move 'client_migrate_info' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 23 ----------------------- qapi-schema.json | 9 +++++++++ 2 files changed, 9 insertions(+), 23 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index f5cf7daecf..f963066ed1 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -517,29 +517,6 @@ Example: -> { "execute": "x-colo-lost-heartbeat" } <- { "return": {} } -client_migrate_info -------------------- - -Set migration information for remote display. This makes the server -ask the client to automatically reconnect using the new parameters -once migration finished successfully. Only implemented for SPICE. - -Arguments: - -- "protocol": must be "spice" (json-string) -- "hostname": migration target hostname (json-string) -- "port": spice tcp port for plaintext channels (json-int, optional) -- "tls-port": spice tcp port for tls-secured channels (json-int, optional) -- "cert-subject": server certificate subject (json-string, optional) - -Example: - --> { "execute": "client_migrate_info", - "arguments": { "protocol": "spice", - "hostname": "virt42.lab.kraxel.org", - "port": 1234 } } -<- { "return": {} } - dump diff --git a/qapi-schema.json b/qapi-schema.json index 4381ee3efe..1387cd7f90 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1057,6 +1057,15 @@ # @cert-subject: #optional server certificate subject # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "client_migrate_info", +# "arguments": { "protocol": "spice", +# "hostname": "virt42.lab.kraxel.org", +# "port": 1234 } } +# <- { "return": {} } +# ## { 'command': 'client_migrate_info', 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int', -- cgit v1.2.3-55-g7522 From 3c3ea00a8c65f73d41ad921333bbee7931414a4f Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:34:00 +0200 Subject: qmp-commands: move 'migrate-start-postcopy' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 10 ---------- qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index f963066ed1..536bddf417 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -456,16 +456,6 @@ Example: -> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } } <- { "return": {} } -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": {} } - query-migrate-cache-size ------------------------ diff --git a/qapi-schema.json b/qapi-schema.json index 1387cd7f90..116b48be9c 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1079,6 +1079,12 @@ # command. # # Since: 2.5 +# +# Example: +# +# -> { "execute": "migrate-start-postcopy" } +# <- { "return": {} } +# ## { 'command': 'migrate-start-postcopy' } -- cgit v1.2.3-55-g7522 From 60639df5c2368aea848bc9963e57603adf21e1c1 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:34:48 +0200 Subject: qmp-commands: move 'query-mice' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 35 ----------------------------------- qapi-schema.json | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 35 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 536bddf417..693ede6a2a 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -2229,41 +2229,6 @@ Example: Note: This example has been shortened as the real response is too long. -query-mice ----------- - -Show VM mice information. - -Each mouse is represented by a json-object, the returned value is a json-array -of all mice. - -The mouse json-object contains the following: - -- "name": mouse's name (json-string) -- "index": mouse's index (json-int) -- "current": true if this mouse is receiving events, false otherwise (json-bool) -- "absolute": true if the mouse generates absolute input events (json-bool) - -Example: - --> { "execute": "query-mice" } -<- { - "return":[ - { - "name":"QEMU Microsoft Mouse", - "index":0, - "current":false, - "absolute":false - }, - { - "name":"QEMU PS/2 Mouse", - "index":1, - "current":true, - "absolute":true - } - ] - } - query-vnc --------- diff --git a/qapi-schema.json b/qapi-schema.json index 116b48be9c..02ae26a39c 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1187,6 +1187,26 @@ # Returns: a list of @MouseInfo for each device # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "query-mice" } +# <- { "return": [ +# { +# "name":"QEMU Microsoft Mouse", +# "index":0, +# "current":false, +# "absolute":false +# }, +# { +# "name":"QEMU PS/2 Mouse", +# "index":1, +# "current":true, +# "absolute":true +# } +# ] +# } +# ## { 'command': 'query-mice', 'returns': ['MouseInfo'] } -- cgit v1.2.3-55-g7522 From 5c5bee64187269d9ae6deb122626920a963b0f2f Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:56:56 +0200 Subject: qmp-commands: move 'query-cpus' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 46 ---------------------------------------------- qapi-schema.json | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 46 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 693ede6a2a..e0d827a35d 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1945,52 +1945,6 @@ Example: ] } -query-cpus ----------- - -Show CPU information. - -Return a json-array. Each CPU is represented by a json-object, which contains: - -- "CPU": CPU index (json-int) -- "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) - "pc" and "npc": sparc (json-int) - "PC": mips (json-int) -- "thread_id": ID of the underlying host thread (json-int) - -Example: - --> { "execute": "query-cpus" } -<- { - "return":[ - { - "CPU":0, - "current":true, - "halted":false, - "qom_path":"/machine/unattached/device[0]", - "arch":"x86", - "pc":3227107138, - "thread_id":3134 - }, - { - "CPU":1, - "current":false, - "halted":true, - "qom_path":"/machine/unattached/device[2]", - "arch":"x86", - "pc":7108165, - "thread_id":3135 - } - ] - } - query-iothreads --------------- diff --git a/qapi-schema.json b/qapi-schema.json index 02ae26a39c..bf1788d5f9 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1331,6 +1331,32 @@ # Returns: a list of @CpuInfo for each virtual CPU # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "query-cpus" } +# <- { "return": [ +# { +# "CPU":0, +# "current":true, +# "halted":false, +# "qom_path":"/machine/unattached/device[0]", +# "arch":"x86", +# "pc":3227107138, +# "thread_id":3134 +# }, +# { +# "CPU":1, +# "current":false, +# "halted":true, +# "qom_path":"/machine/unattached/device[2]", +# "arch":"x86", +# "pc":7108165, +# "thread_id":3135 +# } +# ] +# } +# ## { 'command': 'query-cpus', 'returns': ['CpuInfo'] } -- cgit v1.2.3-55-g7522 From fdf4d34f8398099431888d3f7522a7b71df0ba58 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 10:57:59 +0200 Subject: qmp-commands: move 'query-iothreads' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 30 ------------------------------ qapi-schema.json | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 30 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index e0d827a35d..e7d47d3be0 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1945,36 +1945,6 @@ Example: ] } -query-iothreads ---------------- - -Returns a list of information about each iothread. - -Note this list excludes the QEMU main loop thread, which is not declared -using the -object iothread command-line option. It is always the main thread -of the process. - -Return a json-array. Each iothread is represented by a json-object, which contains: - -- "id": name of iothread (json-str) -- "thread-id": ID of the underlying host thread (json-int) - -Example: - --> { "execute": "query-iothreads" } -<- { - "return":[ - { - "id":"iothread0", - "thread-id":3134 - }, - { - "id":"iothread1", - "thread-id":3135 - } - ] - } - query-pci --------- diff --git a/qapi-schema.json b/qapi-schema.json index bf1788d5f9..2e5375da1b 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1386,6 +1386,22 @@ # Returns: a list of @IOThreadInfo for each iothread # # Since: 2.0 +# +# Example: +# +# -> { "execute": "query-iothreads" } +# <- { "return": [ +# { +# "id":"iothread0", +# "thread-id":3134 +# }, +# { +# "id":"iothread1", +# "thread-id":3135 +# } +# ] +# } +# ## { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] } -- cgit v1.2.3-55-g7522 From 85f96549100a7239ceae15c9a5b0ba8cdd95bdaa Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 11:36:11 +0200 Subject: qmp-commands: move 'query-vnc' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 54 --------------------------------------------------- qapi-schema.json | 20 +++++++++++++++++++ 2 files changed, 20 insertions(+), 54 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index e7d47d3be0..c56d0eff8b 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -2153,60 +2153,6 @@ Example: Note: This example has been shortened as the real response is too long. -query-vnc ---------- - -Show VNC server information. - -Return a json-object with server information. Connected clients are returned -as a json-array of json-objects. - -The main json-object contains the following: - -- "enabled": true or false (json-bool) -- "host": server's IP address (json-string) -- "family": address family (json-string) - - Possible values: "ipv4", "ipv6", "unix", "unknown" -- "service": server's port number (json-string) -- "auth": authentication method (json-string) - - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight", - "tls", "ultra", "unknown", "vencrypt", "vencrypt", - "vencrypt+plain", "vencrypt+tls+none", - "vencrypt+tls+plain", "vencrypt+tls+sasl", - "vencrypt+tls+vnc", "vencrypt+x509+none", - "vencrypt+x509+plain", "vencrypt+x509+sasl", - "vencrypt+x509+vnc", "vnc" -- "clients": a json-array of all connected clients - -Clients are described by a json-object, each one contain the following: - -- "host": client's IP address (json-string) -- "family": address family (json-string) - - Possible values: "ipv4", "ipv6", "unix", "unknown" -- "service": client's port number (json-string) -- "x509_dname": TLS dname (json-string, optional) -- "sasl_username": SASL username (json-string, optional) - -Example: - --> { "execute": "query-vnc" } -<- { - "return":{ - "enabled":true, - "host":"0.0.0.0", - "service":"50402", - "auth":"vnc", - "family":"ipv4", - "clients":[ - { - "host":"127.0.0.1", - "service":"50401", - "family":"ipv4" - } - ] - } - } - query-spice ----------- diff --git a/qapi-schema.json b/qapi-schema.json index 2e5375da1b..5d51cf0834 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1584,6 +1584,26 @@ # Returns: @VncInfo # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "query-vnc" } +# <- { "return": { +# "enabled":true, +# "host":"0.0.0.0", +# "service":"50402", +# "auth":"vnc", +# "family":"ipv4", +# "clients":[ +# { +# "host":"127.0.0.1", +# "service":"50401", +# "family":"ipv4" +# } +# ] +# } +# } +# ## { 'command': 'query-vnc', 'returns': 'VncInfo' } -- cgit v1.2.3-55-g7522 From bc7e260271f98d44006d4e14bcb05647b8f2606e Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 11:37:09 +0200 Subject: qmp-commands: move 'query-spice' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 67 --------------------------------------------------- qapi-schema.json | 40 +++++++++++++++++++++++++++--- 2 files changed, 36 insertions(+), 71 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index c56d0eff8b..d018480a28 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -2153,73 +2153,6 @@ Example: Note: This example has been shortened as the real response is too long. -query-spice ------------ - -Show SPICE server information. - -Return a json-object with server information. Connected clients are returned -as a json-array of json-objects. - -The main json-object contains the following: - -- "enabled": true or false (json-bool) -- "host": server's IP address (json-string) -- "port": server's port number (json-int, optional) -- "tls-port": server's port number (json-int, optional) -- "auth": authentication method (json-string) - - Possible values: "none", "spice" -- "channels": a json-array of all active channels clients - -Channels are described by a json-object, each one contain the following: - -- "host": client's IP address (json-string) -- "family": address family (json-string) - - Possible values: "ipv4", "ipv6", "unix", "unknown" -- "port": client's port number (json-string) -- "connection-id": spice connection id. All channels with the same id - belong to the same spice session (json-int) -- "channel-type": channel type. "1" is the main control channel, filter for - this one if you want track spice sessions only (json-int) -- "channel-id": channel id. Usually "0", might be different needed when - multiple channels of the same type exist, such as multiple - display channels in a multihead setup (json-int) -- "tls": whether the channel is encrypted (json-bool) - -Example: - --> { "execute": "query-spice" } -<- { - "return": { - "enabled": true, - "auth": "spice", - "port": 5920, - "tls-port": 5921, - "host": "0.0.0.0", - "channels": [ - { - "port": "54924", - "family": "ipv4", - "channel-type": 1, - "connection-id": 1804289383, - "host": "127.0.0.1", - "channel-id": 0, - "tls": true - }, - { - "port": "36710", - "family": "ipv4", - "channel-type": 4, - "connection-id": 1804289383, - "host": "127.0.0.1", - "channel-id": 0, - "tls": false - }, - [ ... more channels follow ... ] - ] - } - } - query-command-line-options -------------------------- diff --git a/qapi-schema.json b/qapi-schema.json index 5d51cf0834..93e376b90a 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1701,7 +1701,7 @@ # @enabled: true if the SPICE server is enabled, false otherwise # # @migrated: true if the last guest migration completed and spice -# migration had completed as well. false otherwise. +# migration had completed as well. false otherwise. (since 1.4) # # @host: #optional The hostname the SPICE server is bound to. This depends on # the name resolution on the host and may be an IP address. @@ -1719,9 +1719,7 @@ # # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can # be determined by the client or the server, or unknown if spice -# server doesn't provide this information. -# -# Since: 1.1 +# server doesn't provide this information. (since: 1.1) # # @channels: a list of @SpiceChannel for each active spice channel # @@ -1740,6 +1738,40 @@ # Returns: @SpiceInfo # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "query-spice" } +# <- { "return": { +# "enabled": true, +# "auth": "spice", +# "port": 5920, +# "tls-port": 5921, +# "host": "0.0.0.0", +# "channels": [ +# { +# "port": "54924", +# "family": "ipv4", +# "channel-type": 1, +# "connection-id": 1804289383, +# "host": "127.0.0.1", +# "channel-id": 0, +# "tls": true +# }, +# { +# "port": "36710", +# "family": "ipv4", +# "channel-type": 4, +# "connection-id": 1804289383, +# "host": "127.0.0.1", +# "channel-id": 0, +# "tls": false +# }, +# [ ... more channels follow ... ] +# ] +# } +# } +# ## { 'command': 'query-spice', 'returns': 'SpiceInfo' } -- cgit v1.2.3-55-g7522 From f504e3dc21bb76ef7766cc99390defb200faa893 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 11:40:02 +0200 Subject: qmp-commands: move 'query-balloon' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 19 ------------------- qapi-schema.json | 11 +++++++++++ 2 files changed, 11 insertions(+), 19 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index d018480a28..9445bd1349 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -2193,25 +2193,6 @@ Example: ] } -query-balloon -------------- - -Show balloon information. - -Make an asynchronous request for balloon info. When the request completes a -json-object will be returned containing the following data: - -- "actual": current balloon value in bytes (json-int) - -Example: - --> { "execute": "query-balloon" } -<- { - "return":{ - "actual":1073741824, - } - } - query-tpm --------- diff --git a/qapi-schema.json b/qapi-schema.json index 93e376b90a..f47d50c182 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1793,11 +1793,22 @@ # Return information about the balloon device. # # Returns: @BalloonInfo on success +# # If the balloon driver is enabled but not functional because the KVM # kernel module cannot support it, KvmMissingCap +# # If no balloon device is present, DeviceNotActive # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "query-balloon" } +# <- { "return": { +# "actual": 1073741824, +# } +# } +# ## { 'command': 'query-balloon', 'returns': 'BalloonInfo' } -- cgit v1.2.3-55-g7522 From 3fc3aa6de974dc7e302ec29ec89fdc3bfc2a2bcf Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 11:44:21 +0200 Subject: qmp-commands: move 'query-pci' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 208 -------------------------------------------------- qapi-schema.json | 139 ++++++++++++++++++++++++++++++++- 2 files changed, 138 insertions(+), 209 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 9445bd1349..ffc7cb997e 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1945,214 +1945,6 @@ Example: ] } -query-pci ---------- - -PCI buses and devices information. - -The returned value is a json-array of all buses. Each bus is represented by -a json-object, which has a key with a json-array of all PCI devices attached -to it. Each device is represented by a json-object. - -The bus json-object contains the following: - -- "bus": bus number (json-int) -- "devices": a json-array of json-objects, each json-object represents a - PCI device - -The PCI device json-object contains the following: - -- "bus": identical to the parent's bus number (json-int) -- "slot": slot number (json-int) -- "function": function number (json-int) -- "class_info": a json-object containing: - - "desc": device class description (json-string, optional) - - "class": device class number (json-int) -- "id": a json-object containing: - - "device": device ID (json-int) - - "vendor": vendor ID (json-int) -- "irq": device's IRQ if assigned (json-int, optional) -- "qdev_id": qdev id string (json-string) -- "pci_bridge": It's a json-object, only present if this device is a - PCI bridge, contains: - - "bus": bus number (json-int) - - "secondary": secondary bus number (json-int) - - "subordinate": subordinate bus number (json-int) - - "io_range": I/O memory range information, a json-object with the - following members: - - "base": base address, in bytes (json-int) - - "limit": limit address, in bytes (json-int) - - "memory_range": memory range information, a json-object with the - following members: - - "base": base address, in bytes (json-int) - - "limit": limit address, in bytes (json-int) - - "prefetchable_range": Prefetchable memory range information, a - json-object with the following members: - - "base": base address, in bytes (json-int) - - "limit": limit address, in bytes (json-int) - - "devices": a json-array of PCI devices if there's any attached, each - each element is represented by a json-object, which contains - the same members of the 'PCI device json-object' described - above (optional) -- "regions": a json-array of json-objects, each json-object represents a - memory region of this device - -The memory range json-object contains the following: - -- "base": base memory address (json-int) -- "limit": limit value (json-int) - -The region json-object can be an I/O region or a memory region, an I/O region -json-object contains the following: - -- "type": "io" (json-string, fixed) -- "bar": BAR number (json-int) -- "address": memory address (json-int) -- "size": memory size (json-int) - -A memory region json-object contains the following: - -- "type": "memory" (json-string, fixed) -- "bar": BAR number (json-int) -- "address": memory address (json-int) -- "size": memory size (json-int) -- "mem_type_64": true or false (json-bool) -- "prefetch": true or false (json-bool) - -Example: - --> { "execute": "query-pci" } -<- { - "return":[ - { - "bus":0, - "devices":[ - { - "bus":0, - "qdev_id":"", - "slot":0, - "class_info":{ - "class":1536, - "desc":"Host bridge" - }, - "id":{ - "device":32902, - "vendor":4663 - }, - "function":0, - "regions":[ - - ] - }, - { - "bus":0, - "qdev_id":"", - "slot":1, - "class_info":{ - "class":1537, - "desc":"ISA bridge" - }, - "id":{ - "device":32902, - "vendor":28672 - }, - "function":0, - "regions":[ - - ] - }, - { - "bus":0, - "qdev_id":"", - "slot":1, - "class_info":{ - "class":257, - "desc":"IDE controller" - }, - "id":{ - "device":32902, - "vendor":28688 - }, - "function":1, - "regions":[ - { - "bar":4, - "size":16, - "address":49152, - "type":"io" - } - ] - }, - { - "bus":0, - "qdev_id":"", - "slot":2, - "class_info":{ - "class":768, - "desc":"VGA controller" - }, - "id":{ - "device":4115, - "vendor":184 - }, - "function":0, - "regions":[ - { - "prefetch":true, - "mem_type_64":false, - "bar":0, - "size":33554432, - "address":4026531840, - "type":"memory" - }, - { - "prefetch":false, - "mem_type_64":false, - "bar":1, - "size":4096, - "address":4060086272, - "type":"memory" - }, - { - "prefetch":false, - "mem_type_64":false, - "bar":6, - "size":65536, - "address":-1, - "type":"memory" - } - ] - }, - { - "bus":0, - "qdev_id":"", - "irq":11, - "slot":4, - "class_info":{ - "class":1280, - "desc":"RAM controller" - }, - "id":{ - "device":6900, - "vendor":4098 - }, - "function":0, - "regions":[ - { - "bar":0, - "size":32, - "address":49280, - "type":"io" - } - ] - } - ] - } - ] - } - -Note: This example has been shortened as the real response is too long. - query-command-line-options -------------------------- diff --git a/qapi-schema.json b/qapi-schema.json index f47d50c182..61c696aa37 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1835,6 +1835,8 @@ # @type: 'io' if the region is a PIO region # 'memory' if the region is a MMIO region # +# @size: memory size +# # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable # # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit @@ -1968,9 +1970,144 @@ # # Return information about the PCI bus topology of the guest. # -# Returns: a list of @PciInfo for each PCI bus +# Returns: a list of @PciInfo for each PCI bus. Each bus is +# represented by a json-object, which has a key with a json-array of +# all PCI devices attached to it. Each device is represented by a +# json-object. # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "query-pci" } +# <- { "return": [ +# { +# "bus": 0, +# "devices": [ +# { +# "bus": 0, +# "qdev_id": "", +# "slot": 0, +# "class_info": { +# "class": 1536, +# "desc": "Host bridge" +# }, +# "id": { +# "device": 32902, +# "vendor": 4663 +# }, +# "function": 0, +# "regions": [ +# ] +# }, +# { +# "bus": 0, +# "qdev_id": "", +# "slot": 1, +# "class_info": { +# "class": 1537, +# "desc": "ISA bridge" +# }, +# "id": { +# "device": 32902, +# "vendor": 28672 +# }, +# "function": 0, +# "regions": [ +# ] +# }, +# { +# "bus": 0, +# "qdev_id": "", +# "slot": 1, +# "class_info": { +# "class": 257, +# "desc": "IDE controller" +# }, +# "id": { +# "device": 32902, +# "vendor": 28688 +# }, +# "function": 1, +# "regions": [ +# { +# "bar": 4, +# "size": 16, +# "address": 49152, +# "type": "io" +# } +# ] +# }, +# { +# "bus": 0, +# "qdev_id": "", +# "slot": 2, +# "class_info": { +# "class": 768, +# "desc": "VGA controller" +# }, +# "id": { +# "device": 4115, +# "vendor": 184 +# }, +# "function": 0, +# "regions": [ +# { +# "prefetch": true, +# "mem_type_64": false, +# "bar": 0, +# "size": 33554432, +# "address": 4026531840, +# "type": "memory" +# }, +# { +# "prefetch": false, +# "mem_type_64": false, +# "bar": 1, +# "size": 4096, +# "address": 4060086272, +# "type": "memory" +# }, +# { +# "prefetch": false, +# "mem_type_64": false, +# "bar": 6, +# "size": 65536, +# "address": -1, +# "type": "memory" +# } +# ] +# }, +# { +# "bus": 0, +# "qdev_id": "", +# "irq": 11, +# "slot": 4, +# "class_info": { +# "class": 1280, +# "desc": "RAM controller" +# }, +# "id": { +# "device": 6900, +# "vendor": 4098 +# }, +# "function": 0, +# "regions": [ +# { +# "bar": 0, +# "size": 32, +# "address": 49280, +# "type": "io" +# } +# ] +# } +# ] +# } +# ] +# } +# +# Note: This example has been shortened as the real response is too long. +# ## { 'command': 'query-pci', 'returns': ['PciInfo'] } -- cgit v1.2.3-55-g7522 From 8046bf53ba447a6b8932c046cc84845e9cecc804 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:01:27 +0200 Subject: qmp-commands: move 'quit' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 12 ------------ qapi-schema.json | 5 +++++ 2 files changed, 5 insertions(+), 12 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index ffc7cb997e..4df1d47475 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -53,18 +53,6 @@ If you're planning to adopt QMP, please observe the following: Server's responses in the examples below are always a success response, please refer to the QMP specification for more details on error responses. -quit ----- - -Quit the emulator. - -Arguments: None. - -Example: - --> { "execute": "quit" } -<- { "return": {} } - eject ----- diff --git a/qapi-schema.json b/qapi-schema.json index 61c696aa37..a622c4957f 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2120,6 +2120,11 @@ # unexpected. # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "quit" } +# <- { "return": {} } ## { 'command': 'quit' } -- cgit v1.2.3-55-g7522 From 9787339ebb6af5360c3b4759831ff4a54464b64d Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:02:39 +0200 Subject: qmp-commands: move 'stop' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 12 ------------ qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 4df1d47475..d0d324de73 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -113,18 +113,6 @@ Example: -> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } } <- { "return": {} } -stop ----- - -Stop the emulator. - -Arguments: None. - -Example: - --> { "execute": "stop" } -<- { "return": {} } - cont ---- diff --git a/qapi-schema.json b/qapi-schema.json index a622c4957f..9e3a192646 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2139,6 +2139,12 @@ # state. In "inmigrate" state, it will ensure that the guest # remains paused once migration finishes, as if the -S option was # passed on the command line. +# +# Example: +# +# -> { "execute": "stop" } +# <- { "return": {} } +# ## { 'command': 'stop' } -- cgit v1.2.3-55-g7522 From cd98e00be03c04faa82dd1149974a85dcb94aad8 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:03:06 +0200 Subject: qmp-commands: move 'system_reset' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 12 ------------ qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index d0d324de73..647cc3a9e5 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -137,18 +137,6 @@ Example: -> { "execute": "system_wakeup" } <- { "return": {} } -system_reset ------------- - -Reset the system. - -Arguments: None. - -Example: - --> { "execute": "system_reset" } -<- { "return": {} } - system_powerdown ---------------- diff --git a/qapi-schema.json b/qapi-schema.json index 9e3a192646..370f988742 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2154,6 +2154,12 @@ # Performs a hard reset of a guest. # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "system_reset" } +# <- { "return": {} } +# ## { 'command': 'system_reset' } -- cgit v1.2.3-55-g7522 From 04fcbabc45d793b0ec0b38b56e1fa4a9257892e6 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:03:30 +0200 Subject: qmp-commands: move 'system_powerdown' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 12 ------------ qapi-schema.json | 5 +++++ 2 files changed, 5 insertions(+), 12 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 647cc3a9e5..2de1a488d2 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -137,18 +137,6 @@ Example: -> { "execute": "system_wakeup" } <- { "return": {} } -system_powerdown ----------------- - -Send system power down event. - -Arguments: None. - -Example: - --> { "execute": "system_powerdown" } -<- { "return": {} } - device_add ---------- diff --git a/qapi-schema.json b/qapi-schema.json index 370f988742..2b72127d00 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2174,6 +2174,11 @@ # returning does not indicate that a guest has accepted the request or # that it has shut down. Many guests will respond to this command by # prompting the user in some way. +# Example: +# +# -> { "execute": "system_powerdown" } +# <- { "return": {} } +# ## { 'command': 'system_powerdown' } -- cgit v1.2.3-55-g7522 From a7b83754aaff4e9dd012730e3060bfd2de9eee86 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:04:10 +0200 Subject: qmp-commands: move 'cpu-add' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 14 -------------- qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 14 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 2de1a488d2..215239fd92 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -219,20 +219,6 @@ Example: Note: CPUs' indexes are obtained with the 'query-cpus' command. -cpu-add -------- - -Adds virtual cpu - -Arguments: - -- "id": cpu id (json-int) - -Example: - --> { "execute": "cpu-add", "arguments": { "id": 2 } } -<- { "return": {} } - memsave ------- diff --git a/qapi-schema.json b/qapi-schema.json index 2b72127d00..29ff705129 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2203,6 +2203,12 @@ # Returns: Nothing on success # # Since: 1.5 +# +# Example: +# +# -> { "execute": "cpu-add", "arguments": { "id": 2 } } +# <- { "return": {} } +# ## { 'command': 'cpu-add', 'data': {'id': 'int'} } -- cgit v1.2.3-55-g7522 From 30831b63dac44e2cac6779a7d2db34daa560b142 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:05:26 +0200 Subject: qmp-commands: move 'memsave' doc to schema Notice that "cpu" argument is actually "cpu-index" in the json. Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 20 -------------------- qapi-schema.json | 9 +++++++++ 2 files changed, 9 insertions(+), 20 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 215239fd92..df988abb5d 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -219,26 +219,6 @@ Example: Note: CPUs' indexes are obtained with the 'query-cpus' command. -memsave -------- - -Save to disk virtual memory dump starting at 'val' of size 'size'. - -Arguments: - -- "val": the starting address (json-int) -- "size": the memory size, in bytes (json-int) -- "filename": file path (json-string) -- "cpu": virtual CPU index (json-int, optional) - -Example: - --> { "execute": "memsave", - "arguments": { "val": 10, - "size": 100, - "filename": "/tmp/virtual-mem-dump" } } -<- { "return": {} } - pmemsave -------- diff --git a/qapi-schema.json b/qapi-schema.json index 29ff705129..64acc1c228 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2231,6 +2231,15 @@ # Since: 0.14.0 # # Notes: Errors were not reliably returned until 1.1 +# +# Example: +# +# -> { "execute": "memsave", +# "arguments": { "val": 10, +# "size": 100, +# "filename": "/tmp/virtual-mem-dump" } } +# <- { "return": {} } +# ## { 'command': 'memsave', 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} } -- cgit v1.2.3-55-g7522 From 978d4d97dac8ab98e28011fd696e2594a999af26 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:06:17 +0200 Subject: qmp-commands: move 'pmemsave' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 19 ------------------- qapi-schema.json | 9 +++++++++ 2 files changed, 9 insertions(+), 19 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index df988abb5d..bc7cec1447 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -219,25 +219,6 @@ Example: Note: CPUs' indexes are obtained with the 'query-cpus' command. -pmemsave --------- - -Save to disk physical memory dump starting at 'val' of size 'size'. - -Arguments: - -- "val": the starting address (json-int) -- "size": the memory size, in bytes (json-int) -- "filename": file path (json-string) - -Example: - --> { "execute": "pmemsave", - "arguments": { "val": 10, - "size": 100, - "filename": "/tmp/physical-mem-dump" } } -<- { "return": {} } - inject-nmi ---------- diff --git a/qapi-schema.json b/qapi-schema.json index 64acc1c228..0bdd193f71 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2260,6 +2260,15 @@ # Since: 0.14.0 # # Notes: Errors were not reliably returned until 1.1 +# +# Example: +# +# -> { "execute": "pmemsave", +# "arguments": { "val": 10, +# "size": 100, +# "filename": "/tmp/physical-mem-dump" } } +# <- { "return": {} } +# ## { 'command': 'pmemsave', 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} } -- cgit v1.2.3-55-g7522 From 3815d0de51124db3da50abaebbb4ec5f1d531f53 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:07:08 +0200 Subject: qmp-commands: move 'cont' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 12 ------------ qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index bc7cec1447..083273d7dc 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -113,18 +113,6 @@ Example: -> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } } <- { "return": {} } -cont ----- - -Resume emulation. - -Arguments: None. - -Example: - --> { "execute": "cont" } -<- { "return": {} } - system_wakeup ------------- diff --git a/qapi-schema.json b/qapi-schema.json index 0bdd193f71..babac12e16 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2289,6 +2289,12 @@ # this case, the effect of the command is to make sure the guest # starts once migration finishes, removing the effect of the -S # command line option if it was passed. +# +# Example: +# +# -> { "execute": "cont" } +# <- { "return": {} } +# ## { 'command': 'cont' } -- cgit v1.2.3-55-g7522 From 253cdee14864806d1aaa397ece3fddbcbdcc1734 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:07:39 +0200 Subject: qmp-commands: move 'system_wakeup' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 12 ------------ qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 083273d7dc..2361e84c8f 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -113,18 +113,6 @@ Example: -> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } } <- { "return": {} } -system_wakeup -------------- - -Wakeup guest from suspend. - -Arguments: None. - -Example: - --> { "execute": "system_wakeup" } -<- { "return": {} } - device_add ---------- diff --git a/qapi-schema.json b/qapi-schema.json index babac12e16..5a2716ceb3 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2306,6 +2306,12 @@ # Since: 1.1 # # Returns: nothing. +# +# Example: +# +# -> { "execute": "system_wakeup" } +# <- { "return": {} } +# ## { 'command': 'system_wakeup' } -- cgit v1.2.3-55-g7522 From 149ea099cdee4857f9af7125682f7dadf23c8ac8 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:08:44 +0200 Subject: qmp-commands: move 'inject-nmi' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 14 -------------- qapi-schema.json | 7 +++++++ 2 files changed, 7 insertions(+), 14 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 2361e84c8f..ba4fd1ccda 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -195,20 +195,6 @@ Example: Note: CPUs' indexes are obtained with the 'query-cpus' command. -inject-nmi ----------- - -Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64). - -Arguments: None. - -Example: - --> { "execute": "inject-nmi" } -<- { "return": {} } - -Note: inject-nmi fails when the guest doesn't support injecting. - xen-save-devices-state ------- diff --git a/qapi-schema.json b/qapi-schema.json index 5a2716ceb3..1675a9bf16 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2319,12 +2319,19 @@ # @inject-nmi: # # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64). +# The command fails when the guest doesn't support injecting. # # Returns: If successful, nothing # # Since: 0.14.0 # # Note: prior to 2.1, this command was only supported for x86 and s390 VMs +# +# Example: +# +# -> { "execute": "inject-nmi" } +# <- { "return": {} } +# ## { 'command': 'inject-nmi' } -- cgit v1.2.3-55-g7522 From f9cfb8f729dc11e387daa575ae193c0ad56c8a92 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:09:45 +0200 Subject: qmp-commands: move 'set_link' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 15 --------------- qapi-schema.json | 7 +++++++ 2 files changed, 7 insertions(+), 15 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index ba4fd1ccda..6038f5cc73 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1088,21 +1088,6 @@ Example: -> { "execute": "balloon", "arguments": { "value": 536870912 } } <- { "return": {} } -set_link --------- - -Change the link status of a network adapter. - -Arguments: - -- "name": network device name (json-string) -- "up": status is up (json-bool) - -Example: - --> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } } -<- { "return": {} } - getfd ----- diff --git a/qapi-schema.json b/qapi-schema.json index 1675a9bf16..43b485e145 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2352,6 +2352,13 @@ # Notes: Not all network adapters support setting link status. This command # will succeed even if the network adapter does not support link status # notification. +# +# Example: +# +# -> { "execute": "set_link", +# "arguments": { "name": "e1000.0", "up": false } } +# <- { "return": {} } +# ## { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} } -- cgit v1.2.3-55-g7522 From 7b338db7ef58619db0a43d464d3cfe07e6ea0e3b Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:10:30 +0200 Subject: qmp-commands: move 'balloon' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 14 -------------- qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 14 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 6038f5cc73..a6d3946eeb 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1074,20 +1074,6 @@ Arguments: Returns: Nothing on success If "device" does not exist or cannot be determined, DeviceNotFound -balloon -------- - -Request VM to change its memory allocation (in bytes). - -Arguments: - -- "value": New memory allocation (json-int) - -Example: - --> { "execute": "balloon", "arguments": { "value": 536870912 } } -<- { "return": {} } - getfd ----- diff --git a/qapi-schema.json b/qapi-schema.json index 43b485e145..3a81d6accb 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2379,6 +2379,12 @@ # size independent of this command. # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "balloon", "arguments": { "value": 536870912 } } +# <- { "return": {} } +# ## { 'command': 'balloon', 'data': {'value': 'int'} } -- cgit v1.2.3-55-g7522 From 5c82b0f1982932b494ccb1c35a96b7db1db444f9 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:13:09 +0200 Subject: qmp-commands: move 'transaction' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 86 --------------------------------------------------- qapi-schema.json | 45 +++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 86 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index a6d3946eeb..eee7f253d7 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -699,92 +699,6 @@ Example: "target": "tgt-id" } } <- { "return": {} } -transaction ------------ - -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 -qcow2. - -Each new snapshot defaults to being created by QEMU (wiping any -contents if the file already exists), but it is also possible to reuse -an externally-created file. In the latter case, you should ensure that -the new image file has the same contents as the current one; QEMU cannot -perform any meaningful check. Typically this is achieved by using the -current image file as the backing file for the new image. - -On failure, the original disks pre-snapshot attempt will be used. - -For internal snapshots, the dictionary contains the device and the snapshot's -name. If an internal snapshot matching name already exists, the request will -be rejected. Only some image formats support it, for example, qcow2, rbd, -and sheepdog. - -On failure, qemu will try delete the newly created internal snapshot in the -transaction. When an I/O error occurs during deletion, the user needs to fix -it later with qemu-img or other command. - -Arguments: - -actions array: - - "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) - - "node-name": graph node name to snapshot (json-string) - - "snapshot-file": name of new image file (json-string) - - "snapshot-node-name": graph node name of the new snapshot (json-string) - - "format": format of new image (json-string, optional) - - "mode": whether and how QEMU should create the snapshot file - (NewImageMode, optional, default "absolute-paths") - When "type" is "blockdev-snapshot-internal-sync": - - "device": the device name or node-name of a root node to snapshot - (json-string) - - "name": name of the new snapshot (json-string) - -Example: - --> { "execute": "transaction", - "arguments": { "actions": [ - { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0", - "snapshot-file": "/some/place/my-image", - "format": "qcow2" } }, - { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile", - "snapshot-file": "/some/place/my-image2", - "snapshot-node-name": "node3432", - "mode": "existing", - "format": "qcow2" } }, - { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1", - "snapshot-file": "/some/place/my-image2", - "mode": "existing", - "format": "qcow2" } }, - { "type": "blockdev-snapshot-internal-sync", "data" : { - "device": "ide-hd2", - "name": "snapshot0" } } ] } } -<- { "return": {} } - block-dirty-bitmap-add ---------------------- Since 2.4 diff --git a/qapi-schema.json b/qapi-schema.json index 3a81d6accb..330ccfad4d 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2471,6 +2471,28 @@ # operation fails, then the entire set of actions will be abandoned and the # appropriate error returned. # +# 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 +# qcow2. +# +# Each new snapshot defaults to being created by QEMU (wiping any +# contents if the file already exists), but it is also possible to reuse +# an externally-created file. In the latter case, you should ensure that +# the new image file has the same contents as the current one; QEMU cannot +# perform any meaningful check. Typically this is achieved by using the +# current image file as the backing file for the new image. +# +# On failure, the original disks pre-snapshot attempt will be used. +# +# For internal snapshots, the dictionary contains the device and the snapshot's +# name. If an internal snapshot matching name already exists, the request will +# be rejected. Only some image formats support it, for example, qcow2, rbd, +# and sheepdog. +# +# On failure, qemu will try delete the newly created internal snapshot in the +# transaction. When an I/O error occurs during deletion, the user needs to fix +# it later with qemu-img or other command. +# # @actions: List of @TransactionAction; # information needed for the respective operations. # @@ -2479,6 +2501,7 @@ # for additional detail. # # Returns: nothing on success +# # Errors depend on the operations of the transaction # # Note: The transaction aborts on the first failure. Therefore, there will be @@ -2486,6 +2509,28 @@ # subsequent actions will not have been attempted. # # Since: 1.1 +# +# Example: +# +# -> { "execute": "transaction", +# "arguments": { "actions": [ +# { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0", +# "snapshot-file": "/some/place/my-image", +# "format": "qcow2" } }, +# { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile", +# "snapshot-file": "/some/place/my-image2", +# "snapshot-node-name": "node3432", +# "mode": "existing", +# "format": "qcow2" } }, +# { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1", +# "snapshot-file": "/some/place/my-image2", +# "mode": "existing", +# "format": "qcow2" } }, +# { "type": "blockdev-snapshot-internal-sync", "data" : { +# "device": "ide-hd2", +# "name": "snapshot0" } } ] } } +# <- { "return": {} } +# ## { 'command': 'transaction', 'data': { 'actions': [ 'TransactionAction' ], -- cgit v1.2.3-55-g7522 From e9ac76acd7aed4d96d05a6abf1460dd63afec20f Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:15:03 +0200 Subject: qmp-commands: move 'human-monitor-command' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 33 --------------------------------- qapi-schema.json | 13 ++++++++++++- 2 files changed, 12 insertions(+), 34 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index eee7f253d7..3faba0cbc4 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1228,39 +1228,6 @@ Example: Note: This command must be issued before issuing any other command. -human-monitor-command ---------------------- - -Execute a Human Monitor command. - -Arguments: - -- command-line: the command name and its arguments, just like the - Human Monitor's shell (json-string) -- cpu-index: select the CPU number to be used by commands which access CPU - data, like 'info registers'. The Monitor selects CPU 0 if this - argument is not provided (json-int, optional) - -Example: - --> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } } -<- { "return": "kvm support: enabled\r\n" } - -Notes: - -(1) The Human Monitor is NOT an stable interface, this means that command - names, arguments and responses can change or be removed at ANY time. - Applications that rely on long term stability guarantees should NOT - use this command - -(2) Limitations: - - o This command is stateless, this means that commands that depend - on state information (such as getfd) might not work - - o Commands that prompt the user for data (eg. 'cont' when the block - device is encrypted) don't currently work - 3. Query Commands ================= diff --git a/qapi-schema.json b/qapi-schema.json index 330ccfad4d..f3d2c4260e 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2552,7 +2552,11 @@ # Since: 0.14.0 # # Notes: This command only exists as a stop-gap. Its use is highly -# discouraged. The semantics of this command are not guaranteed. +# discouraged. The semantics of this command are not +# guaranteed: this means that command names, arguments and +# responses can change or be removed at ANY time. Applications +# that rely on long term stability guarantees should NOT +# use this command. # # Known limitations: # @@ -2561,6 +2565,13 @@ # # * Commands that prompt the user for data (eg. 'cont' when the block # device is encrypted) don't currently work +# +# Example: +# +# -> { "execute": "human-monitor-command", +# "arguments": { "command-line": "info kvm" } } +# <- { "return": "kvm support: enabled\r\n" } +# ## { 'command': 'human-monitor-command', 'data': {'command-line': 'str', '*cpu-index': 'int'}, -- cgit v1.2.3-55-g7522 From 92dcfb434ce2c4b0f27a1a243d1e770a8e666d00 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:16:09 +0200 Subject: qmp-commands: move 'migrate_cancel' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 12 ------------ qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 3faba0cbc4..a2f2a1b28b 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -270,18 +270,6 @@ Notes: (3) The user Monitor's "detach" argument is invalid in QMP and should not be used -migrate_cancel --------------- - -Cancel the current migration. - -Arguments: None. - -Example: - --> { "execute": "migrate_cancel" } -<- { "return": {} } - migrate-incoming ---------------- diff --git a/qapi-schema.json b/qapi-schema.json index f3d2c4260e..c732ec9bcc 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2587,6 +2587,12 @@ # Notes: This command succeeds even if there is no migration process running. # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "migrate_cancel" } +# <- { "return": {} } +# ## { 'command': 'migrate_cancel' } -- cgit v1.2.3-55-g7522 From de0b45ea6bd463c3a51de9425ce0a49df2e14484 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:16:59 +0200 Subject: qmp-commands: move 'migrate_set_downtime' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 14 -------------- qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 14 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index a2f2a1b28b..ed4389f2e8 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -332,20 +332,6 @@ Example: -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } } <- { "return": {} } -migrate_set_downtime --------------------- - -Set maximum tolerated downtime (in seconds) for migrations. - -Arguments: - -- "value": maximum downtime (json-number) - -Example: - --> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } } -<- { "return": {} } - x-colo-lost-heartbeat -------------------- diff --git a/qapi-schema.json b/qapi-schema.json index c732ec9bcc..8f844aa735 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2608,6 +2608,12 @@ # Notes: This command is deprecated in favor of 'migrate-set-parameters' # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } } +# <- { "return": {} } +# ## { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} } -- cgit v1.2.3-55-g7522 From ab9895337c4613ddee1b56f4a1ce3025155483c7 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:18:01 +0200 Subject: qmp-commands: move 'migrate_set_speed' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 14 -------------- qapi-schema.json | 8 +++++++- 2 files changed, 7 insertions(+), 15 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index ed4389f2e8..889955eb30 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -318,20 +318,6 @@ Example: -> { "execute": "query-migrate-cache-size" } <- { "return": 67108864 } -migrate_set_speed ------------------ - -Set maximum speed for migrations. - -Arguments: - -- "value": maximum speed, in bytes per second (json-int) - -Example: - --> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } } -<- { "return": {} } - x-colo-lost-heartbeat -------------------- diff --git a/qapi-schema.json b/qapi-schema.json index 8f844aa735..092008a4ff 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2622,13 +2622,19 @@ # # Set maximum speed for migration. # -# @value: maximum speed in bytes. +# @value: maximum speed in bytes per second. # # Returns: nothing on success # # Notes: This command is deprecated in favor of 'migrate-set-parameters' # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } } +# <- { "return": {} } +# ## { 'command': 'migrate_set_speed', 'data': {'value': 'int'} } -- cgit v1.2.3-55-g7522 From b953601be00e020bd960d7bd4f1276b743cd35fd Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:19:25 +0200 Subject: qmp-commands: move 'query-migrate-cache-size' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 13 ------------- qapi-schema.json | 8 +++++++- 2 files changed, 7 insertions(+), 14 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 889955eb30..88bb012320 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -305,19 +305,6 @@ Example: -> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } } <- { "return": {} } -query-migrate-cache-size ------------------------- - -Show cache size to be used by XBZRLE migration - -returns a json-object with the following information: -- "size" : json-int - -Example: - --> { "execute": "query-migrate-cache-size" } -<- { "return": 67108864 } - x-colo-lost-heartbeat -------------------- diff --git a/qapi-schema.json b/qapi-schema.json index 092008a4ff..104f910269 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2657,11 +2657,17 @@ ## # @query-migrate-cache-size: # -# query XBZRLE cache size +# Query migration XBZRLE cache size # # Returns: XBZRLE cache size in bytes # # Since: 1.2 +# +# Example: +# +# -> { "execute": "query-migrate-cache-size" } +# <- { "return": 67108864 } +# ## { 'command': 'query-migrate-cache-size', 'returns': 'int' } -- cgit v1.2.3-55-g7522 From 4d8a374e3e62ab581be74a66915fd38b1c98816f Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:20:39 +0200 Subject: qmp-commands: move 'set_password' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 17 ----------------- qapi-schema.json | 7 +++++++ 2 files changed, 7 insertions(+), 17 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 88bb012320..1faa47ff58 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1128,23 +1128,6 @@ Example: "iops_size": 0 } } <- { "return": {} } -set_password ------------- - -Set the password for vnc/spice protocols. - -Arguments: - -- "protocol": protocol name (json-string) -- "password": password (json-string) -- "connected": [ keep | disconnect | fail ] (json-string, optional) - -Example: - --> { "execute": "set_password", "arguments": { "protocol": "vnc", - "password": "secret" } } -<- { "return": {} } - expire_password --------------- diff --git a/qapi-schema.json b/qapi-schema.json index 104f910269..52d76ac1b2 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2784,6 +2784,13 @@ # If Spice is not enabled, DeviceNotFound # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "set_password", "arguments": { "protocol": "vnc", +# "password": "secret" } } +# <- { "return": {} } +# ## { 'command': 'set_password', 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} } -- cgit v1.2.3-55-g7522 From 342816b975ec263b7663f7d2e025ed5b7fc1dc13 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:21:41 +0200 Subject: qmp-commands: move 'expire_password' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 16 ---------------- qapi-schema.json | 7 +++++++ 2 files changed, 7 insertions(+), 16 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 1faa47ff58..65cab07768 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1128,22 +1128,6 @@ Example: "iops_size": 0 } } <- { "return": {} } -expire_password ---------------- - -Set the password expire time for vnc/spice protocols. - -Arguments: - -- "protocol": protocol name (json-string) -- "time": [ now | never | +secs | secs ] (json-string) - -Example: - --> { "execute": "expire_password", "arguments": { "protocol": "vnc", - "time": "+60" } } -<- { "return": {} } - qmp_capabilities ---------------- diff --git a/qapi-schema.json b/qapi-schema.json index 52d76ac1b2..398e5d3eda 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2817,6 +2817,13 @@ # coordinate server time with client time. It is not recommended to # use the absolute time version of the @time parameter unless you're # sure you are on the same machine as the QEMU instance. +# +# Example: +# +# -> { "execute": "expire_password", "arguments": { "protocol": "vnc", +# "time": "+60" } } +# <- { "return": {} } +# ## { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} } -- cgit v1.2.3-55-g7522 From 01387ae5604d9ef26f25134b3bf266c341b9e973 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:22:37 +0200 Subject: qmp-commands: move 'change' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 27 --------------------------- qapi-schema.json | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 27 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 65cab07768..f4645f532f 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -72,33 +72,6 @@ Example: Note: The "force" argument defaults to false. -change ------- - -Change a removable medium or VNC configuration. - -Arguments: - -- "device": device name (json-string) -- "target": filename or item (json-string) -- "arg": additional argument (json-string, optional) - -Examples: - -1. Change a removable medium - --> { "execute": "change", - "arguments": { "device": "ide1-cd0", - "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } } -<- { "return": {} } - -2. Change VNC password - --> { "execute": "change", - "arguments": { "device": "vnc", "target": "password", - "arg": "foobar1" } } -<- { "return": {} } - screendump ---------- diff --git a/qapi-schema.json b/qapi-schema.json index 398e5d3eda..e7c14b994d 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2874,6 +2874,23 @@ # change-vnc-password. # # Since: 0.14.0 +# +# Example: +# +# 1. Change a removable medium +# +# -> { "execute": "change", +# "arguments": { "device": "ide1-cd0", +# "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } } +# <- { "return": {} } +# +# 2. Change VNC password +# +# -> { "execute": "change", +# "arguments": { "device": "vnc", "target": "password", +# "arg": "foobar1" } } +# <- { "return": {} } +# ## { 'command': 'change', 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} } -- cgit v1.2.3-55-g7522 From b3ac5a0de9b88454e42d0ee2755cc1083ccc25bb Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:23:44 +0200 Subject: qmp-commands: move 'migrate' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 24 ------------------------ qapi-schema.json | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 24 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index f4645f532f..7194ab1e2b 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -219,30 +219,6 @@ Example: "arguments": { "enable": true } } <- { "return": {} } -migrate -------- - -Migrate to URI. - -Arguments: - -- "blk": block migration, full disk copy (json-bool, optional) -- "inc": incremental disk copy (json-bool, optional) -- "uri": Destination URI (json-string) - -Example: - --> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } } -<- { "return": {} } - -Notes: - -(1) The 'query-migrate' command should be used to check migration's progress - and final result (this information is provided by the 'status' member) -(2) All boolean arguments default to false -(3) The user Monitor's "detach" argument is invalid in QMP and should not - be used - migrate-incoming ---------------- diff --git a/qapi-schema.json b/qapi-schema.json index e7c14b994d..ef27197460 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2973,6 +2973,22 @@ # Returns: nothing on success # # Since: 0.14.0 +# +# Notes: +# +# 1. The 'query-migrate' command should be used to check migration's progress +# and final result (this information is provided by the 'status' member) +# +# 2. All boolean arguments default to false +# +# 3. The user Monitor's "detach" argument is invalid in QMP and should not +# be used +# +# Example: +# +# -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } } +# <- { "return": {} } +# ## { 'command': 'migrate', 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } } -- cgit v1.2.3-55-g7522 From dbdbddb96e55da26a503cfa107689b77f7d65dd9 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:24:40 +0200 Subject: qmp-commands: move 'migrate-incoming' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 20 -------------------- qapi-schema.json | 21 ++++++++++++++++++--- 2 files changed, 18 insertions(+), 23 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 7194ab1e2b..116d2f723c 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -219,26 +219,6 @@ Example: "arguments": { "enable": true } } <- { "return": {} } -migrate-incoming ----------------- - -Continue an incoming migration - -Arguments: - -- "uri": Source/listening URI (json-string) - -Example: - --> { "execute": "migrate-incoming", "arguments": { "uri": "tcp::4446" } } -<- { "return": {} } - -Notes: - -(1) QEMU must be started with -incoming defer to allow migrate-incoming to - be used -(2) The uri format is the same as for -incoming - migrate-set-cache-size ---------------------- diff --git a/qapi-schema.json b/qapi-schema.json index ef27197460..f021cd0dfc 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3005,9 +3005,24 @@ # Returns: nothing on success # # Since: 2.3 -# Note: It's a bad idea to use a string for the uri, but it needs to stay -# compatible with -incoming and the format of the uri is already exposed -# above libvirt +# +# Notes: +# +# 1. It's a bad idea to use a string for the uri, but it needs to stay +# compatible with -incoming and the format of the uri is already exposed +# above libvirt. +# +# 2. QEMU must be started with -incoming defer to allow migrate-incoming to +# be used. +# +# 3. The uri format is the same as for -incoming +# +# Example: +# +# -> { "execute": "migrate-incoming", +# "arguments": { "uri": "tcp::4446" } } +# <- { "return": {} } +# ## { 'command': 'migrate-incoming', 'data': {'uri': 'str' } } -- cgit v1.2.3-55-g7522 From 2ea72beb9f9f561c66b9bacfee61d0fb96d4f15b Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:25:28 +0200 Subject: qmp-commands: move 'xen-save-devices-state' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 18 ------------------ qapi-schema.json | 7 +++++++ 2 files changed, 7 insertions(+), 18 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 116d2f723c..73fef658f8 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -168,24 +168,6 @@ Example: Note: CPUs' indexes are obtained with the 'query-cpus' command. -xen-save-devices-state -------- - -Save the state of all devices to file. The RAM and the block devices -of the VM are not saved by this command. - -Arguments: - -- "filename": the file to save the state of the devices to as binary -data. See xen-save-devices-state.txt for a description of the binary -format. - -Example: - --> { "execute": "xen-save-devices-state", - "arguments": { "filename": "/tmp/save" } } -<- { "return": {} } - xen-load-devices-state ---------------------- diff --git a/qapi-schema.json b/qapi-schema.json index f021cd0dfc..be653e8b54 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3039,6 +3039,13 @@ # Returns: Nothing on success # # Since: 1.1 +# +# Example: +# +# -> { "execute": "xen-save-devices-state", +# "arguments": { "filename": "/tmp/save" } } +# <- { "return": {} } +# ## { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} } -- cgit v1.2.3-55-g7522 From a4df6eff46e366e8c6ac69d93ea59f95ebd802fc Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:26:12 +0200 Subject: qmp-commands: move 'xen-set-global-dirty-log' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 15 --------------- qapi-schema.json | 7 +++++++ 2 files changed, 7 insertions(+), 15 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 73fef658f8..d7104e8721 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -186,21 +186,6 @@ Example: "arguments": { "filename": "/tmp/resume" } } <- { "return": {} } -xen-set-global-dirty-log -------- - -Enable or disable the global dirty log mode. - -Arguments: - -- "enable": Enable it or disable it. - -Example: - --> { "execute": "xen-set-global-dirty-log", - "arguments": { "enable": true } } -<- { "return": {} } - migrate-set-cache-size ---------------------- diff --git a/qapi-schema.json b/qapi-schema.json index be653e8b54..1c4039a085 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3059,6 +3059,13 @@ # Returns: nothing # # Since: 1.3 +# +# Example: +# +# -> { "execute": "xen-set-global-dirty-log", +# "arguments": { "enable": true } } +# <- { "return": {} } +# ## { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } } -- cgit v1.2.3-55-g7522 From e389c0049afae90de2b958afa439dd9f47b12c1d Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:27:06 +0200 Subject: qmp-commands: move 'device_del' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 19 ------------------- qapi-schema.json | 13 ++++++++++++- 2 files changed, 12 insertions(+), 20 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index d7104e8721..8adc1060dc 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -111,25 +111,6 @@ Notes: (2) It's possible to list device properties by running QEMU with the "-device DEVICE,\?" command-line argument, where DEVICE is the device's name -device_del ----------- - -Remove a device. - -Arguments: - -- "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": {} } - send-key ---------- diff --git a/qapi-schema.json b/qapi-schema.json index 1c4039a085..affcad129a 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3114,7 +3114,7 @@ # # Remove a device from a guest # -# @id: the name or QOM path of the device +# @id: the device's ID or QOM path # # Returns: Nothing on success # If @id is not a valid device, DeviceNotFound @@ -3127,6 +3127,17 @@ # for all devices. # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "device_del", +# "arguments": { "id": "net1" } } +# <- { "return": {} } +# +# -> { "execute": "device_del", +# "arguments": { "id": "/machine/peripheral-anon/device[0]" } } +# <- { "return": {} } +# ## { 'command': 'device_del', 'data': {'id': 'str'} } -- cgit v1.2.3-55-g7522 From 58e4300a7f5864950a3486ce81b144472161b870 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:29:50 +0200 Subject: qmp-commands: move 'dump-guest-memory' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 30 ------------------------------ qapi-schema.json | 9 +++++++++ 2 files changed, 9 insertions(+), 30 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 8adc1060dc..162467e924 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -192,36 +192,6 @@ Example: -> { "execute": "x-colo-lost-heartbeat" } <- { "return": {} } -dump - - -Dump guest memory to file. The file can be processed with crash or gdb. - -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 - with begin together (json-int) -- "format": the format of guest memory dump. It's optional, and can be - elf|kdump-zlib|kdump-lzo|kdump-snappy, but non-elf formats will - conflict with paging and filter, ie. begin and length (json-string) - -Example: - --> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } } -<- { "return": {} } - -Notes: - -(1) All boolean arguments default to false - query-dump-guest-memory-capability ---------- diff --git a/qapi-schema.json b/qapi-schema.json index affcad129a..0d80fa2028 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3204,9 +3204,18 @@ # @length is not allowed to be specified with non-elf @format at the # same time (since 2.0) # +# Note: All boolean arguments default to false +# # Returns: nothing on success # # Since: 1.2 +# +# Example: +# +# -> { "execute": "dump-guest-memory", +# "arguments": { "protocol": "fd:dump" } } +# <- { "return": {} } +# ## { 'command': 'dump-guest-memory', 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool', -- cgit v1.2.3-55-g7522 From 2ccb98033353512a1cdf171fdc88047d5977c97d Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:31:04 +0200 Subject: qmp-commands: move 'query-dump-guest-memory-capability' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 11 ----------- qapi-schema.json | 7 +++++++ 2 files changed, 7 insertions(+), 11 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 162467e924..e4c8457801 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -192,17 +192,6 @@ Example: -> { "execute": "x-colo-lost-heartbeat" } <- { "return": {} } -query-dump-guest-memory-capability ----------- - -Show available formats for 'dump-guest-memory' - -Example: - --> { "execute": "query-dump-guest-memory-capability" } -<- { "return": { "formats": - ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] } - query-dump ---------- diff --git a/qapi-schema.json b/qapi-schema.json index 0d80fa2028..d0f6a32ad1 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3289,6 +3289,13 @@ # dump-guest-memory # # Since: 2.0 +# +# Example: +# +# -> { "execute": "query-dump-guest-memory-capability" } +# <- { "return": { "formats": +# ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] } +# ## { 'command': 'query-dump-guest-memory-capability', 'returns': 'DumpGuestMemoryCapability' } -- cgit v1.2.3-55-g7522 From ee332b5125e416600d0b47689d8050f479b38479 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:31:48 +0200 Subject: qmp-commands: move 'dump-skeys' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 14 -------------- qapi-schema.json | 7 +++++++ 2 files changed, 7 insertions(+), 14 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index e4c8457801..b19c36dba5 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -205,20 +205,6 @@ Example: <- { "return": { "status": "active", "completed": 1024000, "total": 2048000 } } -dump-skeys ----------- - -Save guest storage keys to file. - -Arguments: - -- "filename": file path (json-string) - -Example: - --> { "execute": "dump-skeys", "arguments": { "filename": "/tmp/skeys" } } -<- { "return": {} } - netdev_add ---------- diff --git a/qapi-schema.json b/qapi-schema.json index d0f6a32ad1..c28817169b 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3310,6 +3310,13 @@ # This command is only supported on s390 architecture. # # Since: 2.5 +# +# Example: +# +# -> { "execute": "dump-skeys", +# "arguments": { "filename": "/tmp/skeys" } } +# <- { "return": {} } +# ## { 'command': 'dump-skeys', 'data': { 'filename': 'str' } } -- cgit v1.2.3-55-g7522 From aa72941bccda04854f888ba50c4970a86db74b33 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:33:15 +0200 Subject: qmp-commands: move 'netdev_add' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 22 ---------------------- qapi-schema.json | 8 ++++++++ 2 files changed, 8 insertions(+), 22 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index b19c36dba5..9d1a92abbf 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -205,28 +205,6 @@ Example: <- { "return": { "status": "active", "completed": 1024000, "total": 2048000 } } -netdev_add ----------- - -Add host network device. - -Arguments: - -- "type": the device type, "tap", "user", ... (json-string) -- "id": the device's ID, must be unique (json-string) -- device options - -Example: - --> { "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' - command-line argument, which are listed in the '-help' output or QEMU's - manual - netdev_del ---------- diff --git a/qapi-schema.json b/qapi-schema.json index c28817169b..95ed7d595c 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3342,6 +3342,14 @@ # # Returns: Nothing on success # If @type is not a valid network backend, DeviceNotFound +# +# Example: +# +# -> { "execute": "netdev_add", +# "arguments": { "type": "user", "id": "netdev1", +# "dnssearch": "example.org" } } +# <- { "return": {} } +# ## { 'command': 'netdev_add', 'data': {'type': 'str', 'id': 'str'}, -- cgit v1.2.3-55-g7522 From d071f6be51932ac30d0d585f74e38f9c8f6be769 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:33:57 +0200 Subject: qmp-commands: move 'netdev_del' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 15 --------------- qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 15 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 9d1a92abbf..9e26cfe970 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -205,21 +205,6 @@ Example: <- { "return": { "status": "active", "completed": 1024000, "total": 2048000 } } -netdev_del ----------- - -Remove host network device. - -Arguments: - -- "id": the device's ID, must be unique (json-string) - -Example: - --> { "execute": "netdev_del", "arguments": { "id": "netdev1" } } -<- { "return": {} } - - object-add ---------- diff --git a/qapi-schema.json b/qapi-schema.json index 95ed7d595c..4cb639f3fc 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3366,6 +3366,12 @@ # If @id is not a valid network backend, DeviceNotFound # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } } +# <- { "return": {} } +# ## { 'command': 'netdev_del', 'data': {'id': 'str'} } -- cgit v1.2.3-55-g7522 From 6517192b160363f9f24c7f05a0f7f88c5a1be114 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:34:37 +0200 Subject: qmp-commands: move 'object-add' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 17 ----------------- qapi-schema.json | 8 ++++++++ 2 files changed, 8 insertions(+), 17 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 9e26cfe970..397b3d6397 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -205,23 +205,6 @@ Example: <- { "return": { "status": "active", "completed": 1024000, "total": 2048000 } } -object-add ----------- - -Create QOM object. - -Arguments: - -- "qom-type": the object's QOM type, i.e. the class name (json-string) -- "id": the object's ID, must be unique (json-string) -- "props": a dictionary of object property values (optional, json-dict) - -Example: - --> { "execute": "object-add", "arguments": { "qom-type": "rng-random", "id": "rng1", - "props": { "filename": "/dev/hwrng" } } } -<- { "return": {} } - object-del ---------- diff --git a/qapi-schema.json b/qapi-schema.json index 4cb639f3fc..2982e3168b 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3390,6 +3390,14 @@ # Error if @qom-type is not a valid class name # # Since: 2.0 +# +# Example: +# +# -> { "execute": "object-add", +# "arguments": { "qom-type": "rng-random", "id": "rng1", +# "props": { "filename": "/dev/hwrng" } } } +# <- { "return": {} } +# ## { 'command': 'object-add', 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} } -- cgit v1.2.3-55-g7522 From de0ba66226ebdf1747759c53ac9ab0de7b9ebf58 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:35:05 +0200 Subject: qmp-commands: move 'object-del' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 15 --------------- qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 15 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 397b3d6397..2555eef09a 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -205,21 +205,6 @@ Example: <- { "return": { "status": "active", "completed": 1024000, "total": 2048000 } } -object-del ----------- - -Remove QOM object. - -Arguments: - -- "id": the object's ID (json-string) - -Example: - --> { "execute": "object-del", "arguments": { "id": "rng1" } } -<- { "return": {} } - - block_resize ------------ diff --git a/qapi-schema.json b/qapi-schema.json index 2982e3168b..f4084638d5 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3413,6 +3413,12 @@ # Error if @id is not a valid id for a QOM object # # Since: 2.0 +# +# Example: +# +# -> { "execute": "object-del", "arguments": { "id": "rng1" } } +# <- { "return": {} } +# ## { 'command': 'object-del', 'data': {'id': 'str'} } -- cgit v1.2.3-55-g7522 From 179bf59a3aeccf2350e054e24a232a1b69e9a27b Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:35:51 +0200 Subject: qmp-commands: move 'getfd' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 22 ---------------------- qapi-schema.json | 7 +++++++ 2 files changed, 7 insertions(+), 22 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 2555eef09a..483769c577 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -688,28 +688,6 @@ Arguments: Returns: Nothing on success If "device" does not exist or cannot be determined, DeviceNotFound -getfd ------ - -Receive a file descriptor via SCM rights and assign it a name. - -Arguments: - -- "fdname": file descriptor name (json-string) - -Example: - --> { "execute": "getfd", "arguments": { "fdname": "fd1" } } -<- { "return": {} } - -Notes: - -(1) If the name specified by the "fdname" argument already exists, - the file descriptor assigned to it will be closed and replaced - by the received file descriptor. -(2) The 'closefd' command can be used to explicitly close the file - descriptor when it is no longer needed. - closefd ------- diff --git a/qapi-schema.json b/qapi-schema.json index f4084638d5..b4dacd415d 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3993,8 +3993,15 @@ # Notes: If @fdname already exists, the file descriptor assigned to # it will be closed and replaced by the received file # descriptor. +# # The 'closefd' command can be used to explicitly close the # file descriptor when it is no longer needed. +# +# Example: +# +# -> { "execute": "getfd", "arguments": { "fdname": "fd1" } } +# <- { "return": {} } +# ## { 'command': 'getfd', 'data': {'fdname': 'str'} } -- cgit v1.2.3-55-g7522 From f5ad8e87c737996abe5e61124dc07adb2b610dac Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:37:08 +0200 Subject: qmp-commands: move 'closefd' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 14 -------------- qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 14 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 483769c577..d727f36bbe 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -688,20 +688,6 @@ Arguments: Returns: Nothing on success If "device" does not exist or cannot be determined, DeviceNotFound -closefd -------- - -Close a file descriptor previously passed via SCM rights. - -Arguments: - -- "fdname": file descriptor name (json-string) - -Example: - --> { "execute": "closefd", "arguments": { "fdname": "fd1" } } -<- { "return": {} } - add-fd ------- diff --git a/qapi-schema.json b/qapi-schema.json index b4dacd415d..b5c01367e4 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4015,6 +4015,12 @@ # Returns: Nothing on success # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "closefd", "arguments": { "fdname": "fd1" } } +# <- { "return": {} } +# ## { 'command': 'closefd', 'data': {'fdname': 'str'} } -- cgit v1.2.3-55-g7522 From 43fef34a2938c2feda5b668bba01a7fb01a19308 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:39:05 +0200 Subject: qmp-commands: move 'add-fd' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 28 ---------------------------- qapi-schema.json | 8 ++++++++ 2 files changed, 8 insertions(+), 28 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index d727f36bbe..21f3ddf9d6 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -688,34 +688,6 @@ Arguments: Returns: Nothing on success If "device" does not exist or cannot be determined, DeviceNotFound -add-fd -------- - -Add a file descriptor, that was passed via SCM rights, to an fd set. - -Arguments: - -- "fdset-id": The ID of the fd set to add the file descriptor to. - (json-int, optional) -- "opaque": A free-form string that can be used to describe the fd. - (json-string, optional) - -Return a json-object with the following information: - -- "fdset-id": The ID of the fd set that the fd was added to. (json-int) -- "fd": The file descriptor that was received via SCM rights and added to the - fd set. (json-int) - -Example: - --> { "execute": "add-fd", "arguments": { "fdset-id": 1 } } -<- { "return": { "fdset-id": 1, "fd": 3 } } - -Notes: - -(1) The list of fd sets is shared by all monitor connections. -(2) If "fdset-id" is not specified, a new fd set will be created. - remove-fd --------- diff --git a/qapi-schema.json b/qapi-schema.json index b5c01367e4..35a2399cf1 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4373,7 +4373,9 @@ # @opaque: #optional A free-form string that can be used to describe the fd. # # Returns: @AddfdInfo on success +# # If file descriptor was not received, FdNotSupplied +# # If @fdset-id is a negative value, InvalidParameterValue # # Notes: The list of fd sets is shared by all monitor connections. @@ -4381,6 +4383,12 @@ # If @fdset-id is not specified, a new fd set will be created. # # Since: 1.2.0 +# +# Example: +# +# -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } } +# <- { "return": { "fdset-id": 1, "fd": 3 } } +# ## { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'}, 'returns': 'AddfdInfo' } -- cgit v1.2.3-55-g7522 From 4503e4b3b90b8095e267b7791c8ce5194d6396e3 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:39:42 +0200 Subject: qmp-commands: move 'remove-fd' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 22 ---------------------- qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 22 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 21f3ddf9d6..b034265ea2 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -688,28 +688,6 @@ Arguments: Returns: Nothing on success If "device" does not exist or cannot be determined, DeviceNotFound -remove-fd ---------- - -Remove a file descriptor from an fd set. - -Arguments: - -- "fdset-id": The ID of the fd set that the file descriptor belongs to. - (json-int) -- "fd": The file descriptor that is to be removed. (json-int, optional) - -Example: - --> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } } -<- { "return": {} } - -Notes: - -(1) The list of fd sets is shared by all monitor connections. -(2) If "fd" is not specified, all file descriptors in "fdset-id" will be - removed. - query-fdsets ------------- diff --git a/qapi-schema.json b/qapi-schema.json index 35a2399cf1..b57f4dde56 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4411,6 +4411,12 @@ # # If @fd is not specified, all file descriptors in @fdset-id # will be removed. +# +# Example: +# +# -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } } +# <- { "return": {} } +# ## { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} } -- cgit v1.2.3-55-g7522 From d71ca35dfc3da867fc25d2db4beb923b81669e35 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:40:29 +0200 Subject: qmp-commands: move 'query-fdsets' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 40 ---------------------------------------- qapi-schema.json | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 40 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index b034265ea2..1fe4f40cff 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -688,46 +688,6 @@ Arguments: Returns: Nothing on success If "device" does not exist or cannot be determined, DeviceNotFound -query-fdsets -------------- - -Return information describing all fd sets. - -Arguments: None - -Example: - --> { "execute": "query-fdsets" } -<- { "return": [ - { - "fds": [ - { - "fd": 30, - "opaque": "rdonly:/path/to/file" - }, - { - "fd": 24, - "opaque": "rdwr:/path/to/file" - } - ], - "fdset-id": 1 - }, - { - "fds": [ - { - "fd": 28 - }, - { - "fd": 29 - } - ], - "fdset-id": 0 - } - ] - } - -Note: The list of fd sets is shared by all monitor connections. - block_passwd ------------ diff --git a/qapi-schema.json b/qapi-schema.json index b57f4dde56..cf3b9411ac 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4459,6 +4459,37 @@ # # Note: The list of fd sets is shared by all monitor connections. # +# Example: +# +# -> { "execute": "query-fdsets" } +# <- { "return": [ +# { +# "fds": [ +# { +# "fd": 30, +# "opaque": "rdonly:/path/to/file" +# }, +# { +# "fd": 24, +# "opaque": "rdwr:/path/to/file" +# } +# ], +# "fdset-id": 1 +# }, +# { +# "fds": [ +# { +# "fd": 28 +# }, +# { +# "fd": 29 +# } +# ], +# "fdset-id": 0 +# } +# ] +# } +# ## { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] } -- cgit v1.2.3-55-g7522 From f45fd52cefaf84fab166dd9d25d12b87813f4882 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:41:20 +0200 Subject: qmp-commands: move 'send-key' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 22 ---------------------- qapi-schema.json | 8 ++++++++ 2 files changed, 8 insertions(+), 22 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 1fe4f40cff..38ccf8405b 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -111,28 +111,6 @@ Notes: (2) It's possible to list device properties by running QEMU with the "-device DEVICE,\?" command-line argument, where DEVICE is the device's name -send-key ----------- - -Send keys to VM. - -Arguments: - -keys array: - - "key": key sequence (a json-array of key union values, - union can be number or qcode enum) - -- hold-time: time to delay key up events, milliseconds. Defaults to 100 - (json-int, optional) - -Example: - --> { "execute": "send-key", - "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" }, - { "type": "qcode", "data": "alt" }, - { "type": "qcode", "data": "delete" } ] } } -<- { "return": {} } - cpu --- diff --git a/qapi-schema.json b/qapi-schema.json index cf3b9411ac..a1030e2d31 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4586,6 +4586,14 @@ # # Since: 1.3.0 # +# Example: +# +# -> { "execute": "send-key", +# "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" }, +# { "type": "qcode", "data": "alt" }, +# { "type": "qcode", "data": "delete" } ] } } +# <- { "return": {} } +# ## { 'command': 'send-key', 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } } -- cgit v1.2.3-55-g7522 From 77b6681ec224af6047a4ba76d7558c150a205718 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:41:46 +0200 Subject: qmp-commands: move 'screendump' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 14 -------------- qapi-schema.json | 7 +++++++ 2 files changed, 7 insertions(+), 14 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 38ccf8405b..4201b50279 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -72,20 +72,6 @@ Example: Note: The "force" argument defaults to false. -screendump ----------- - -Save screen into PPM image. - -Arguments: - -- "filename": file path (json-string) - -Example: - --> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } } -<- { "return": {} } - device_add ---------- diff --git a/qapi-schema.json b/qapi-schema.json index a1030e2d31..2f171c0155 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4608,6 +4608,13 @@ # Returns: Nothing on success # # Since: 0.14.0 +# +# Example: +# +# -> { "execute": "screendump", +# "arguments": { "filename": "/tmp/image" } } +# <- { "return": {} } +# ## { 'command': 'screendump', 'data': {'filename': 'str'} } -- cgit v1.2.3-55-g7522 From 2212092e11db4c92416f989db9000737daaf9d37 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:42:29 +0200 Subject: qmp-commands: move 'chardev-add' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 28 ---------------------------- qapi-schema.json | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 28 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 4201b50279..393e2280bf 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1252,34 +1252,6 @@ Example: -> { "execute": "query-tpm-types" } <- { "return": [ "passthrough" ] } -chardev-add ----------------- - -Add a chardev. - -Arguments: - -- "id": the chardev's ID, must be unique (json-string) -- "backend": chardev backend type + parameters - -Examples: - --> { "execute" : "chardev-add", - "arguments" : { "id" : "foo", - "backend" : { "type" : "null", "data" : {} } } } -<- { "return": {} } - --> { "execute" : "chardev-add", - "arguments" : { "id" : "bar", - "backend" : { "type" : "file", - "data" : { "out" : "/tmp/bar.log" } } } } -<- { "return": {} } - --> { "execute" : "chardev-add", - "arguments" : { "id" : "baz", - "backend" : { "type" : "pty", "data" : {} } } } -<- { "return": { "pty" : "/dev/pty/42" } } - chardev-remove -------------- diff --git a/qapi-schema.json b/qapi-schema.json index 2f171c0155..9b6a8d35b8 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4839,6 +4839,25 @@ # Returns: ChardevReturn. # # Since: 1.4 +# +# Example: +# +# -> { "execute" : "chardev-add", +# "arguments" : { "id" : "foo", +# "backend" : { "type" : "null", "data" : {} } } } +# <- { "return": {} } +# +# -> { "execute" : "chardev-add", +# "arguments" : { "id" : "bar", +# "backend" : { "type" : "file", +# "data" : { "out" : "/tmp/bar.log" } } } } +# <- { "return": {} } +# +# -> { "execute" : "chardev-add", +# "arguments" : { "id" : "baz", +# "backend" : { "type" : "pty", "data" : {} } } } +# <- { "return": { "pty" : "/dev/pty/42" } } +# ## { 'command': 'chardev-add', 'data': {'id' : 'str', 'backend' : 'ChardevBackend' }, -- cgit v1.2.3-55-g7522 From 7cfee8d94367deee91776897c1b33ad99bd54fbf Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:42:58 +0200 Subject: qmp-commands: move 'chardev-remove' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 14 -------------- qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 14 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 393e2280bf..e5ac6a162c 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1252,20 +1252,6 @@ Example: -> { "execute": "query-tpm-types" } <- { "return": [ "passthrough" ] } -chardev-remove --------------- - -Remove a chardev. - -Arguments: - -- "id": the chardev's ID, must exist and not be in use (json-string) - -Example: - --> { "execute": "chardev-remove", "arguments": { "id" : "foo" } } -<- { "return": {} } - query-rx-filter --------------- diff --git a/qapi-schema.json b/qapi-schema.json index 9b6a8d35b8..e213873e0c 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4873,6 +4873,12 @@ # Returns: Nothing on success # # Since: 1.4 +# +# Example: +# +# -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } } +# <- { "return": {} } +# ## { 'command': 'chardev-remove', 'data': {'id': 'str'} } -- cgit v1.2.3-55-g7522 From b7c7941b04bbc65425bcad710fa29fb88bd5ab9f Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:43:58 +0200 Subject: qmp-commands: move 'query-tpm-models' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 12 ------------ qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index e5ac6a162c..f3ec744708 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1228,18 +1228,6 @@ Example: ] } -query-tpm-models ----------------- - -Return a list of supported TPM models. - -Arguments: None - -Example: - --> { "execute": "query-tpm-models" } -<- { "return": [ "tpm-tis" ] } - query-tpm-types --------------- diff --git a/qapi-schema.json b/qapi-schema.json index e213873e0c..1c9573bec0 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4901,6 +4901,12 @@ # Returns: a list of TpmModel # # Since: 1.5 +# +# Example: +# +# -> { "execute": "query-tpm-models" } +# <- { "return": [ "tpm-tis" ] } +# ## { 'command': 'query-tpm-models', 'returns': ['TpmModel'] } -- cgit v1.2.3-55-g7522 From 5a4c031616f4f41edebe608732a7f784c4cff484 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:44:16 +0200 Subject: qmp-commands: move 'query-tpm-types' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 12 ------------ qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index f3ec744708..c613ab45f5 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1228,18 +1228,6 @@ Example: ] } -query-tpm-types ---------------- - -Return a list of supported TPM types. - -Arguments: None - -Example: - --> { "execute": "query-tpm-types" } -<- { "return": [ "passthrough" ] } - query-rx-filter --------------- diff --git a/qapi-schema.json b/qapi-schema.json index 1c9573bec0..68a841882d 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4929,6 +4929,12 @@ # Returns: a list of TpmType # # Since: 1.5 +# +# Example: +# +# -> { "execute": "query-tpm-types" } +# <- { "return": [ "passthrough" ] } +# ## { 'command': 'query-tpm-types', 'returns': ['TpmType'] } -- cgit v1.2.3-55-g7522 From 4e022d01ee17cbc5653db51108832fe938a9c6da Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:45:12 +0200 Subject: qmp-commands: move 'query-tpm' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 25 ------------------------- qapi-schema.json | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 25 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index c613ab45f5..3afb4389a7 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1203,31 +1203,6 @@ Example: ] } -query-tpm ---------- - -Return information about the TPM device. - -Arguments: None - -Example: - --> { "execute": "query-tpm" } -<- { "return": - [ - { "model": "tpm-tis", - "options": - { "type": "passthrough", - "data": - { "cancel-path": "/sys/class/misc/tpm0/device/cancel", - "path": "/dev/tpm0" - } - }, - "id": "tpm0" - } - ] - } - query-rx-filter --------------- diff --git a/qapi-schema.json b/qapi-schema.json index 68a841882d..782d802bad 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4991,6 +4991,25 @@ # Returns: @TPMInfo on success # # Since: 1.5 +# +# Example: +# +# -> { "execute": "query-tpm" } +# <- { "return": +# [ +# { "model": "tpm-tis", +# "options": +# { "type": "passthrough", +# "data": +# { "cancel-path": "/sys/class/misc/tpm0/device/cancel", +# "path": "/dev/tpm0" +# } +# }, +# "id": "tpm0" +# } +# ] +# } +# ## { 'command': 'query-tpm', 'returns': ['TPMInfo'] } -- cgit v1.2.3-55-g7522 From e26a0d0070630baf8fc03f66fdc01682b7bad35e Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:46:31 +0200 Subject: qmp-commands: move 'query-command-line-options' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 40 ---------------------------------------- qapi-schema.json | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 40 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 3afb4389a7..1a3e4e5545 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1163,46 +1163,6 @@ Example: ] } -query-command-line-options --------------------------- - -Show command line option schema. - -Return a json-array of command line option schema for all options (or for -the given option), returning an error if the given option doesn't exist. - -Each array entry contains the following: - -- "option": option name (json-string) -- "parameters": a json-array describes all parameters of the option: - - "name": parameter name (json-string) - - "type": parameter type (one of 'string', 'boolean', 'number', - or 'size') - - "help": human readable description of the parameter - (json-string, optional) - - "default": default value string for the parameter - (json-string, optional) - -Example: - --> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } } -<- { "return": [ - { - "parameters": [ - { - "name": "romfile", - "type": "string" - }, - { - "name": "bootindex", - "type": "number" - } - ], - "option": "option-rom" - } - ] - } - query-rx-filter --------------- diff --git a/qapi-schema.json b/qapi-schema.json index 782d802bad..edae7eebbf 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -5136,6 +5136,28 @@ # @option). Returns an error if the given @option doesn't exist. # # Since: 1.5 +# +# Example: +# +# -> { "execute": "query-command-line-options", +# "arguments": { "option": "option-rom" } } +# <- { "return": [ +# { +# "parameters": [ +# { +# "name": "romfile", +# "type": "string" +# }, +# { +# "name": "bootindex", +# "type": "number" +# } +# ], +# "option": "option-rom" +# } +# ] +# } +# ## {'command': 'query-command-line-options', 'data': { '*option': 'str' }, 'returns': ['CommandLineOptionInfo'] } -- cgit v1.2.3-55-g7522 From 043ea3123d39e1c9cfcc2118c0837864a5a8ec76 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:47:48 +0200 Subject: qmp-commands: move 'query-rx-filter' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 57 --------------------------------------------------- qapi-schema.json | 30 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 57 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 1a3e4e5545..0e868cef2f 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1163,63 +1163,6 @@ Example: ] } -query-rx-filter ---------------- - -Show rx-filter information. - -Returns a json-array of rx-filter information for all NICs (or for the -given NIC), returning an error if the given NIC doesn't exist, or -given NIC doesn't support rx-filter querying, or given net client -isn't a NIC. - -The query will clear the event notification flag of each NIC, then qemu -will start to emit event to QMP monitor. - -Each array entry contains the following: - -- "name": net client name (json-string) -- "promiscuous": promiscuous mode is enabled (json-bool) -- "multicast": multicast receive state (one of 'normal', 'none', 'all') -- "unicast": unicast receive state (one of 'normal', 'none', 'all') -- "vlan": vlan receive state (one of 'normal', 'none', 'all') (Since 2.0) -- "broadcast-allowed": allow to receive broadcast (json-bool) -- "multicast-overflow": multicast table is overflowed (json-bool) -- "unicast-overflow": unicast table is overflowed (json-bool) -- "main-mac": main macaddr string (json-string) -- "vlan-table": a json-array of active vlan id -- "unicast-table": a json-array of unicast macaddr string -- "multicast-table": a json-array of multicast macaddr string - -Example: - --> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } } -<- { "return": [ - { - "promiscuous": true, - "name": "vnet0", - "main-mac": "52:54:00:12:34:56", - "unicast": "normal", - "vlan": "normal", - "vlan-table": [ - 4, - 0 - ], - "unicast-table": [ - ], - "multicast": "normal", - "multicast-overflow": false, - "unicast-overflow": false, - "multicast-table": [ - "01:00:5e:00:00:01", - "33:33:00:00:00:01", - "33:33:ff:12:34:56" - ], - "broadcast-allowed": false - } - ] - } - blockdev-add ------------ diff --git a/qapi-schema.json b/qapi-schema.json index edae7eebbf..21bc13e252 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -5279,6 +5279,36 @@ # isn't a NIC. # # Since: 1.6 +# +# Example: +# +# -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } } +# <- { "return": [ +# { +# "promiscuous": true, +# "name": "vnet0", +# "main-mac": "52:54:00:12:34:56", +# "unicast": "normal", +# "vlan": "normal", +# "vlan-table": [ +# 4, +# 0 +# ], +# "unicast-table": [ +# ], +# "multicast": "normal", +# "multicast-overflow": false, +# "unicast-overflow": false, +# "multicast-table": [ +# "01:00:5e:00:00:01", +# "33:33:00:00:00:01", +# "33:33:ff:12:34:56" +# ], +# "broadcast-allowed": false +# } +# ] +# } +# ## { 'command': 'query-rx-filter', 'data': { '*name': 'str' }, 'returns': ['RxFilterInfo'] } -- cgit v1.2.3-55-g7522 From 70d5b0c2539543e9ace53984902122fccae7a7de Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:54:00 +0200 Subject: qmp-commands: move 'input-send-event' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 55 --------------------------------------------------- qapi-schema.json | 48 +++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 45 insertions(+), 58 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 0e868cef2f..5131a3bc89 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1660,61 +1660,6 @@ Example: -> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } } <- { "return": {} } -input-send-event ----------------- - -Send input event to guest. - -Arguments: - -- "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 -it is possible to map which console belongs to which device and display. - -Example (1): - -Press left mouse button. - --> { "execute": "input-send-event", - "arguments": { "device": "video0", - "events": [ { "type": "btn", - "data" : { "down": true, "button": "left" } } ] } } -<- { "return": {} } - --> { "execute": "input-send-event", - "arguments": { "device": "video0", - "events": [ { "type": "btn", - "data" : { "down": false, "button": "left" } } ] } } -<- { "return": {} } - -Example (2): - -Press ctrl-alt-del. - --> { "execute": "input-send-event", - "arguments": { "events": [ - { "type": "key", "data" : { "down": true, - "key": {"type": "qcode", "data": "ctrl" } } }, - { "type": "key", "data" : { "down": true, - "key": {"type": "qcode", "data": "alt" } } }, - { "type": "key", "data" : { "down": true, - "key": {"type": "qcode", "data": "delete" } } } ] } } -<- { "return": {} } - -Example (3): - -Move mouse pointer to absolute coordinates (20000, 400). - --> { "execute": "input-send-event" , - "arguments": { "events": [ - { "type": "abs", "data" : { "axis": "x", "value" : 20000 } }, - { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } } -<- { "return": {} } - block-set-write-threshold ------------ diff --git a/qapi-schema.json b/qapi-schema.json index 21bc13e252..efec8182ea 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -5407,9 +5407,9 @@ # # Returns: Nothing on success. # -# The @display and @head parameters can be used to send the input -# event to specific input devices in case (a) multiple input devices -# of the same kind are added to the virtual machine and (b) you have +# The @device and @head parameters can be used to send the input event +# to specific input devices in case (a) multiple input devices of the +# same kind are added to the virtual machine and (b) you have # configured input routing (see docs/multiseat.txt) for those input # devices. The parameters work exactly like the device and head # properties of input devices. If @device is missing, only devices @@ -5419,6 +5419,48 @@ # precedence. # # Since: 2.6 +# +# Note: The consoles are visible in the qom tree, under +# /backend/console[$index]. They have a device link and head property, +# so it is possible to map which console belongs to which device and +# display. +# +# Example: +# +# 1. Press left mouse button. +# +# -> { "execute": "input-send-event", +# "arguments": { "device": "video0", +# "events": [ { "type": "btn", +# "data" : { "down": true, "button": "left" } } ] } } +# <- { "return": {} } +# +# -> { "execute": "input-send-event", +# "arguments": { "device": "video0", +# "events": [ { "type": "btn", +# "data" : { "down": false, "button": "left" } } ] } } +# <- { "return": {} } +# +# 2. Press ctrl-alt-del. +# +# -> { "execute": "input-send-event", +# "arguments": { "events": [ +# { "type": "key", "data" : { "down": true, +# "key": {"type": "qcode", "data": "ctrl" } } }, +# { "type": "key", "data" : { "down": true, +# "key": {"type": "qcode", "data": "alt" } } }, +# { "type": "key", "data" : { "down": true, +# "key": {"type": "qcode", "data": "delete" } } } ] } } +# <- { "return": {} } +# +# 3. Move mouse pointer to absolute coordinates (20000, 400). +# +# -> { "execute": "input-send-event" , +# "arguments": { "events": [ +# { "type": "abs", "data" : { "axis": "x", "value" : 20000 } }, +# { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } } +# <- { "return": {} } +# ## { 'command': 'input-send-event', 'data': { '*device': 'str', -- cgit v1.2.3-55-g7522 From cfc84c8b458bf3a64a1478173e132cf29698df22 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:54:38 +0200 Subject: qmp-commands: move 'query-memdev' doc to schema Signed-off-by: Marc-André Lureau [Straightforward conflict with commit e1ff3c6 resolved] Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 30 ------------------------------ qapi-schema.json | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 30 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 5131a3bc89..06b4cbac82 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1534,36 +1534,6 @@ Examples: <- { "return": {} } -query-memdev ------------- - -Show memory devices information. - - -Example (1): - --> { "execute": "query-memdev" } -<- { "return": [ - { - "size": 536870912, - "merge": false, - "dump": true, - "prealloc": false, - "host-nodes": [0, 1], - "policy": "bind" - }, - { - "id": "mem1", - "size": 536870912, - "merge": false, - "dump": true, - "prealloc": true, - "host-nodes": [2, 3], - "policy": "preferred" - } - ] - } - query-memory-devices -------------------- diff --git a/qapi-schema.json b/qapi-schema.json index efec8182ea..0618de88bb 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -5563,6 +5563,31 @@ # Returns: a list of @Memdev. # # Since: 2.1 +# +# Example: +# +# -> { "execute": "query-memdev" } +# <- { "return": [ +# { +# "id": "mem1", +# "size": 536870912, +# "merge": false, +# "dump": true, +# "prealloc": false, +# "host-nodes": [0, 1], +# "policy": "bind" +# }, +# { +# "size": 536870912, +# "merge": false, +# "dump": true, +# "prealloc": true, +# "host-nodes": [2, 3], +# "policy": "preferred" +# } +# ] +# } +# ## { 'command': 'query-memdev', 'returns': ['Memdev'] } -- cgit v1.2.3-55-g7522 From 22f9a094f854d8bfc19b47d2eef68328e7b89b5c Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:55:05 +0200 Subject: qmp-commands: move 'query-memory-devices' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 19 ------------------- qapi-schema.json | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 19 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 06b4cbac82..1e34523892 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1534,25 +1534,6 @@ Examples: <- { "return": {} } -query-memory-devices --------------------- - -Return a list of memory devices. - -Example: --> { "execute": "query-memory-devices" } -<- { "return": [ { "data": - { "addr": 5368709120, - "hotpluggable": true, - "hotplugged": true, - "id": "d1", - "memdev": "/objects/memX", - "node": 0, - "size": 1073741824, - "slot": 0}, - "type": "dimm" - } ] } - query-acpi-ospm-status ---------------------- diff --git a/qapi-schema.json b/qapi-schema.json index 0618de88bb..054e0c57f9 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -5641,6 +5641,22 @@ # Lists available memory devices and their state # # Since: 2.1 +# +# Example: +# +# -> { "execute": "query-memory-devices" } +# <- { "return": [ { "data": +# { "addr": 5368709120, +# "hotpluggable": true, +# "hotplugged": true, +# "id": "d1", +# "memdev": "/objects/memX", +# "node": 0, +# "size": 1073741824, +# "slot": 0}, +# "type": "dimm" +# } ] } +# ## { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] } -- cgit v1.2.3-55-g7522 From 18b43003d4738f6ea3466ba1a70b0f25c23b0b02 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:56:06 +0200 Subject: qmp-commands: move 'query-acpi-ospm-status' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 14 -------------- qapi-schema.json | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 16 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 1e34523892..c7e566c89b 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1534,20 +1534,6 @@ Examples: <- { "return": {} } -query-acpi-ospm-status ----------------------- - -Return list of ACPIOSTInfo for devices that support status reporting -via ACPI _OST method. - -Example: --> { "execute": "query-acpi-ospm-status" } -<- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0}, - { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0}, - { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0}, - { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0} - ]} - rtc-reset-reinjection --------------------- diff --git a/qapi-schema.json b/qapi-schema.json index 054e0c57f9..f7906f9859 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -5697,10 +5697,20 @@ ## # @query-acpi-ospm-status: # -# Lists ACPI OSPM status of ACPI device objects, -# which might be reported via _OST method +# Return a list of ACPIOSTInfo for devices that support status +# reporting via ACPI _OST method. # # Since: 2.1 +# +# Example: +# +# -> { "execute": "query-acpi-ospm-status" } +# <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0}, +# { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0}, +# { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0}, +# { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0} +# ]} +# ## { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] } -- cgit v1.2.3-55-g7522 From 5c32b4ccd61442abba7059352fe9e62b6759e607 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 13:57:29 +0200 Subject: qmp-commands: move 'rtc-reset-reinjection' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 12 ------------ qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index c7e566c89b..4e14bef39d 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -1534,18 +1534,6 @@ Examples: <- { "return": {} } -rtc-reset-reinjection ---------------------- - -Reset the RTC interrupt reinjection backlog. - -Arguments: None. - -Example: - --> { "execute": "rtc-reset-reinjection" } -<- { "return": {} } - trace-event-get-state --------------------- diff --git a/qapi-schema.json b/qapi-schema.json index f7906f9859..b2f249d366 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -5777,6 +5777,12 @@ # command. # # Since: 2.1 +# +# Example: +# +# -> { "execute": "rtc-reset-reinjection" } +# <- { "return": {} } +# ## { 'command': 'rtc-reset-reinjection' } -- cgit v1.2.3-55-g7522 From 7e31d1ae454aeb5b53997b8a3134edeac4d9b19f Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 15:24:35 +0200 Subject: qmp-commands: move 'query-hotpluggable-cpus' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 31 ------------------------------- qapi-schema.json | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 31 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 335acc772f..321f07d3f1 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -274,34 +274,3 @@ Example: -> { "execute": "query-gic-capabilities" } <- { "return": [{ "version": 2, "emulated": true, "kernel": false }, { "version": 3, "emulated": false, "kernel": true } ] } - -Show existing/possible CPUs ---------------------------- - -Arguments: None. - -Example for pseries machine type started with --smp 2,cores=2,maxcpus=4 -cpu POWER8: - --> { "execute": "query-hotpluggable-cpus" } -<- {"return": [ - { "props": { "core-id": 8 }, "type": "POWER8-spapr-cpu-core", - "vcpus-count": 1 }, - { "props": { "core-id": 0 }, "type": "POWER8-spapr-cpu-core", - "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"} - ]}' - -Example for pc machine type started with --smp 1,maxcpus=2: - -> { "execute": "query-hotpluggable-cpus" } - <- {"return": [ - { - "type": "qemu64-x86_64-cpu", "vcpus-count": 1, - "props": {"core-id": 0, "socket-id": 1, "thread-id": 0} - }, - { - "qom-path": "/machine/unattached/device[0]", - "type": "qemu64-x86_64-cpu", "vcpus-count": 1, - "props": {"core-id": 0, "socket-id": 0, "thread-id": 0} - } - ]} diff --git a/qapi-schema.json b/qapi-schema.json index b2f249d366..15dd07b85e 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -5910,5 +5910,33 @@ # Returns: a list of HotpluggableCPU objects. # # Since: 2.7 +# +# Example: +# +# For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8: +# +# -> { "execute": "query-hotpluggable-cpus" } +# <- {"return": [ +# { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core", +# "vcpus-count": 1 }, +# { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core", +# "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"} +# ]}' +# +# For pc machine type started with -smp 1,maxcpus=2: +# +# -> { "execute": "query-hotpluggable-cpus" } +# <- {"return": [ +# { +# "type": "qemu64-x86_64-cpu", "vcpus-count": 1, +# "props": {"core-id": 0, "socket-id": 1, "thread-id": 0} +# }, +# { +# "qom-path": "/machine/unattached/device[0]", +# "type": "qemu64-x86_64-cpu", "vcpus-count": 1, +# "props": {"core-id": 0, "socket-id": 0, "thread-id": 0} +# } +# ]} +# ## { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] } -- cgit v1.2.3-55-g7522 From 1965e98d51ebe4b1effbe11fa71c4cd483ae6383 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 15:26:12 +0200 Subject: qmp-commands: move 'query-gic-capabilities' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 14 -------------- qapi-schema.json | 7 +++++++ 2 files changed, 7 insertions(+), 14 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 321f07d3f1..be17705680 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -260,17 +260,3 @@ Delete a quorum's node "arguments": { "parent": "disk1", "child": "children.1" } } <- { "return": {} } - -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 } ] } diff --git a/qapi-schema.json b/qapi-schema.json index 15dd07b85e..dbfb592c8c 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -5854,6 +5854,13 @@ # Returns: a list of GICCapability objects. # # Since: 2.6 +# +# Example: +# +# -> { "execute": "query-gic-capabilities" } +# <- { "return": [{ "version": 2, "emulated": true, "kernel": false }, +# { "version": 3, "emulated": false, "kernel": true } ] } +# ## { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] } -- cgit v1.2.3-55-g7522 From 926dce5cb97f542af6286c10abfd959673595737 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 15:33:42 +0200 Subject: qmp-commands: move 'query-dump' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 13 ------------- qapi-schema.json | 7 +++++++ 2 files changed, 7 insertions(+), 13 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 7dce470e80..40d68e6a4c 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -137,19 +137,6 @@ Example: -> { "execute": "x-colo-lost-heartbeat" } <- { "return": {} } -query-dump ----------- - -Query background dump status. - -Arguments: None. - -Example: - --> { "execute": "query-dump" } -<- { "return": { "status": "active", "completed": 1024000, - "total": 2048000 } } - qmp_capabilities ---------------- diff --git a/qapi-schema.json b/qapi-schema.json index dbfb592c8c..6bb442e691 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3266,6 +3266,13 @@ # Returns: A @DumpStatus object showing the dump status. # # Since: 2.6 +# +# Example: +# +# -> { "execute": "query-dump" } +# <- { "return": { "status": "active", "completed": 1024000, +# "total": 2048000 } } +# ## { 'command': 'query-dump', 'returns': 'DumpQueryResult' } -- cgit v1.2.3-55-g7522 From 8f457b67066e58e7a1c6d2bd2280634e1f59c137 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 15:38:59 +0200 Subject: qmp-commands: move 'migrate-set-cache-size' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 15 --------------- qapi-schema.json | 9 ++++++++- 2 files changed, 8 insertions(+), 16 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 40d68e6a4c..0de1b04aa9 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -112,21 +112,6 @@ Example: "arguments": { "filename": "/tmp/resume" } } <- { "return": {} } -migrate-set-cache-size ----------------------- - -Set cache size to be used by XBZRLE migration, the cache size will be rounded -down to the nearest power of 2 - -Arguments: - -- "value": cache size in bytes (json-int) - -Example: - --> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } } -<- { "return": {} } - x-colo-lost-heartbeat -------------------- diff --git a/qapi-schema.json b/qapi-schema.json index 6bb442e691..48670e96e4 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2641,7 +2641,7 @@ ## # @migrate-set-cache-size: # -# Set XBZRLE cache size +# Set cache size to be used by XBZRLE migration # # @value: cache size in bytes # @@ -2651,6 +2651,13 @@ # Returns: nothing on success # # Since: 1.2 +# +# Example: +# +# -> { "execute": "migrate-set-cache-size", +# "arguments": { "value": 536870912 } } +# <- { "return": {} } +# ## { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} } -- cgit v1.2.3-55-g7522 From 7d1182d989f61ffbd6745112bd487611e2f40bc4 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Thu, 23 Jun 2016 15:39:50 +0200 Subject: qmp-commands: move 'xen-load-devices-state' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 18 ------------------ qapi-schema.json | 7 +++++++ 2 files changed, 7 insertions(+), 18 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 0de1b04aa9..93b3742ac5 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -94,24 +94,6 @@ Example: Note: CPUs' indexes are obtained with the 'query-cpus' command. -xen-load-devices-state ----------------------- - -Load the state of all devices from file. The RAM and the block devices -of the VM are not loaded by this command. - -Arguments: - -- "filename": the file to load the state of the devices from as binary -data. See xen-save-devices-state.txt for a description of the binary -format. - -Example: - --> { "execute": "xen-load-devices-state", - "arguments": { "filename": "/tmp/resume" } } -<- { "return": {} } - x-colo-lost-heartbeat -------------------- diff --git a/qapi-schema.json b/qapi-schema.json index 48670e96e4..7aeb0fa1e7 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -5832,6 +5832,13 @@ # format. # # Since: 2.7 +# +# Example: +# +# -> { "execute": "xen-load-devices-state", +# "arguments": { "filename": "/tmp/resume" } } +# <- { "return": {} } +# ## { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} } -- cgit v1.2.3-55-g7522 From c08d64434aea7b798c4a25d40db4021ca17a8588 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Tue, 1 Nov 2016 11:18:01 +0300 Subject: qmp-commands: move 'x-colo-lost-heartbeat' doc to schema Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- docs/qmp-commands.txt | 10 ---------- qapi-schema.json | 6 ++++++ 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'qapi-schema.json') diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt index 93b3742ac5..715b9231fd 100644 --- a/docs/qmp-commands.txt +++ b/docs/qmp-commands.txt @@ -94,16 +94,6 @@ Example: Note: CPUs' indexes are obtained with the 'query-cpus' command. -x-colo-lost-heartbeat --------------------- - -Tell COLO that heartbeat is lost, a failover or takeover is needed. - -Example: - --> { "execute": "x-colo-lost-heartbeat" } -<- { "return": {} } - qmp_capabilities ---------------- diff --git a/qapi-schema.json b/qapi-schema.json index 7aeb0fa1e7..661f82b033 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1157,6 +1157,12 @@ # then takes over server operation to become the service VM. # # Since: 2.8 +# +# Example: +# +# -> { "execute": "x-colo-lost-heartbeat" } +# <- { "return": {} } +# ## { 'command': 'x-colo-lost-heartbeat' } -- cgit v1.2.3-55-g7522 From 4d8bb958fa0bf8695c5b38b9f153073c62a989b5 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Mon, 6 Jul 2015 22:13:50 +0200 Subject: qmp-commands: move documentation bits to schema Moving the remaining bits of documentation to the json file (text improvements is not the objective of this patch) Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- Makefile | 1 - docs/qmp-commands.txt | 53 --------------------------------------------------- qapi-schema.json | 49 ++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 48 insertions(+), 55 deletions(-) delete mode 100644 docs/qmp-commands.txt (limited to 'qapi-schema.json') diff --git a/Makefile b/Makefile index 1a8bfb225c..360a6a24a2 100644 --- a/Makefile +++ b/Makefile @@ -429,7 +429,6 @@ endif install-doc: $(DOCS) $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)" $(INSTALL_DATA) qemu-doc.html "$(DESTDIR)$(qemu_docdir)" - $(INSTALL_DATA) $(SRC_PATH)/docs/qmp-commands.txt "$(DESTDIR)$(qemu_docdir)" ifdef CONFIG_POSIX $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1" $(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1" diff --git a/docs/qmp-commands.txt b/docs/qmp-commands.txt deleted file mode 100644 index 07138cdc8a..0000000000 --- a/docs/qmp-commands.txt +++ /dev/null @@ -1,53 +0,0 @@ - QMP Supported Commands - ---------------------- - -This document describes all commands currently supported by QMP. - -Most of the time their usage is exactly the same as in the user Monitor, this -means that any other document which also describe commands (the manpage, -QEMU's manual, etc) can and should be consulted. - -QMP has two types of commands: regular and query commands. Regular commands -usually change the Virtual Machine's state someway, while query commands just -return information. The sections below are divided accordingly. - -It's important to observe that all communication examples are formatted in -a reader-friendly way, so that they're easier to understand. However, in real -protocol usage, they're emitted as a single line. - -Also, the following notation is used to denote data flow: - --> data issued by the Client -<- Server data response - -Please, refer to the QMP specification (docs/qmp-spec.txt) for detailed -information on the Server command and response formats. - -NOTE: This document is temporary and will be replaced soon. - -1. Stability Considerations -=========================== - -The current QMP command set (described in this file) may be useful for a -number of use cases, however it's limited and several commands have bad -defined semantics, specially with regard to command completion. - -These problems are going to be solved incrementally in the next QEMU releases -and we're going to establish a deprecation policy for badly defined commands. - -If you're planning to adopt QMP, please observe the following: - - 1. The deprecation policy will take effect and be documented soon, please - check the documentation of each used command as soon as a new release of - QEMU is available - - 2. DO NOT rely on anything which is not explicit documented - - 3. Errors, in special, are not documented. Applications should NOT check - for specific errors classes or data (it's strongly recommended to only - check for the "error" key) -2. Regular Commands -=================== - -Server's responses in the examples below are always a success response, please -refer to the QMP specification for more details on error responses. diff --git a/qapi-schema.json b/qapi-schema.json index 661f82b033..ddc878390e 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -1,6 +1,53 @@ # -*- Mode: Python -*- +## +# = Introduction +# +# This document describes all commands currently supported by QMP. +# +# Most of the time their usage is exactly the same as in the user Monitor, this +# means that any other document which also describe commands (the manpage, +# QEMU's manual, etc) can and should be consulted. +# +# QMP has two types of commands: regular and query commands. Regular commands +# usually change the Virtual Machine's state someway, while query commands just +# return information. The sections below are divided accordingly. +# +# It's important to observe that all communication examples are formatted in +# a reader-friendly way, so that they're easier to understand. However, in real +# protocol usage, they're emitted as a single line. +# +# Also, the following notation is used to denote data flow: +# +# Example: +# +# | -> data issued by the Client +# | <- Server data response # -# QAPI Schema +# Please, refer to the QMP specification (docs/qmp-spec.txt) for +# detailed information on the Server command and response formats. +# +# = Stability Considerations +# +# The current QMP command set (described in this file) may be useful for a +# number of use cases, however it's limited and several commands have bad +# defined semantics, specially with regard to command completion. +# +# These problems are going to be solved incrementally in the next QEMU releases +# and we're going to establish a deprecation policy for badly defined commands. +# +# If you're planning to adopt QMP, please observe the following: +# +# 1. The deprecation policy will take effect and be documented soon, please +# check the documentation of each used command as soon as a new release of +# QEMU is available +# +# 2. DO NOT rely on anything which is not explicit documented +# +# 3. Errors, in special, are not documented. Applications should NOT check +# for specific errors classes or data (it's strongly recommended to only +# check for the "error" key) +# +## # QAPI common definitions { 'include': 'qapi/common.json' } -- cgit v1.2.3-55-g7522