From nobody Mon Feb 9 07:05:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1602504969; cv=none; d=zohomail.com; s=zohoarc; b=n4rivrFz2o1Kn2mgjBW4nZ7LVFhMQjINepdZ+r5S04za09vGqdhNg+NEFP0io5EESFu8KsmlAuG+jreVjpeygO091KFFZIj8ok6r23ExyEQ+v9d/ECtx5ryYDFX3/2aeneVvo0R+lpDjwFZ7HwvnSUWd03QuEHQSpFXnqvK+ilU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602504969; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=eGWvxcwdrYMZ1U8s3C0BMwWriO7oH4iIj3hu/+vjyUQ=; b=JkrvbDwyljGOG6GqhQoV4c2x9Ds9d78LizV+zIueU9z1IxV3Xmns0dgWdRGgkqqtPRQ8WYxSKoDWf27eLMGHUB3ybqweulyD5c4gTEFNiMWWGi91nWqWaETwIab77OO2FD6lmFfzPp4dqJOLH4HQN+aiRi7zjfYp5HFwkx64evA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1602504969119849.0413669314207; Mon, 12 Oct 2020 05:16:09 -0700 (PDT) Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-181-x4Q4ga9jMseP5J9JqxRqpA-1; Mon, 12 Oct 2020 08:16:06 -0400 Received: by mail-wm1-f69.google.com with SMTP id l15so5154395wmh.9 for ; Mon, 12 Oct 2020 05:16:06 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (106.red-83-59-162.dynamicip.rima-tde.net. [83.59.162.106]) by smtp.gmail.com with ESMTPSA id t4sm21334591wra.75.2020.10.12.05.16.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 05:16:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602504968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eGWvxcwdrYMZ1U8s3C0BMwWriO7oH4iIj3hu/+vjyUQ=; b=YLQSZ7CQVMSiKr7PqMXLSKW5S7ynjJNu3z3WSoUeS2j5DsdIpwHRKVJs28sN0tSlmxE0wn PHT//Rb4xdnpVxT9wRnzfJvkL8OLolHn219h1PJhK0flaJdumGTcRzUVDQv39B+Gcj6943 DdMUUlIrntDPFAvrhCqVaoh/D2bCQNk= X-MC-Unique: x4Q4ga9jMseP5J9JqxRqpA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eGWvxcwdrYMZ1U8s3C0BMwWriO7oH4iIj3hu/+vjyUQ=; b=ja3kgVwN7gk0vUvSyZot1Kh1ZiGTa5JPMm/gZDeK6NEhNzTPKixMrNLQXZdXYhdYxd gIE4Wbmpse0uP0u2PdCn+Rg0LdjAbhpEaUWy7FrQOxANor2TZGnfahLBZ8I5qYFn7hLS NDHNqurHNVKyaCfz6i+hVSw7Pl/GuPurpew99XEE55By8pEQbS47HKnJeoPHDaeMZXKt O3PzWJIlLCvAXNLkg0x4tTzEE2PMLl1nZ3UmQFrewFUyJTLrzC7J3ZcGtw2+5WvDIVqM aEK9ZPFafBym0tNhcW04iFy26lPIFQI6qkqX3wg/2wE69vaWgMh72tGQ/ZWQW7e5NW8M lN0g== X-Gm-Message-State: AOAM531dwBK9mHEVlmGGIa3/ig7ZORLcN8aqn25o2uJo3NXxg+JDl3Go 6I62TUVDwm8PRGL93ObJvt5j3CNDdr0B9RBDnKkzcKjPl/TCTgyK19pcQAF8HqZizeQp4XQKAog OwRmS7RJUbfeZ5Q== X-Received: by 2002:a1c:bdc4:: with SMTP id n187mr11195536wmf.185.1602504962597; Mon, 12 Oct 2020 05:16:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVoBK3vIdraNkihHbdy1G43EDRyjn8K86gMv0QE7t1U7YCMFjR7hseHjvHb4G0NoNXa5zFGw== X-Received: by 2002:a1c:bdc4:: with SMTP id n187mr11195524wmf.185.1602504962357; Mon, 12 Oct 2020 05:16:02 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Marcel Apfelbaum , Eduardo Habkost Cc: Markus Armbruster , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr . David Alan Gilbert" Subject: [PATCH v2 5/5] qapi: Restrict Xen migration commands to migration.json Date: Mon, 12 Oct 2020 14:15:36 +0200 Message-Id: <20201012121536.3381997-6-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201012121536.3381997-1-philmd@redhat.com> References: <20201012121536.3381997-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Restricting xen-set-global-dirty-log and xen-load-devices-state commands migration.json pulls slightly less QAPI-generated code into user-mode and tools. Acked-by: Dr. David Alan Gilbert Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- qapi/migration.json | 41 +++++++++++++++++++++++++++++++++++++++++ qapi/misc.json | 41 ----------------------------------------- accel/stubs/xen-stub.c | 2 +- hw/i386/xen/xen-hvm.c | 2 +- migration/savevm.c | 1 - 5 files changed, 43 insertions(+), 44 deletions(-) diff --git a/qapi/migration.json b/qapi/migration.json index 7f5e6fd681a..cb30f4c729b 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1551,6 +1551,47 @@ { 'command': 'xen-save-devices-state', 'data': {'filename': 'str', '*live':'bool' } } =20 +## +# @xen-set-global-dirty-log: +# +# Enable or disable the global dirty log mode. +# +# @enable: true to enable, false to disable. +# +# 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' } } + +## +# @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. +# +# @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. +# +# Since: 2.7 +# +# Example: +# +# -> { "execute": "xen-load-devices-state", +# "arguments": { "filename": "/tmp/resume" } } +# <- { "return": {} } +# +## +{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} } + ## # @xen-set-replication: # diff --git a/qapi/misc.json b/qapi/misc.json index 363115c1edb..40df513856e 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -287,26 +287,6 @@ 'data': {'device': 'str', 'target': 'str', '*arg': 'str'}, 'features': [ 'deprecated' ] } =20 -## -# @xen-set-global-dirty-log: -# -# Enable or disable the global dirty log mode. -# -# @enable: true to enable, false to disable. -# -# 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' } } - ## # @getfd: # @@ -588,24 +568,3 @@ 'data': { '*option': 'str' }, 'returns': ['CommandLineOptionInfo'], 'allow-preconfig': true } - -## -# @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. -# -# @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. -# -# Since: 2.7 -# -# Example: -# -# -> { "execute": "xen-load-devices-state", -# "arguments": { "filename": "/tmp/resume" } } -# <- { "return": {} } -# -## -{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} } diff --git a/accel/stubs/xen-stub.c b/accel/stubs/xen-stub.c index 7ba0b697f49..7054965c480 100644 --- a/accel/stubs/xen-stub.c +++ b/accel/stubs/xen-stub.c @@ -7,7 +7,7 @@ =20 #include "qemu/osdep.h" #include "sysemu/xen.h" -#include "qapi/qapi-commands-misc.h" +#include "qapi/qapi-commands-migration.h" =20 bool xen_allowed; =20 diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index f3ababf33b6..9519c33c098 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -24,7 +24,7 @@ #include "hw/xen/xen-bus.h" #include "hw/xen/xen-x86.h" #include "qapi/error.h" -#include "qapi/qapi-commands-misc.h" +#include "qapi/qapi-commands-migration.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" #include "qemu/range.h" diff --git a/migration/savevm.c b/migration/savevm.c index d2e141f7b1d..ff33e210eb0 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -42,7 +42,6 @@ #include "postcopy-ram.h" #include "qapi/error.h" #include "qapi/qapi-commands-migration.h" -#include "qapi/qapi-commands-misc.h" #include "qapi/qmp/qerror.h" #include "qemu/error-report.h" #include "sysemu/cpus.h" --=20 2.26.2