Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/808769/?format=api
{ "id": 808769, "url": "http://patchwork.ozlabs.org/api/patches/808769/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170901153758.8628-25-armbru@redhat.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170901153758.8628-25-armbru@redhat.com>", "list_archive_url": null, "date": "2017-09-01T15:37:35", "name": "[PULL,v2,24/47] qapi-schema: Collect migration stuff in qapi/migration.json", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "d869ad94bf4c23c2bf91e77198cfb491b7ebec5a", "submitter": { "id": 2645, "url": "http://patchwork.ozlabs.org/api/people/2645/?format=api", "name": "Markus Armbruster", "email": "armbru@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170901153758.8628-25-armbru@redhat.com/mbox/", "series": [ { "id": 1049, "url": "http://patchwork.ozlabs.org/api/series/1049/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=1049", "date": "2017-09-01T15:37:14", "name": "[PULL,v2,01/47] qapi: Fix error handling code on alternate conflict", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/1049/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/808769/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/808769/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)", "ext-mx05.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com", "ext-mx05.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=armbru@redhat.com" ], "Received": [ "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkPBX5qTJz9s2G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 2 Sep 2017 02:01:56 +1000 (AEST)", "from localhost ([::1]:46592 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnoOI-0005Yt-Qb\n\tfor incoming@patchwork.ozlabs.org; Fri, 01 Sep 2017 12:01:54 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:51845)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <armbru@redhat.com>) id 1dno1a-0006t0-Cd\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 11:38:33 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <armbru@redhat.com>) id 1dno1N-0001l9-En\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 11:38:26 -0400", "from mx1.redhat.com ([209.132.183.28]:54150)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <armbru@redhat.com>) id 1dno1M-0001jK-Uu\n\tfor qemu-devel@nongnu.org; Fri, 01 Sep 2017 11:38:13 -0400", "from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 114FFC9D36\n\tfor <qemu-devel@nongnu.org>; Fri, 1 Sep 2017 15:38:12 +0000 (UTC)", "from blackfin.pond.sub.org (ovpn-116-75.ams2.redhat.com\n\t[10.36.116.75])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 2BCE0B19DE;\n\tFri, 1 Sep 2017 15:38:09 +0000 (UTC)", "by blackfin.pond.sub.org (Postfix, from userid 1000)\n\tid 8A2931132F20; Fri, 1 Sep 2017 17:37:58 +0200 (CEST)" ], "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 114FFC9D36", "From": "Markus Armbruster <armbru@redhat.com>", "To": "qemu-devel@nongnu.org", "Date": "Fri, 1 Sep 2017 17:37:35 +0200", "Message-Id": "<20170901153758.8628-25-armbru@redhat.com>", "In-Reply-To": "<20170901153758.8628-1-armbru@redhat.com>", "References": "<20170901153758.8628-1-armbru@redhat.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.15", "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.29]);\n\tFri, 01 Sep 2017 15:38:12 +0000 (UTC)", "Content-Transfer-Encoding": "quoted-printable", "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]", "X-Received-From": "209.132.183.28", "Subject": "[Qemu-devel] [PULL v2 24/47] qapi-schema: Collect migration stuff\n\tin qapi/migration.json", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.21", "Precedence": "list", "List-Id": "<qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Cc": "\"Dr . David Alan Gilbert\" <dgilbert@redhat.com>,\n\tJuan Quintela <quintela@redhat.com>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>" }, "content": "Cc: Juan Quintela <quintela@redhat.com>\nCc: Dr. David Alan Gilbert <dgilbert@redhat.com>\nSigned-off-by: Markus Armbruster <armbru@redhat.com>\nMessage-Id: <1503602048-12268-10-git-send-email-armbru@redhat.com>\nReviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>\nReviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>\n---\n MAINTAINERS | 1 +\n Makefile | 1 +\n qapi-schema.json | 1056 +------------------------------------------------\n qapi/common.json | 16 +\n qapi/event.json | 38 --\n qapi/migration.json | 1085 +++++++++++++++++++++++++++++++++++++++++++++++++++\n 6 files changed, 1104 insertions(+), 1093 deletions(-)\n create mode 100644 qapi/migration.json", "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex 24c5105b12..baa9859b4a 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -1498,6 +1498,7 @@ F: migration/\n F: scripts/vmstate-static-checker.py\n F: tests/vmstate-static-checker-data/\n F: docs/migration.txt\n+F: qapi/migration.json\n \n Seccomp\n M: Eduardo Otubo <otubo@redhat.com>\ndiff --git a/Makefile b/Makefile\nindex c7b6fd1a1c..18cf670833 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -413,6 +413,7 @@ qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \\\n $(SRC_PATH)/qapi/char.json \\\n $(SRC_PATH)/qapi/crypto.json \\\n $(SRC_PATH)/qapi/event.json $(SRC_PATH)/qapi/introspect.json \\\n+ $(SRC_PATH)/qapi/migration.json \\\n $(SRC_PATH)/qapi/net.json \\\n $(SRC_PATH)/qapi/rocker.json \\\n $(SRC_PATH)/qapi/run-state.json \\\ndiff --git a/qapi-schema.json b/qapi-schema.json\nindex 6a23f5991c..21f54ea1a2 100644\n--- a/qapi-schema.json\n+++ b/qapi-schema.json\n@@ -87,6 +87,7 @@\n { 'include': 'qapi/net.json' }\n { 'include': 'qapi/rocker.json' }\n { 'include': 'qapi/ui.json' }\n+{ 'include': 'qapi/migration.json' }\n { 'include': 'qapi/event.json' }\n { 'include': 'qapi/trace.json' }\n { 'include': 'qapi/introspect.json' }\n@@ -117,22 +118,6 @@\n { 'command': 'qmp_capabilities' }\n \n ##\n-# @StrOrNull:\n-#\n-# This is a string value or the explicit lack of a string (null\n-# pointer in C). Intended for cases when 'optional absent' already\n-# has a different meaning.\n-#\n-# @s: the string value\n-# @n: no string value\n-#\n-# Since: 2.10\n-##\n-{ 'alternate': 'StrOrNull',\n- 'data': { 's': 'str',\n- 'n': 'null' } }\n-\n-##\n # @LostTickPolicy:\n #\n # Policy for handling lost ticks in timer devices.\n@@ -316,778 +301,6 @@\n { 'command': 'query-events', 'returns': ['EventInfo'] }\n \n ##\n-# @MigrationStats:\n-#\n-# Detailed migration status.\n-#\n-# @transferred: amount of bytes already transferred to the target VM\n-#\n-# @remaining: amount of bytes remaining to be transferred to the target VM\n-#\n-# @total: total amount of bytes involved in the migration process\n-#\n-# @duplicate: number of duplicate (zero) pages (since 1.2)\n-#\n-# @skipped: number of skipped zero pages (since 1.5)\n-#\n-# @normal: number of normal pages (since 1.2)\n-#\n-# @normal-bytes: number of normal bytes sent (since 1.2)\n-#\n-# @dirty-pages-rate: number of pages dirtied by second by the\n-# guest (since 1.3)\n-#\n-# @mbps: throughput in megabits/sec. (since 1.6)\n-#\n-# @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)\n-#\n-# @postcopy-requests: The number of page requests received from the destination\n-# (since 2.7)\n-#\n-# @page-size: The number of bytes per page for the various page-based\n-# statistics (since 2.10)\n-#\n-# Since: 0.14.0\n-##\n-{ 'struct': 'MigrationStats',\n- 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,\n- 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',\n- 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',\n- 'mbps' : 'number', 'dirty-sync-count' : 'int',\n- 'postcopy-requests' : 'int', 'page-size' : 'int' } }\n-\n-##\n-# @XBZRLECacheStats:\n-#\n-# Detailed XBZRLE migration cache statistics\n-#\n-# @cache-size: XBZRLE cache size\n-#\n-# @bytes: amount of bytes already transferred to the target VM\n-#\n-# @pages: amount of pages transferred to the target VM\n-#\n-# @cache-miss: number of cache miss\n-#\n-# @cache-miss-rate: rate of cache miss (since 2.1)\n-#\n-# @overflow: number of overflows\n-#\n-# Since: 1.2\n-##\n-{ 'struct': 'XBZRLECacheStats',\n- 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',\n- 'cache-miss': 'int', 'cache-miss-rate': 'number',\n- 'overflow': 'int' } }\n-\n-##\n-# @MigrationStatus:\n-#\n-# An enumeration of migration status.\n-#\n-# @none: no migration has ever happened.\n-#\n-# @setup: migration process has been initiated.\n-#\n-# @cancelling: in the process of cancelling migration.\n-#\n-# @cancelled: cancelling migration is finished.\n-#\n-# @active: in the process of doing migration.\n-#\n-# @postcopy-active: like active, but now in postcopy mode. (since 2.5)\n-#\n-# @completed: migration is finished.\n-#\n-# @failed: some error occurred during migration process.\n-#\n-# @colo: VM is in the process of fault tolerance, VM can not get into this\n-# state unless colo capability is enabled for migration. (since 2.8)\n-#\n-# Since: 2.3\n-#\n-##\n-{ 'enum': 'MigrationStatus',\n- 'data': [ 'none', 'setup', 'cancelling', 'cancelled',\n- 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }\n-\n-##\n-# @MigrationInfo:\n-#\n-# Information about current migration process.\n-#\n-# @status: @MigrationStatus describing the current migration status.\n-# If this field is not returned, no migration process\n-# has been initiated\n-#\n-# @ram: @MigrationStats containing detailed migration\n-# status, only returned if status is 'active' or\n-# 'completed'(since 1.2)\n-#\n-# @disk: @MigrationStats containing detailed disk migration\n-# status, only returned if status is 'active' and it is a block\n-# migration\n-#\n-# @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE\n-# migration statistics, only returned if XBZRLE feature is on and\n-# status is 'active' or 'completed' (since 1.2)\n-#\n-# @total-time: total amount of milliseconds since migration started.\n-# If migration has ended, it returns the total migration\n-# time. (since 1.2)\n-#\n-# @downtime: only present when migration finishes correctly\n-# total downtime in milliseconds for the guest.\n-# (since 1.3)\n-#\n-# @expected-downtime: only present while migration is active\n-# expected downtime in milliseconds for the guest in last walk\n-# of the dirty bitmap. (since 1.3)\n-#\n-# @setup-time: amount of setup time in milliseconds _before_ the\n-# iterations begin but _after_ the QMP command is issued. This is designed\n-# to provide an accounting of any activities (such as RDMA pinning) which\n-# may be expensive, but do not actually occur during the iterative\n-# migration rounds themselves. (since 1.6)\n-#\n-# @cpu-throttle-percentage: percentage of time guest cpus are being\n-# throttled during auto-converge. This is only present when auto-converge\n-# has started throttling guest cpus. (Since 2.7)\n-#\n-# @error-desc: the human readable error description string, when\n-# @status is 'failed'. Clients should not attempt to parse the\n-# error strings. (Since 2.7)\n-#\n-# Since: 0.14.0\n-##\n-{ 'struct': 'MigrationInfo',\n- 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',\n- '*disk': 'MigrationStats',\n- '*xbzrle-cache': 'XBZRLECacheStats',\n- '*total-time': 'int',\n- '*expected-downtime': 'int',\n- '*downtime': 'int',\n- '*setup-time': 'int',\n- '*cpu-throttle-percentage': 'int',\n- '*error-desc': 'str'} }\n-\n-##\n-# @query-migrate:\n-#\n-# Returns information about current migration process. If migration\n-# is active there will be another json-object with RAM migration\n-# status and if block migration is active another one with block\n-# migration status.\n-#\n-# Returns: @MigrationInfo\n-#\n-# Since: 0.14.0\n-#\n-# Example:\n-#\n-# 1. Before the first migration\n-#\n-# -> { \"execute\": \"query-migrate\" }\n-# <- { \"return\": {} }\n-#\n-# 2. Migration is done and has succeeded\n-#\n-# -> { \"execute\": \"query-migrate\" }\n-# <- { \"return\": {\n-# \"status\": \"completed\",\n-# \"ram\":{\n-# \"transferred\":123,\n-# \"remaining\":123,\n-# \"total\":246,\n-# \"total-time\":12345,\n-# \"setup-time\":12345,\n-# \"downtime\":12345,\n-# \"duplicate\":123,\n-# \"normal\":123,\n-# \"normal-bytes\":123456,\n-# \"dirty-sync-count\":15\n-# }\n-# }\n-# }\n-#\n-# 3. Migration is done and has failed\n-#\n-# -> { \"execute\": \"query-migrate\" }\n-# <- { \"return\": { \"status\": \"failed\" } }\n-#\n-# 4. Migration is being performed and is not a block migration:\n-#\n-# -> { \"execute\": \"query-migrate\" }\n-# <- {\n-# \"return\":{\n-# \"status\":\"active\",\n-# \"ram\":{\n-# \"transferred\":123,\n-# \"remaining\":123,\n-# \"total\":246,\n-# \"total-time\":12345,\n-# \"setup-time\":12345,\n-# \"expected-downtime\":12345,\n-# \"duplicate\":123,\n-# \"normal\":123,\n-# \"normal-bytes\":123456,\n-# \"dirty-sync-count\":15\n-# }\n-# }\n-# }\n-#\n-# 5. Migration is being performed and is a block migration:\n-#\n-# -> { \"execute\": \"query-migrate\" }\n-# <- {\n-# \"return\":{\n-# \"status\":\"active\",\n-# \"ram\":{\n-# \"total\":1057024,\n-# \"remaining\":1053304,\n-# \"transferred\":3720,\n-# \"total-time\":12345,\n-# \"setup-time\":12345,\n-# \"expected-downtime\":12345,\n-# \"duplicate\":123,\n-# \"normal\":123,\n-# \"normal-bytes\":123456,\n-# \"dirty-sync-count\":15\n-# },\n-# \"disk\":{\n-# \"total\":20971520,\n-# \"remaining\":20880384,\n-# \"transferred\":91136\n-# }\n-# }\n-# }\n-#\n-# 6. Migration is being performed and XBZRLE is active:\n-#\n-# -> { \"execute\": \"query-migrate\" }\n-# <- {\n-# \"return\":{\n-# \"status\":\"active\",\n-# \"capabilities\" : [ { \"capability\": \"xbzrle\", \"state\" : true } ],\n-# \"ram\":{\n-# \"total\":1057024,\n-# \"remaining\":1053304,\n-# \"transferred\":3720,\n-# \"total-time\":12345,\n-# \"setup-time\":12345,\n-# \"expected-downtime\":12345,\n-# \"duplicate\":10,\n-# \"normal\":3333,\n-# \"normal-bytes\":3412992,\n-# \"dirty-sync-count\":15\n-# },\n-# \"xbzrle-cache\":{\n-# \"cache-size\":67108864,\n-# \"bytes\":20971520,\n-# \"pages\":2444343,\n-# \"cache-miss\":2244,\n-# \"cache-miss-rate\":0.123,\n-# \"overflow\":34434\n-# }\n-# }\n-# }\n-#\n-##\n-{ 'command': 'query-migrate', 'returns': 'MigrationInfo' }\n-\n-##\n-# @MigrationCapability:\n-#\n-# Migration capabilities enumeration\n-#\n-# @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).\n-# This feature allows us to minimize migration traffic for certain work\n-# loads, by sending compressed difference of the pages\n-#\n-# @rdma-pin-all: Controls whether or not the entire VM memory footprint is\n-# mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.\n-# Disabled by default. (since 2.0)\n-#\n-# @zero-blocks: During storage migration encode blocks of zeroes efficiently. This\n-# essentially saves 1MB of zeroes per block on the wire. Enabling requires\n-# source and target VM to support this feature. To enable it is sufficient\n-# to enable the capability on the source VM. The feature is disabled by\n-# default. (since 1.6)\n-#\n-# @compress: Use multiple compression threads to accelerate live migration.\n-# This feature can help to reduce the migration traffic, by sending\n-# compressed pages. Please note that if compress and xbzrle are both\n-# on, compress only takes effect in the ram bulk stage, after that,\n-# it will be disabled and only xbzrle takes effect, this can help to\n-# minimize migration traffic. The feature is disabled by default.\n-# (since 2.4 )\n-#\n-# @events: generate events for each migration state change\n-# (since 2.4 )\n-#\n-# @auto-converge: If enabled, QEMU will automatically throttle down the guest\n-# to speed up convergence of RAM migration. (since 1.6)\n-#\n-# @postcopy-ram: Start executing on the migration target before all of RAM has\n-# been migrated, pulling the remaining pages along as needed. NOTE: If\n-# the migration fails during postcopy the VM will fail. (since 2.6)\n-#\n-# @x-colo: If enabled, migration will never end, and the state of the VM on the\n-# primary side will be migrated continuously to the VM on secondary\n-# side, this process is called COarse-Grain LOck Stepping (COLO) for\n-# Non-stop Service. (since 2.8)\n-#\n-# @release-ram: if enabled, qemu will free the migrated ram pages on the source\n-# during postcopy-ram migration. (since 2.9)\n-#\n-# @block: If enabled, QEMU will also migrate the contents of all block\n-# devices. Default is disabled. A possible alternative uses\n-# mirror jobs to a builtin NBD server on the destination, which\n-# offers more flexibility.\n-# (Since 2.10)\n-#\n-# @return-path: If enabled, migration will use the return path even\n-# for precopy. (since 2.10)\n-#\n-# Since: 1.2\n-##\n-{ 'enum': 'MigrationCapability',\n- 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',\n- 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',\n- 'block', 'return-path' ] }\n-\n-##\n-# @MigrationCapabilityStatus:\n-#\n-# Migration capability information\n-#\n-# @capability: capability enum\n-#\n-# @state: capability state bool\n-#\n-# Since: 1.2\n-##\n-{ 'struct': 'MigrationCapabilityStatus',\n- 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }\n-\n-##\n-# @migrate-set-capabilities:\n-#\n-# Enable/Disable the following migration capabilities (like xbzrle)\n-#\n-# @capabilities: json array of capability modifications to make\n-#\n-# Since: 1.2\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"migrate-set-capabilities\" , \"arguments\":\n-# { \"capabilities\": [ { \"capability\": \"xbzrle\", \"state\": true } ] } }\n-#\n-##\n-{ 'command': 'migrate-set-capabilities',\n- 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }\n-\n-##\n-# @query-migrate-capabilities:\n-#\n-# Returns information about the current migration capabilities status\n-#\n-# Returns: @MigrationCapabilitiesStatus\n-#\n-# Since: 1.2\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"query-migrate-capabilities\" }\n-# <- { \"return\": [\n-# {\"state\": false, \"capability\": \"xbzrle\"},\n-# {\"state\": false, \"capability\": \"rdma-pin-all\"},\n-# {\"state\": false, \"capability\": \"auto-converge\"},\n-# {\"state\": false, \"capability\": \"zero-blocks\"},\n-# {\"state\": false, \"capability\": \"compress\"},\n-# {\"state\": true, \"capability\": \"events\"},\n-# {\"state\": false, \"capability\": \"postcopy-ram\"},\n-# {\"state\": false, \"capability\": \"x-colo\"}\n-# ]}\n-#\n-##\n-{ 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}\n-\n-##\n-# @MigrationParameter:\n-#\n-# Migration parameters enumeration\n-#\n-# @compress-level: Set the compression level to be used in live migration,\n-# the compression level is an integer between 0 and 9, where 0 means\n-# no compression, 1 means the best compression speed, and 9 means best\n-# compression ratio which will consume more CPU.\n-#\n-# @compress-threads: Set compression thread count to be used in live migration,\n-# the compression thread count is an integer between 1 and 255.\n-#\n-# @decompress-threads: Set decompression thread count to be used in live\n-# migration, the decompression thread count is an integer between 1\n-# and 255. Usually, decompression is at least 4 times as fast as\n-# compression, so set the decompress-threads to the number about 1/4\n-# of compress-threads is adequate.\n-#\n-# @cpu-throttle-initial: Initial percentage of time guest cpus are throttled\n-# when migration auto-converge is activated. The\n-# default value is 20. (Since 2.7)\n-#\n-# @cpu-throttle-increment: throttle percentage increase each time\n-# auto-converge detects that migration is not making\n-# progress. The default value is 10. (Since 2.7)\n-#\n-# @tls-creds: ID of the 'tls-creds' object that provides credentials for\n-# establishing a TLS connection over the migration data channel.\n-# On the outgoing side of the migration, the credentials must\n-# be for a 'client' endpoint, while for the incoming side the\n-# credentials must be for a 'server' endpoint. Setting this\n-# will enable TLS for all migrations. The default is unset,\n-# resulting in unsecured migration at the QEMU level. (Since 2.7)\n-#\n-# @tls-hostname: hostname of the target host for the migration. This is\n-# required when using x509 based TLS credentials and the\n-# migration URI does not already include a hostname. For\n-# example if using fd: or exec: based migration, the\n-# hostname must be provided so that the server's x509\n-# certificate identity can be validated. (Since 2.7)\n-#\n-# @max-bandwidth: to set maximum speed for migration. maximum speed in\n-# bytes per second. (Since 2.8)\n-#\n-# @downtime-limit: set maximum tolerated downtime for migration. maximum\n-# downtime in milliseconds (Since 2.8)\n-#\n-# @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in\n-# periodic mode. (Since 2.8)\n-#\n-# @block-incremental: Affects how much storage is migrated when the\n-# \tblock migration capability is enabled. When false, the entire\n-# \tstorage backing chain is migrated into a flattened image at\n-# \tthe destination; when true, only the active qcow2 layer is\n-# \tmigrated and the destination must already have access to the\n-# \tsame backing chain as was used on the source. (since 2.10)\n-#\n-# Since: 2.4\n-##\n-{ 'enum': 'MigrationParameter',\n- 'data': ['compress-level', 'compress-threads', 'decompress-threads',\n- 'cpu-throttle-initial', 'cpu-throttle-increment',\n- 'tls-creds', 'tls-hostname', 'max-bandwidth',\n- 'downtime-limit', 'x-checkpoint-delay', 'block-incremental' ] }\n-\n-##\n-# @MigrateSetParameters:\n-#\n-# @compress-level: compression level\n-#\n-# @compress-threads: compression thread count\n-#\n-# @decompress-threads: decompression thread count\n-#\n-# @cpu-throttle-initial: Initial percentage of time guest cpus are\n-# throttled when migration auto-converge is activated.\n-# The default value is 20. (Since 2.7)\n-#\n-# @cpu-throttle-increment: throttle percentage increase each time\n-# auto-converge detects that migration is not making\n-# progress. The default value is 10. (Since 2.7)\n-#\n-# @tls-creds: ID of the 'tls-creds' object that provides credentials\n-# for establishing a TLS connection over the migration data\n-# channel. On the outgoing side of the migration, the credentials\n-# must be for a 'client' endpoint, while for the incoming side the\n-# credentials must be for a 'server' endpoint. Setting this\n-# to a non-empty string enables TLS for all migrations.\n-# An empty string means that QEMU will use plain text mode for\n-# migration, rather than TLS (Since 2.9)\n-# Previously (since 2.7), this was reported by omitting\n-# tls-creds instead.\n-#\n-# @tls-hostname: hostname of the target host for the migration. This\n-# is required when using x509 based TLS credentials and the\n-# migration URI does not already include a hostname. For\n-# example if using fd: or exec: based migration, the\n-# hostname must be provided so that the server's x509\n-# certificate identity can be validated. (Since 2.7)\n-# An empty string means that QEMU will use the hostname\n-# associated with the migration URI, if any. (Since 2.9)\n-# Previously (since 2.7), this was reported by omitting\n-# tls-hostname instead.\n-#\n-# @max-bandwidth: to set maximum speed for migration. maximum speed in\n-# bytes per second. (Since 2.8)\n-#\n-# @downtime-limit: set maximum tolerated downtime for migration. maximum\n-# downtime in milliseconds (Since 2.8)\n-#\n-# @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)\n-#\n-# @block-incremental: Affects how much storage is migrated when the\n-# \tblock migration capability is enabled. When false, the entire\n-# \tstorage backing chain is migrated into a flattened image at\n-# \tthe destination; when true, only the active qcow2 layer is\n-# \tmigrated and the destination must already have access to the\n-# \tsame backing chain as was used on the source. (since 2.10)\n-#\n-# Since: 2.4\n-##\n-# TODO either fuse back into MigrationParameters, or make\n-# MigrationParameters members mandatory\n-{ 'struct': 'MigrateSetParameters',\n- 'data': { '*compress-level': 'int',\n- '*compress-threads': 'int',\n- '*decompress-threads': 'int',\n- '*cpu-throttle-initial': 'int',\n- '*cpu-throttle-increment': 'int',\n- '*tls-creds': 'StrOrNull',\n- '*tls-hostname': 'StrOrNull',\n- '*max-bandwidth': 'int',\n- '*downtime-limit': 'int',\n- '*x-checkpoint-delay': 'int',\n- '*block-incremental': 'bool' } }\n-\n-##\n-# @migrate-set-parameters:\n-#\n-# Set various migration parameters.\n-#\n-# Since: 2.4\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"migrate-set-parameters\" ,\n-# \"arguments\": { \"compress-level\": 1 } }\n-#\n-##\n-{ 'command': 'migrate-set-parameters', 'boxed': true,\n- 'data': 'MigrateSetParameters' }\n-\n-##\n-# @MigrationParameters:\n-#\n-# The optional members aren't actually optional.\n-#\n-# @compress-level: compression level\n-#\n-# @compress-threads: compression thread count\n-#\n-# @decompress-threads: decompression thread count\n-#\n-# @cpu-throttle-initial: Initial percentage of time guest cpus are\n-# throttled when migration auto-converge is activated.\n-# (Since 2.7)\n-#\n-# @cpu-throttle-increment: throttle percentage increase each time\n-# auto-converge detects that migration is not making\n-# progress. (Since 2.7)\n-#\n-# @tls-creds: ID of the 'tls-creds' object that provides credentials\n-# for establishing a TLS connection over the migration data\n-# channel. On the outgoing side of the migration, the credentials\n-# must be for a 'client' endpoint, while for the incoming side the\n-# credentials must be for a 'server' endpoint.\n-# An empty string means that QEMU will use plain text mode for\n-# migration, rather than TLS (Since 2.7)\n-# Note: 2.8 reports this by omitting tls-creds instead.\n-#\n-# @tls-hostname: hostname of the target host for the migration. This\n-# is required when using x509 based TLS credentials and the\n-# migration URI does not already include a hostname. For\n-# example if using fd: or exec: based migration, the\n-# hostname must be provided so that the server's x509\n-# certificate identity can be validated. (Since 2.7)\n-# An empty string means that QEMU will use the hostname\n-# associated with the migration URI, if any. (Since 2.9)\n-# Note: 2.8 reports this by omitting tls-hostname instead.\n-#\n-# @max-bandwidth: to set maximum speed for migration. maximum speed in\n-# bytes per second. (Since 2.8)\n-#\n-# @downtime-limit: set maximum tolerated downtime for migration. maximum\n-# downtime in milliseconds (Since 2.8)\n-#\n-# @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)\n-#\n-# @block-incremental: Affects how much storage is migrated when the\n-# \tblock migration capability is enabled. When false, the entire\n-# \tstorage backing chain is migrated into a flattened image at\n-# \tthe destination; when true, only the active qcow2 layer is\n-# \tmigrated and the destination must already have access to the\n-# \tsame backing chain as was used on the source. (since 2.10)\n-#\n-# Since: 2.4\n-##\n-{ 'struct': 'MigrationParameters',\n- 'data': { '*compress-level': 'int',\n- '*compress-threads': 'int',\n- '*decompress-threads': 'int',\n- '*cpu-throttle-initial': 'int',\n- '*cpu-throttle-increment': 'int',\n- '*tls-creds': 'str',\n- '*tls-hostname': 'str',\n- '*max-bandwidth': 'int',\n- '*downtime-limit': 'int',\n- '*x-checkpoint-delay': 'int',\n- '*block-incremental': 'bool' } }\n-\n-##\n-# @query-migrate-parameters:\n-#\n-# Returns information about the current migration parameters\n-#\n-# Returns: @MigrationParameters\n-#\n-# Since: 2.4\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"query-migrate-parameters\" }\n-# <- { \"return\": {\n-# \"decompress-threads\": 2,\n-# \"cpu-throttle-increment\": 10,\n-# \"compress-threads\": 8,\n-# \"compress-level\": 1,\n-# \"cpu-throttle-initial\": 20,\n-# \"max-bandwidth\": 33554432,\n-# \"downtime-limit\": 300\n-# }\n-# }\n-#\n-##\n-{ 'command': 'query-migrate-parameters',\n- 'returns': 'MigrationParameters' }\n-\n-##\n-# @client_migrate_info:\n-#\n-# Set migration information for remote display. This makes the server\n-# ask the client to automatically reconnect using the new parameters\n-# once migration finished successfully. Only implemented for SPICE.\n-#\n-# @protocol: must be \"spice\"\n-# @hostname: migration target hostname\n-# @port: spice tcp port for plaintext channels\n-# @tls-port: spice tcp port for tls-secured channels\n-# @cert-subject: server certificate subject\n-#\n-# Since: 0.14.0\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"client_migrate_info\",\n-# \"arguments\": { \"protocol\": \"spice\",\n-# \"hostname\": \"virt42.lab.kraxel.org\",\n-# \"port\": 1234 } }\n-# <- { \"return\": {} }\n-#\n-##\n-{ 'command': 'client_migrate_info',\n- 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',\n- '*tls-port': 'int', '*cert-subject': 'str' } }\n-\n-##\n-# @migrate-start-postcopy:\n-#\n-# Followup to a migration command to switch the migration to postcopy mode.\n-# The postcopy-ram capability must be set before the original migration\n-# command.\n-#\n-# Since: 2.5\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"migrate-start-postcopy\" }\n-# <- { \"return\": {} }\n-#\n-##\n-{ 'command': 'migrate-start-postcopy' }\n-\n-##\n-# @COLOMessage:\n-#\n-# The message transmission between Primary side and Secondary side.\n-#\n-# @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing\n-#\n-# @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing\n-#\n-# @checkpoint-reply: SVM gets PVM's checkpoint request\n-#\n-# @vmstate-send: VM's state will be sent by PVM.\n-#\n-# @vmstate-size: The total size of VMstate.\n-#\n-# @vmstate-received: VM's state has been received by SVM.\n-#\n-# @vmstate-loaded: VM's state has been loaded by SVM.\n-#\n-# Since: 2.8\n-##\n-{ 'enum': 'COLOMessage',\n- 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',\n- 'vmstate-send', 'vmstate-size', 'vmstate-received',\n- 'vmstate-loaded' ] }\n-\n-##\n-# @COLOMode:\n-#\n-# The colo mode\n-#\n-# @unknown: unknown mode\n-#\n-# @primary: master side\n-#\n-# @secondary: slave side\n-#\n-# Since: 2.8\n-##\n-{ 'enum': 'COLOMode',\n- 'data': [ 'unknown', 'primary', 'secondary'] }\n-\n-##\n-# @FailoverStatus:\n-#\n-# An enumeration of COLO failover status\n-#\n-# @none: no failover has ever happened\n-#\n-# @require: got failover requirement but not handled\n-#\n-# @active: in the process of doing failover\n-#\n-# @completed: finish the process of failover\n-#\n-# @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)\n-#\n-# Since: 2.8\n-##\n-{ 'enum': 'FailoverStatus',\n- 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }\n-\n-##\n-# @x-colo-lost-heartbeat:\n-#\n-# Tell qemu that heartbeat is lost, request it to do takeover procedures.\n-# If this command is sent to the PVM, the Primary side will exit COLO mode.\n-# If sent to the Secondary, the Secondary side will run failover work,\n-# then takes over server operation to become the service VM.\n-#\n-# Since: 2.8\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"x-colo-lost-heartbeat\" }\n-# <- { \"return\": {} }\n-#\n-##\n-{ 'command': 'x-colo-lost-heartbeat' }\n-\n-##\n # @CpuInfoArch:\n #\n # An enumeration of cpu types that enable additional information during\n@@ -2072,107 +1285,6 @@\n 'returns': 'str' }\n \n ##\n-# @migrate_cancel:\n-#\n-# Cancel the current executing migration process.\n-#\n-# Returns: nothing on success\n-#\n-# Notes: This command succeeds even if there is no migration process running.\n-#\n-# Since: 0.14.0\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"migrate_cancel\" }\n-# <- { \"return\": {} }\n-#\n-##\n-{ 'command': 'migrate_cancel' }\n-\n-##\n-# @migrate_set_downtime:\n-#\n-# Set maximum tolerated downtime for migration.\n-#\n-# @value: maximum downtime in seconds\n-#\n-# Returns: nothing on success\n-#\n-# Notes: This command is deprecated in favor of 'migrate-set-parameters'\n-#\n-# Since: 0.14.0\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"migrate_set_downtime\", \"arguments\": { \"value\": 0.1 } }\n-# <- { \"return\": {} }\n-#\n-##\n-{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }\n-\n-##\n-# @migrate_set_speed:\n-#\n-# Set maximum speed for migration.\n-#\n-# @value: maximum speed in bytes per second.\n-#\n-# Returns: nothing on success\n-#\n-# Notes: This command is deprecated in favor of 'migrate-set-parameters'\n-#\n-# Since: 0.14.0\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"migrate_set_speed\", \"arguments\": { \"value\": 1024 } }\n-# <- { \"return\": {} }\n-#\n-##\n-{ 'command': 'migrate_set_speed', 'data': {'value': 'int'} }\n-\n-##\n-# @migrate-set-cache-size:\n-#\n-# Set cache size to be used by XBZRLE migration\n-#\n-# @value: cache size in bytes\n-#\n-# The size will be rounded down to the nearest power of 2.\n-# The cache size can be modified before and during ongoing migration\n-#\n-# Returns: nothing on success\n-#\n-# Since: 1.2\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"migrate-set-cache-size\",\n-# \"arguments\": { \"value\": 536870912 } }\n-# <- { \"return\": {} }\n-#\n-##\n-{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }\n-\n-##\n-# @query-migrate-cache-size:\n-#\n-# Query migration XBZRLE cache size\n-#\n-# Returns: XBZRLE cache size in bytes\n-#\n-# Since: 1.2\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"query-migrate-cache-size\" }\n-# <- { \"return\": 67108864 }\n-#\n-##\n-{ 'command': 'query-migrate-cache-size', 'returns': 'int' }\n-\n-##\n # @ObjectPropertyInfo:\n #\n # @name: the name of the property\n@@ -2378,99 +1490,6 @@\n 'returns': [ 'DevicePropertyInfo' ] }\n \n ##\n-# @migrate:\n-#\n-# Migrates the current running guest to another Virtual Machine.\n-#\n-# @uri: the Uniform Resource Identifier of the destination VM\n-#\n-# @blk: do block migration (full disk copy)\n-#\n-# @inc: incremental disk copy migration\n-#\n-# @detach: this argument exists only for compatibility reasons and\n-# is ignored by QEMU\n-#\n-# Returns: nothing on success\n-#\n-# Since: 0.14.0\n-#\n-# Notes:\n-#\n-# 1. The 'query-migrate' command should be used to check migration's progress\n-# and final result (this information is provided by the 'status' member)\n-#\n-# 2. All boolean arguments default to false\n-#\n-# 3. The user Monitor's \"detach\" argument is invalid in QMP and should not\n-# be used\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"migrate\", \"arguments\": { \"uri\": \"tcp:0:4446\" } }\n-# <- { \"return\": {} }\n-#\n-##\n-{ 'command': 'migrate',\n- 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }\n-\n-##\n-# @migrate-incoming:\n-#\n-# Start an incoming migration, the qemu must have been started\n-# with -incoming defer\n-#\n-# @uri: The Uniform Resource Identifier identifying the source or\n-# address to listen on\n-#\n-# Returns: nothing on success\n-#\n-# Since: 2.3\n-#\n-# Notes:\n-#\n-# 1. It's a bad idea to use a string for the uri, but it needs to stay\n-# compatible with -incoming and the format of the uri is already exposed\n-# above libvirt.\n-#\n-# 2. QEMU must be started with -incoming defer to allow migrate-incoming to\n-# be used.\n-#\n-# 3. The uri format is the same as for -incoming\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"migrate-incoming\",\n-# \"arguments\": { \"uri\": \"tcp::4446\" } }\n-# <- { \"return\": {} }\n-#\n-##\n-{ 'command': 'migrate-incoming', 'data': {'uri': 'str' } }\n-\n-##\n-# @xen-save-devices-state:\n-#\n-# Save the state of all devices to file. The RAM and the block devices\n-# of the VM are not saved by this command.\n-#\n-# @filename: the file to save the state of the devices to as binary\n-# data. See xen-save-devices-state.txt for a description of the binary\n-# format.\n-#\n-# Returns: Nothing on success\n-#\n-# Since: 1.1\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"xen-save-devices-state\",\n-# \"arguments\": { \"filename\": \"/tmp/save\" } }\n-# <- { \"return\": {} }\n-#\n-##\n-{ 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }\n-\n-##\n # @xen-set-global-dirty-log:\n #\n # Enable or disable the global dirty log mode.\n@@ -4037,79 +3056,6 @@\n { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }\n \n ##\n-# @xen-set-replication:\n-#\n-# Enable or disable replication.\n-#\n-# @enable: true to enable, false to disable.\n-#\n-# @primary: true for primary or false for secondary.\n-#\n-# @failover: true to do failover, false to stop. but cannot be\n-# specified if 'enable' is true. default value is false.\n-#\n-# Returns: nothing.\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"xen-set-replication\",\n-# \"arguments\": {\"enable\": true, \"primary\": false} }\n-# <- { \"return\": {} }\n-#\n-# Since: 2.9\n-##\n-{ 'command': 'xen-set-replication',\n- 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }\n-\n-##\n-# @ReplicationStatus:\n-#\n-# The result format for 'query-xen-replication-status'.\n-#\n-# @error: true if an error happened, false if replication is normal.\n-#\n-# @desc: the human readable error description string, when\n-# @error is 'true'.\n-#\n-# Since: 2.9\n-##\n-{ 'struct': 'ReplicationStatus',\n- 'data': { 'error': 'bool', '*desc': 'str' } }\n-\n-##\n-# @query-xen-replication-status:\n-#\n-# Query replication status while the vm is running.\n-#\n-# Returns: A @ReplicationResult object showing the status.\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"query-xen-replication-status\" }\n-# <- { \"return\": { \"error\": false } }\n-#\n-# Since: 2.9\n-##\n-{ 'command': 'query-xen-replication-status',\n- 'returns': 'ReplicationStatus' }\n-\n-##\n-# @xen-colo-do-checkpoint:\n-#\n-# Xen uses this command to notify replication to trigger a checkpoint.\n-#\n-# Returns: nothing.\n-#\n-# Example:\n-#\n-# -> { \"execute\": \"xen-colo-do-checkpoint\" }\n-# <- { \"return\": {} }\n-#\n-# Since: 2.9\n-##\n-{ 'command': 'xen-colo-do-checkpoint' }\n-\n-##\n # @GICCapability:\n #\n # The struct describes capability for a specific GIC (Generic\ndiff --git a/qapi/common.json b/qapi/common.json\nindex 862e73f982..e2c58564d8 100644\n--- a/qapi/common.json\n+++ b/qapi/common.json\n@@ -173,3 +173,19 @@\n { 'struct': 'String',\n 'data': {\n 'str': 'str' } }\n+\n+##\n+# @StrOrNull:\n+#\n+# This is a string value or the explicit lack of a string (null\n+# pointer in C). Intended for cases when 'optional absent' already\n+# has a different meaning.\n+#\n+# @s: the string value\n+# @n: no string value\n+#\n+# Since: 2.10\n+##\n+{ 'alternate': 'StrOrNull',\n+ 'data': { 's': 'str',\n+ 'n': 'null' } }\ndiff --git a/qapi/event.json b/qapi/event.json\nindex f49bd3d564..a043de4cd8 100644\n--- a/qapi/event.json\n+++ b/qapi/event.json\n@@ -51,44 +51,6 @@\n 'data': { '*device': 'str', 'path': 'str' } }\n \n ##\n-# @MIGRATION:\n-#\n-# Emitted when a migration event happens\n-#\n-# @status: @MigrationStatus describing the current migration status.\n-#\n-# Since: 2.4\n-#\n-# Example:\n-#\n-# <- {\"timestamp\": {\"seconds\": 1432121972, \"microseconds\": 744001},\n-# \"event\": \"MIGRATION\",\n-# \"data\": {\"status\": \"completed\"} }\n-#\n-##\n-{ 'event': 'MIGRATION',\n- 'data': {'status': 'MigrationStatus'}}\n-\n-##\n-# @MIGRATION_PASS:\n-#\n-# Emitted from the source side of a migration at the start of each pass\n-# (when it syncs the dirty bitmap)\n-#\n-# @pass: An incrementing count (starting at 1 on the first pass)\n-#\n-# Since: 2.6\n-#\n-# Example:\n-#\n-# { \"timestamp\": {\"seconds\": 1449669631, \"microseconds\": 239225},\n-# \"event\": \"MIGRATION_PASS\", \"data\": {\"pass\": 2} }\n-#\n-##\n-{ 'event': 'MIGRATION_PASS',\n- 'data': { 'pass': 'int' } }\n-\n-##\n # @ACPI_DEVICE_OST:\n #\n # Emitted when guest executes ACPI _OST method.\ndiff --git a/qapi/migration.json b/qapi/migration.json\nnew file mode 100644\nindex 0000000000..ee2b3b8733\n--- /dev/null\n+++ b/qapi/migration.json\n@@ -0,0 +1,1085 @@\n+# -*- Mode: Python -*-\n+#\n+\n+##\n+# = Migration\n+##\n+\n+{ 'include': 'common.json' }\n+\n+##\n+# @MigrationStats:\n+#\n+# Detailed migration status.\n+#\n+# @transferred: amount of bytes already transferred to the target VM\n+#\n+# @remaining: amount of bytes remaining to be transferred to the target VM\n+#\n+# @total: total amount of bytes involved in the migration process\n+#\n+# @duplicate: number of duplicate (zero) pages (since 1.2)\n+#\n+# @skipped: number of skipped zero pages (since 1.5)\n+#\n+# @normal: number of normal pages (since 1.2)\n+#\n+# @normal-bytes: number of normal bytes sent (since 1.2)\n+#\n+# @dirty-pages-rate: number of pages dirtied by second by the\n+# guest (since 1.3)\n+#\n+# @mbps: throughput in megabits/sec. (since 1.6)\n+#\n+# @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)\n+#\n+# @postcopy-requests: The number of page requests received from the destination\n+# (since 2.7)\n+#\n+# @page-size: The number of bytes per page for the various page-based\n+# statistics (since 2.10)\n+#\n+# Since: 0.14.0\n+##\n+{ 'struct': 'MigrationStats',\n+ 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,\n+ 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',\n+ 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',\n+ 'mbps' : 'number', 'dirty-sync-count' : 'int',\n+ 'postcopy-requests' : 'int', 'page-size' : 'int' } }\n+\n+##\n+# @XBZRLECacheStats:\n+#\n+# Detailed XBZRLE migration cache statistics\n+#\n+# @cache-size: XBZRLE cache size\n+#\n+# @bytes: amount of bytes already transferred to the target VM\n+#\n+# @pages: amount of pages transferred to the target VM\n+#\n+# @cache-miss: number of cache miss\n+#\n+# @cache-miss-rate: rate of cache miss (since 2.1)\n+#\n+# @overflow: number of overflows\n+#\n+# Since: 1.2\n+##\n+{ 'struct': 'XBZRLECacheStats',\n+ 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',\n+ 'cache-miss': 'int', 'cache-miss-rate': 'number',\n+ 'overflow': 'int' } }\n+\n+##\n+# @MigrationStatus:\n+#\n+# An enumeration of migration status.\n+#\n+# @none: no migration has ever happened.\n+#\n+# @setup: migration process has been initiated.\n+#\n+# @cancelling: in the process of cancelling migration.\n+#\n+# @cancelled: cancelling migration is finished.\n+#\n+# @active: in the process of doing migration.\n+#\n+# @postcopy-active: like active, but now in postcopy mode. (since 2.5)\n+#\n+# @completed: migration is finished.\n+#\n+# @failed: some error occurred during migration process.\n+#\n+# @colo: VM is in the process of fault tolerance, VM can not get into this\n+# state unless colo capability is enabled for migration. (since 2.8)\n+#\n+# Since: 2.3\n+#\n+##\n+{ 'enum': 'MigrationStatus',\n+ 'data': [ 'none', 'setup', 'cancelling', 'cancelled',\n+ 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }\n+\n+##\n+# @MigrationInfo:\n+#\n+# Information about current migration process.\n+#\n+# @status: @MigrationStatus describing the current migration status.\n+# If this field is not returned, no migration process\n+# has been initiated\n+#\n+# @ram: @MigrationStats containing detailed migration\n+# status, only returned if status is 'active' or\n+# 'completed'(since 1.2)\n+#\n+# @disk: @MigrationStats containing detailed disk migration\n+# status, only returned if status is 'active' and it is a block\n+# migration\n+#\n+# @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE\n+# migration statistics, only returned if XBZRLE feature is on and\n+# status is 'active' or 'completed' (since 1.2)\n+#\n+# @total-time: total amount of milliseconds since migration started.\n+# If migration has ended, it returns the total migration\n+# time. (since 1.2)\n+#\n+# @downtime: only present when migration finishes correctly\n+# total downtime in milliseconds for the guest.\n+# (since 1.3)\n+#\n+# @expected-downtime: only present while migration is active\n+# expected downtime in milliseconds for the guest in last walk\n+# of the dirty bitmap. (since 1.3)\n+#\n+# @setup-time: amount of setup time in milliseconds _before_ the\n+# iterations begin but _after_ the QMP command is issued. This is designed\n+# to provide an accounting of any activities (such as RDMA pinning) which\n+# may be expensive, but do not actually occur during the iterative\n+# migration rounds themselves. (since 1.6)\n+#\n+# @cpu-throttle-percentage: percentage of time guest cpus are being\n+# throttled during auto-converge. This is only present when auto-converge\n+# has started throttling guest cpus. (Since 2.7)\n+#\n+# @error-desc: the human readable error description string, when\n+# @status is 'failed'. Clients should not attempt to parse the\n+# error strings. (Since 2.7)\n+#\n+# Since: 0.14.0\n+##\n+{ 'struct': 'MigrationInfo',\n+ 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',\n+ '*disk': 'MigrationStats',\n+ '*xbzrle-cache': 'XBZRLECacheStats',\n+ '*total-time': 'int',\n+ '*expected-downtime': 'int',\n+ '*downtime': 'int',\n+ '*setup-time': 'int',\n+ '*cpu-throttle-percentage': 'int',\n+ '*error-desc': 'str'} }\n+\n+##\n+# @query-migrate:\n+#\n+# Returns information about current migration process. If migration\n+# is active there will be another json-object with RAM migration\n+# status and if block migration is active another one with block\n+# migration status.\n+#\n+# Returns: @MigrationInfo\n+#\n+# Since: 0.14.0\n+#\n+# Example:\n+#\n+# 1. Before the first migration\n+#\n+# -> { \"execute\": \"query-migrate\" }\n+# <- { \"return\": {} }\n+#\n+# 2. Migration is done and has succeeded\n+#\n+# -> { \"execute\": \"query-migrate\" }\n+# <- { \"return\": {\n+# \"status\": \"completed\",\n+# \"ram\":{\n+# \"transferred\":123,\n+# \"remaining\":123,\n+# \"total\":246,\n+# \"total-time\":12345,\n+# \"setup-time\":12345,\n+# \"downtime\":12345,\n+# \"duplicate\":123,\n+# \"normal\":123,\n+# \"normal-bytes\":123456,\n+# \"dirty-sync-count\":15\n+# }\n+# }\n+# }\n+#\n+# 3. Migration is done and has failed\n+#\n+# -> { \"execute\": \"query-migrate\" }\n+# <- { \"return\": { \"status\": \"failed\" } }\n+#\n+# 4. Migration is being performed and is not a block migration:\n+#\n+# -> { \"execute\": \"query-migrate\" }\n+# <- {\n+# \"return\":{\n+# \"status\":\"active\",\n+# \"ram\":{\n+# \"transferred\":123,\n+# \"remaining\":123,\n+# \"total\":246,\n+# \"total-time\":12345,\n+# \"setup-time\":12345,\n+# \"expected-downtime\":12345,\n+# \"duplicate\":123,\n+# \"normal\":123,\n+# \"normal-bytes\":123456,\n+# \"dirty-sync-count\":15\n+# }\n+# }\n+# }\n+#\n+# 5. Migration is being performed and is a block migration:\n+#\n+# -> { \"execute\": \"query-migrate\" }\n+# <- {\n+# \"return\":{\n+# \"status\":\"active\",\n+# \"ram\":{\n+# \"total\":1057024,\n+# \"remaining\":1053304,\n+# \"transferred\":3720,\n+# \"total-time\":12345,\n+# \"setup-time\":12345,\n+# \"expected-downtime\":12345,\n+# \"duplicate\":123,\n+# \"normal\":123,\n+# \"normal-bytes\":123456,\n+# \"dirty-sync-count\":15\n+# },\n+# \"disk\":{\n+# \"total\":20971520,\n+# \"remaining\":20880384,\n+# \"transferred\":91136\n+# }\n+# }\n+# }\n+#\n+# 6. Migration is being performed and XBZRLE is active:\n+#\n+# -> { \"execute\": \"query-migrate\" }\n+# <- {\n+# \"return\":{\n+# \"status\":\"active\",\n+# \"capabilities\" : [ { \"capability\": \"xbzrle\", \"state\" : true } ],\n+# \"ram\":{\n+# \"total\":1057024,\n+# \"remaining\":1053304,\n+# \"transferred\":3720,\n+# \"total-time\":12345,\n+# \"setup-time\":12345,\n+# \"expected-downtime\":12345,\n+# \"duplicate\":10,\n+# \"normal\":3333,\n+# \"normal-bytes\":3412992,\n+# \"dirty-sync-count\":15\n+# },\n+# \"xbzrle-cache\":{\n+# \"cache-size\":67108864,\n+# \"bytes\":20971520,\n+# \"pages\":2444343,\n+# \"cache-miss\":2244,\n+# \"cache-miss-rate\":0.123,\n+# \"overflow\":34434\n+# }\n+# }\n+# }\n+#\n+##\n+{ 'command': 'query-migrate', 'returns': 'MigrationInfo' }\n+\n+##\n+# @MigrationCapability:\n+#\n+# Migration capabilities enumeration\n+#\n+# @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).\n+# This feature allows us to minimize migration traffic for certain work\n+# loads, by sending compressed difference of the pages\n+#\n+# @rdma-pin-all: Controls whether or not the entire VM memory footprint is\n+# mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.\n+# Disabled by default. (since 2.0)\n+#\n+# @zero-blocks: During storage migration encode blocks of zeroes efficiently. This\n+# essentially saves 1MB of zeroes per block on the wire. Enabling requires\n+# source and target VM to support this feature. To enable it is sufficient\n+# to enable the capability on the source VM. The feature is disabled by\n+# default. (since 1.6)\n+#\n+# @compress: Use multiple compression threads to accelerate live migration.\n+# This feature can help to reduce the migration traffic, by sending\n+# compressed pages. Please note that if compress and xbzrle are both\n+# on, compress only takes effect in the ram bulk stage, after that,\n+# it will be disabled and only xbzrle takes effect, this can help to\n+# minimize migration traffic. The feature is disabled by default.\n+# (since 2.4 )\n+#\n+# @events: generate events for each migration state change\n+# (since 2.4 )\n+#\n+# @auto-converge: If enabled, QEMU will automatically throttle down the guest\n+# to speed up convergence of RAM migration. (since 1.6)\n+#\n+# @postcopy-ram: Start executing on the migration target before all of RAM has\n+# been migrated, pulling the remaining pages along as needed. NOTE: If\n+# the migration fails during postcopy the VM will fail. (since 2.6)\n+#\n+# @x-colo: If enabled, migration will never end, and the state of the VM on the\n+# primary side will be migrated continuously to the VM on secondary\n+# side, this process is called COarse-Grain LOck Stepping (COLO) for\n+# Non-stop Service. (since 2.8)\n+#\n+# @release-ram: if enabled, qemu will free the migrated ram pages on the source\n+# during postcopy-ram migration. (since 2.9)\n+#\n+# @block: If enabled, QEMU will also migrate the contents of all block\n+# devices. Default is disabled. A possible alternative uses\n+# mirror jobs to a builtin NBD server on the destination, which\n+# offers more flexibility.\n+# (Since 2.10)\n+#\n+# @return-path: If enabled, migration will use the return path even\n+# for precopy. (since 2.10)\n+#\n+# Since: 1.2\n+##\n+{ 'enum': 'MigrationCapability',\n+ 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',\n+ 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',\n+ 'block', 'return-path' ] }\n+\n+##\n+# @MigrationCapabilityStatus:\n+#\n+# Migration capability information\n+#\n+# @capability: capability enum\n+#\n+# @state: capability state bool\n+#\n+# Since: 1.2\n+##\n+{ 'struct': 'MigrationCapabilityStatus',\n+ 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }\n+\n+##\n+# @migrate-set-capabilities:\n+#\n+# Enable/Disable the following migration capabilities (like xbzrle)\n+#\n+# @capabilities: json array of capability modifications to make\n+#\n+# Since: 1.2\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"migrate-set-capabilities\" , \"arguments\":\n+# { \"capabilities\": [ { \"capability\": \"xbzrle\", \"state\": true } ] } }\n+#\n+##\n+{ 'command': 'migrate-set-capabilities',\n+ 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }\n+\n+##\n+# @query-migrate-capabilities:\n+#\n+# Returns information about the current migration capabilities status\n+#\n+# Returns: @MigrationCapabilitiesStatus\n+#\n+# Since: 1.2\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"query-migrate-capabilities\" }\n+# <- { \"return\": [\n+# {\"state\": false, \"capability\": \"xbzrle\"},\n+# {\"state\": false, \"capability\": \"rdma-pin-all\"},\n+# {\"state\": false, \"capability\": \"auto-converge\"},\n+# {\"state\": false, \"capability\": \"zero-blocks\"},\n+# {\"state\": false, \"capability\": \"compress\"},\n+# {\"state\": true, \"capability\": \"events\"},\n+# {\"state\": false, \"capability\": \"postcopy-ram\"},\n+# {\"state\": false, \"capability\": \"x-colo\"}\n+# ]}\n+#\n+##\n+{ 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}\n+\n+##\n+# @MigrationParameter:\n+#\n+# Migration parameters enumeration\n+#\n+# @compress-level: Set the compression level to be used in live migration,\n+# the compression level is an integer between 0 and 9, where 0 means\n+# no compression, 1 means the best compression speed, and 9 means best\n+# compression ratio which will consume more CPU.\n+#\n+# @compress-threads: Set compression thread count to be used in live migration,\n+# the compression thread count is an integer between 1 and 255.\n+#\n+# @decompress-threads: Set decompression thread count to be used in live\n+# migration, the decompression thread count is an integer between 1\n+# and 255. Usually, decompression is at least 4 times as fast as\n+# compression, so set the decompress-threads to the number about 1/4\n+# of compress-threads is adequate.\n+#\n+# @cpu-throttle-initial: Initial percentage of time guest cpus are throttled\n+# when migration auto-converge is activated. The\n+# default value is 20. (Since 2.7)\n+#\n+# @cpu-throttle-increment: throttle percentage increase each time\n+# auto-converge detects that migration is not making\n+# progress. The default value is 10. (Since 2.7)\n+#\n+# @tls-creds: ID of the 'tls-creds' object that provides credentials for\n+# establishing a TLS connection over the migration data channel.\n+# On the outgoing side of the migration, the credentials must\n+# be for a 'client' endpoint, while for the incoming side the\n+# credentials must be for a 'server' endpoint. Setting this\n+# will enable TLS for all migrations. The default is unset,\n+# resulting in unsecured migration at the QEMU level. (Since 2.7)\n+#\n+# @tls-hostname: hostname of the target host for the migration. This is\n+# required when using x509 based TLS credentials and the\n+# migration URI does not already include a hostname. For\n+# example if using fd: or exec: based migration, the\n+# hostname must be provided so that the server's x509\n+# certificate identity can be validated. (Since 2.7)\n+#\n+# @max-bandwidth: to set maximum speed for migration. maximum speed in\n+# bytes per second. (Since 2.8)\n+#\n+# @downtime-limit: set maximum tolerated downtime for migration. maximum\n+# downtime in milliseconds (Since 2.8)\n+#\n+# @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in\n+# periodic mode. (Since 2.8)\n+#\n+# @block-incremental: Affects how much storage is migrated when the\n+# \tblock migration capability is enabled. When false, the entire\n+# \tstorage backing chain is migrated into a flattened image at\n+# \tthe destination; when true, only the active qcow2 layer is\n+# \tmigrated and the destination must already have access to the\n+# \tsame backing chain as was used on the source. (since 2.10)\n+#\n+# Since: 2.4\n+##\n+{ 'enum': 'MigrationParameter',\n+ 'data': ['compress-level', 'compress-threads', 'decompress-threads',\n+ 'cpu-throttle-initial', 'cpu-throttle-increment',\n+ 'tls-creds', 'tls-hostname', 'max-bandwidth',\n+ 'downtime-limit', 'x-checkpoint-delay', 'block-incremental' ] }\n+\n+##\n+# @MigrateSetParameters:\n+#\n+# @compress-level: compression level\n+#\n+# @compress-threads: compression thread count\n+#\n+# @decompress-threads: decompression thread count\n+#\n+# @cpu-throttle-initial: Initial percentage of time guest cpus are\n+# throttled when migration auto-converge is activated.\n+# The default value is 20. (Since 2.7)\n+#\n+# @cpu-throttle-increment: throttle percentage increase each time\n+# auto-converge detects that migration is not making\n+# progress. The default value is 10. (Since 2.7)\n+#\n+# @tls-creds: ID of the 'tls-creds' object that provides credentials\n+# for establishing a TLS connection over the migration data\n+# channel. On the outgoing side of the migration, the credentials\n+# must be for a 'client' endpoint, while for the incoming side the\n+# credentials must be for a 'server' endpoint. Setting this\n+# to a non-empty string enables TLS for all migrations.\n+# An empty string means that QEMU will use plain text mode for\n+# migration, rather than TLS (Since 2.9)\n+# Previously (since 2.7), this was reported by omitting\n+# tls-creds instead.\n+#\n+# @tls-hostname: hostname of the target host for the migration. This\n+# is required when using x509 based TLS credentials and the\n+# migration URI does not already include a hostname. For\n+# example if using fd: or exec: based migration, the\n+# hostname must be provided so that the server's x509\n+# certificate identity can be validated. (Since 2.7)\n+# An empty string means that QEMU will use the hostname\n+# associated with the migration URI, if any. (Since 2.9)\n+# Previously (since 2.7), this was reported by omitting\n+# tls-hostname instead.\n+#\n+# @max-bandwidth: to set maximum speed for migration. maximum speed in\n+# bytes per second. (Since 2.8)\n+#\n+# @downtime-limit: set maximum tolerated downtime for migration. maximum\n+# downtime in milliseconds (Since 2.8)\n+#\n+# @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)\n+#\n+# @block-incremental: Affects how much storage is migrated when the\n+# \tblock migration capability is enabled. When false, the entire\n+# \tstorage backing chain is migrated into a flattened image at\n+# \tthe destination; when true, only the active qcow2 layer is\n+# \tmigrated and the destination must already have access to the\n+# \tsame backing chain as was used on the source. (since 2.10)\n+#\n+# Since: 2.4\n+##\n+# TODO either fuse back into MigrationParameters, or make\n+# MigrationParameters members mandatory\n+{ 'struct': 'MigrateSetParameters',\n+ 'data': { '*compress-level': 'int',\n+ '*compress-threads': 'int',\n+ '*decompress-threads': 'int',\n+ '*cpu-throttle-initial': 'int',\n+ '*cpu-throttle-increment': 'int',\n+ '*tls-creds': 'StrOrNull',\n+ '*tls-hostname': 'StrOrNull',\n+ '*max-bandwidth': 'int',\n+ '*downtime-limit': 'int',\n+ '*x-checkpoint-delay': 'int',\n+ '*block-incremental': 'bool' } }\n+\n+##\n+# @migrate-set-parameters:\n+#\n+# Set various migration parameters.\n+#\n+# Since: 2.4\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"migrate-set-parameters\" ,\n+# \"arguments\": { \"compress-level\": 1 } }\n+#\n+##\n+{ 'command': 'migrate-set-parameters', 'boxed': true,\n+ 'data': 'MigrateSetParameters' }\n+\n+##\n+# @MigrationParameters:\n+#\n+# The optional members aren't actually optional.\n+#\n+# @compress-level: compression level\n+#\n+# @compress-threads: compression thread count\n+#\n+# @decompress-threads: decompression thread count\n+#\n+# @cpu-throttle-initial: Initial percentage of time guest cpus are\n+# throttled when migration auto-converge is activated.\n+# (Since 2.7)\n+#\n+# @cpu-throttle-increment: throttle percentage increase each time\n+# auto-converge detects that migration is not making\n+# progress. (Since 2.7)\n+#\n+# @tls-creds: ID of the 'tls-creds' object that provides credentials\n+# for establishing a TLS connection over the migration data\n+# channel. On the outgoing side of the migration, the credentials\n+# must be for a 'client' endpoint, while for the incoming side the\n+# credentials must be for a 'server' endpoint.\n+# An empty string means that QEMU will use plain text mode for\n+# migration, rather than TLS (Since 2.7)\n+# Note: 2.8 reports this by omitting tls-creds instead.\n+#\n+# @tls-hostname: hostname of the target host for the migration. This\n+# is required when using x509 based TLS credentials and the\n+# migration URI does not already include a hostname. For\n+# example if using fd: or exec: based migration, the\n+# hostname must be provided so that the server's x509\n+# certificate identity can be validated. (Since 2.7)\n+# An empty string means that QEMU will use the hostname\n+# associated with the migration URI, if any. (Since 2.9)\n+# Note: 2.8 reports this by omitting tls-hostname instead.\n+#\n+# @max-bandwidth: to set maximum speed for migration. maximum speed in\n+# bytes per second. (Since 2.8)\n+#\n+# @downtime-limit: set maximum tolerated downtime for migration. maximum\n+# downtime in milliseconds (Since 2.8)\n+#\n+# @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)\n+#\n+# @block-incremental: Affects how much storage is migrated when the\n+# \tblock migration capability is enabled. When false, the entire\n+# \tstorage backing chain is migrated into a flattened image at\n+# \tthe destination; when true, only the active qcow2 layer is\n+# \tmigrated and the destination must already have access to the\n+# \tsame backing chain as was used on the source. (since 2.10)\n+#\n+# Since: 2.4\n+##\n+{ 'struct': 'MigrationParameters',\n+ 'data': { '*compress-level': 'int',\n+ '*compress-threads': 'int',\n+ '*decompress-threads': 'int',\n+ '*cpu-throttle-initial': 'int',\n+ '*cpu-throttle-increment': 'int',\n+ '*tls-creds': 'str',\n+ '*tls-hostname': 'str',\n+ '*max-bandwidth': 'int',\n+ '*downtime-limit': 'int',\n+ '*x-checkpoint-delay': 'int',\n+ '*block-incremental': 'bool' } }\n+\n+##\n+# @query-migrate-parameters:\n+#\n+# Returns information about the current migration parameters\n+#\n+# Returns: @MigrationParameters\n+#\n+# Since: 2.4\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"query-migrate-parameters\" }\n+# <- { \"return\": {\n+# \"decompress-threads\": 2,\n+# \"cpu-throttle-increment\": 10,\n+# \"compress-threads\": 8,\n+# \"compress-level\": 1,\n+# \"cpu-throttle-initial\": 20,\n+# \"max-bandwidth\": 33554432,\n+# \"downtime-limit\": 300\n+# }\n+# }\n+#\n+##\n+{ 'command': 'query-migrate-parameters',\n+ 'returns': 'MigrationParameters' }\n+\n+##\n+# @client_migrate_info:\n+#\n+# Set migration information for remote display. This makes the server\n+# ask the client to automatically reconnect using the new parameters\n+# once migration finished successfully. Only implemented for SPICE.\n+#\n+# @protocol: must be \"spice\"\n+# @hostname: migration target hostname\n+# @port: spice tcp port for plaintext channels\n+# @tls-port: spice tcp port for tls-secured channels\n+# @cert-subject: server certificate subject\n+#\n+# Since: 0.14.0\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"client_migrate_info\",\n+# \"arguments\": { \"protocol\": \"spice\",\n+# \"hostname\": \"virt42.lab.kraxel.org\",\n+# \"port\": 1234 } }\n+# <- { \"return\": {} }\n+#\n+##\n+{ 'command': 'client_migrate_info',\n+ 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',\n+ '*tls-port': 'int', '*cert-subject': 'str' } }\n+\n+##\n+# @migrate-start-postcopy:\n+#\n+# Followup to a migration command to switch the migration to postcopy mode.\n+# The postcopy-ram capability must be set before the original migration\n+# command.\n+#\n+# Since: 2.5\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"migrate-start-postcopy\" }\n+# <- { \"return\": {} }\n+#\n+##\n+{ 'command': 'migrate-start-postcopy' }\n+\n+##\n+# @MIGRATION:\n+#\n+# Emitted when a migration event happens\n+#\n+# @status: @MigrationStatus describing the current migration status.\n+#\n+# Since: 2.4\n+#\n+# Example:\n+#\n+# <- {\"timestamp\": {\"seconds\": 1432121972, \"microseconds\": 744001},\n+# \"event\": \"MIGRATION\",\n+# \"data\": {\"status\": \"completed\"} }\n+#\n+##\n+{ 'event': 'MIGRATION',\n+ 'data': {'status': 'MigrationStatus'}}\n+\n+##\n+# @MIGRATION_PASS:\n+#\n+# Emitted from the source side of a migration at the start of each pass\n+# (when it syncs the dirty bitmap)\n+#\n+# @pass: An incrementing count (starting at 1 on the first pass)\n+#\n+# Since: 2.6\n+#\n+# Example:\n+#\n+# { \"timestamp\": {\"seconds\": 1449669631, \"microseconds\": 239225},\n+# \"event\": \"MIGRATION_PASS\", \"data\": {\"pass\": 2} }\n+#\n+##\n+{ 'event': 'MIGRATION_PASS',\n+ 'data': { 'pass': 'int' } }\n+\n+##\n+# @COLOMessage:\n+#\n+# The message transmission between Primary side and Secondary side.\n+#\n+# @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing\n+#\n+# @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing\n+#\n+# @checkpoint-reply: SVM gets PVM's checkpoint request\n+#\n+# @vmstate-send: VM's state will be sent by PVM.\n+#\n+# @vmstate-size: The total size of VMstate.\n+#\n+# @vmstate-received: VM's state has been received by SVM.\n+#\n+# @vmstate-loaded: VM's state has been loaded by SVM.\n+#\n+# Since: 2.8\n+##\n+{ 'enum': 'COLOMessage',\n+ 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',\n+ 'vmstate-send', 'vmstate-size', 'vmstate-received',\n+ 'vmstate-loaded' ] }\n+\n+##\n+# @COLOMode:\n+#\n+# The colo mode\n+#\n+# @unknown: unknown mode\n+#\n+# @primary: master side\n+#\n+# @secondary: slave side\n+#\n+# Since: 2.8\n+##\n+{ 'enum': 'COLOMode',\n+ 'data': [ 'unknown', 'primary', 'secondary'] }\n+\n+##\n+# @FailoverStatus:\n+#\n+# An enumeration of COLO failover status\n+#\n+# @none: no failover has ever happened\n+#\n+# @require: got failover requirement but not handled\n+#\n+# @active: in the process of doing failover\n+#\n+# @completed: finish the process of failover\n+#\n+# @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)\n+#\n+# Since: 2.8\n+##\n+{ 'enum': 'FailoverStatus',\n+ 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }\n+\n+##\n+# @x-colo-lost-heartbeat:\n+#\n+# Tell qemu that heartbeat is lost, request it to do takeover procedures.\n+# If this command is sent to the PVM, the Primary side will exit COLO mode.\n+# If sent to the Secondary, the Secondary side will run failover work,\n+# then takes over server operation to become the service VM.\n+#\n+# Since: 2.8\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"x-colo-lost-heartbeat\" }\n+# <- { \"return\": {} }\n+#\n+##\n+{ 'command': 'x-colo-lost-heartbeat' }\n+\n+##\n+# @migrate_cancel:\n+#\n+# Cancel the current executing migration process.\n+#\n+# Returns: nothing on success\n+#\n+# Notes: This command succeeds even if there is no migration process running.\n+#\n+# Since: 0.14.0\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"migrate_cancel\" }\n+# <- { \"return\": {} }\n+#\n+##\n+{ 'command': 'migrate_cancel' }\n+\n+##\n+# @migrate_set_downtime:\n+#\n+# Set maximum tolerated downtime for migration.\n+#\n+# @value: maximum downtime in seconds\n+#\n+# Returns: nothing on success\n+#\n+# Notes: This command is deprecated in favor of 'migrate-set-parameters'\n+#\n+# Since: 0.14.0\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"migrate_set_downtime\", \"arguments\": { \"value\": 0.1 } }\n+# <- { \"return\": {} }\n+#\n+##\n+{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }\n+\n+##\n+# @migrate_set_speed:\n+#\n+# Set maximum speed for migration.\n+#\n+# @value: maximum speed in bytes per second.\n+#\n+# Returns: nothing on success\n+#\n+# Notes: This command is deprecated in favor of 'migrate-set-parameters'\n+#\n+# Since: 0.14.0\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"migrate_set_speed\", \"arguments\": { \"value\": 1024 } }\n+# <- { \"return\": {} }\n+#\n+##\n+{ 'command': 'migrate_set_speed', 'data': {'value': 'int'} }\n+\n+##\n+# @migrate-set-cache-size:\n+#\n+# Set cache size to be used by XBZRLE migration\n+#\n+# @value: cache size in bytes\n+#\n+# The size will be rounded down to the nearest power of 2.\n+# The cache size can be modified before and during ongoing migration\n+#\n+# Returns: nothing on success\n+#\n+# Since: 1.2\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"migrate-set-cache-size\",\n+# \"arguments\": { \"value\": 536870912 } }\n+# <- { \"return\": {} }\n+#\n+##\n+{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }\n+\n+##\n+# @query-migrate-cache-size:\n+#\n+# Query migration XBZRLE cache size\n+#\n+# Returns: XBZRLE cache size in bytes\n+#\n+# Since: 1.2\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"query-migrate-cache-size\" }\n+# <- { \"return\": 67108864 }\n+#\n+##\n+{ 'command': 'query-migrate-cache-size', 'returns': 'int' }\n+\n+##\n+# @migrate:\n+#\n+# Migrates the current running guest to another Virtual Machine.\n+#\n+# @uri: the Uniform Resource Identifier of the destination VM\n+#\n+# @blk: do block migration (full disk copy)\n+#\n+# @inc: incremental disk copy migration\n+#\n+# @detach: this argument exists only for compatibility reasons and\n+# is ignored by QEMU\n+#\n+# Returns: nothing on success\n+#\n+# Since: 0.14.0\n+#\n+# Notes:\n+#\n+# 1. The 'query-migrate' command should be used to check migration's progress\n+# and final result (this information is provided by the 'status' member)\n+#\n+# 2. All boolean arguments default to false\n+#\n+# 3. The user Monitor's \"detach\" argument is invalid in QMP and should not\n+# be used\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"migrate\", \"arguments\": { \"uri\": \"tcp:0:4446\" } }\n+# <- { \"return\": {} }\n+#\n+##\n+{ 'command': 'migrate',\n+ 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }\n+\n+##\n+# @migrate-incoming:\n+#\n+# Start an incoming migration, the qemu must have been started\n+# with -incoming defer\n+#\n+# @uri: The Uniform Resource Identifier identifying the source or\n+# address to listen on\n+#\n+# Returns: nothing on success\n+#\n+# Since: 2.3\n+#\n+# Notes:\n+#\n+# 1. It's a bad idea to use a string for the uri, but it needs to stay\n+# compatible with -incoming and the format of the uri is already exposed\n+# above libvirt.\n+#\n+# 2. QEMU must be started with -incoming defer to allow migrate-incoming to\n+# be used.\n+#\n+# 3. The uri format is the same as for -incoming\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"migrate-incoming\",\n+# \"arguments\": { \"uri\": \"tcp::4446\" } }\n+# <- { \"return\": {} }\n+#\n+##\n+{ 'command': 'migrate-incoming', 'data': {'uri': 'str' } }\n+\n+##\n+# @xen-save-devices-state:\n+#\n+# Save the state of all devices to file. The RAM and the block devices\n+# of the VM are not saved by this command.\n+#\n+# @filename: the file to save the state of the devices to as binary\n+# data. See xen-save-devices-state.txt for a description of the binary\n+# format.\n+#\n+# Returns: Nothing on success\n+#\n+# Since: 1.1\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"xen-save-devices-state\",\n+# \"arguments\": { \"filename\": \"/tmp/save\" } }\n+# <- { \"return\": {} }\n+#\n+##\n+{ 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }\n+\n+##\n+# @xen-set-replication:\n+#\n+# Enable or disable replication.\n+#\n+# @enable: true to enable, false to disable.\n+#\n+# @primary: true for primary or false for secondary.\n+#\n+# @failover: true to do failover, false to stop. but cannot be\n+# specified if 'enable' is true. default value is false.\n+#\n+# Returns: nothing.\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"xen-set-replication\",\n+# \"arguments\": {\"enable\": true, \"primary\": false} }\n+# <- { \"return\": {} }\n+#\n+# Since: 2.9\n+##\n+{ 'command': 'xen-set-replication',\n+ 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }\n+\n+##\n+# @ReplicationStatus:\n+#\n+# The result format for 'query-xen-replication-status'.\n+#\n+# @error: true if an error happened, false if replication is normal.\n+#\n+# @desc: the human readable error description string, when\n+# @error is 'true'.\n+#\n+# Since: 2.9\n+##\n+{ 'struct': 'ReplicationStatus',\n+ 'data': { 'error': 'bool', '*desc': 'str' } }\n+\n+##\n+# @query-xen-replication-status:\n+#\n+# Query replication status while the vm is running.\n+#\n+# Returns: A @ReplicationResult object showing the status.\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"query-xen-replication-status\" }\n+# <- { \"return\": { \"error\": false } }\n+#\n+# Since: 2.9\n+##\n+{ 'command': 'query-xen-replication-status',\n+ 'returns': 'ReplicationStatus' }\n+\n+##\n+# @xen-colo-do-checkpoint:\n+#\n+# Xen uses this command to notify replication to trigger a checkpoint.\n+#\n+# Returns: nothing.\n+#\n+# Example:\n+#\n+# -> { \"execute\": \"xen-colo-do-checkpoint\" }\n+# <- { \"return\": {} }\n+#\n+# Since: 2.9\n+##\n+{ 'command': 'xen-colo-do-checkpoint' }\n", "prefixes": [ "PULL", "v2", "24/47" ] }