qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Juan Quintela <quintela@redhat.com>, Paul Durrant <paul@xen.org>,
	Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Anthony Perard <anthony.perard@citrix.com>,
	xen-devel@lists.xenproject.org,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH 5/5] qapi: Restrict Xen migration commands to migration.json
Date: Fri, 2 Oct 2020 18:04:12 +0100	[thread overview]
Message-ID: <20201002170412.GJ3286@work-vm> (raw)
In-Reply-To: <20201002133923.1716645-6-philmd@redhat.com>

* Philippe Mathieu-Daudé (philmd@redhat.com) wrote:
> 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.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Looks OK; for migration


Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  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 7f5e6fd681..cb30f4c729 100644
> --- a/qapi/migration.json
> +++ b/qapi/migration.json
> @@ -1551,6 +1551,47 @@
>  { 'command': 'xen-save-devices-state',
>    'data': {'filename': 'str', '*live':'bool' } }
>  
> +##
> +# @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 9813893269..afe936b45b 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -287,26 +287,6 @@
>    'data': {'device': 'str', 'target': 'str', '*arg': 'str'},
>    'features': [ 'deprecated' ] }
>  
> -##
> -# @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:
>  #
> @@ -606,24 +586,3 @@
>  ##
>  { 'enum': 'ReplayMode',
>    'data': [ 'none', 'record', 'play' ] }
> -
> -##
> -# @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 7ba0b697f4..7054965c48 100644
> --- a/accel/stubs/xen-stub.c
> +++ b/accel/stubs/xen-stub.c
> @@ -7,7 +7,7 @@
>  
>  #include "qemu/osdep.h"
>  #include "sysemu/xen.h"
> -#include "qapi/qapi-commands-misc.h"
> +#include "qapi/qapi-commands-migration.h"
>  
>  bool xen_allowed;
>  
> diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
> index f3ababf33b..9519c33c09 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 34e4b71052..1fdf3f76c2 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"
> -- 
> 2.26.2
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK



  reply	other threads:[~2020-10-02 17:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 13:39 [PATCH 0/5] qapi: Restrict machine (and migration) specific commands Philippe Mathieu-Daudé
2020-10-02 13:39 ` [PATCH 1/5] qapi: Restrict 'inject-nmi' command to machine code Philippe Mathieu-Daudé
2020-10-02 13:39 ` [PATCH 2/5] qapi: Restrict 'system wakeup/reset/powerdown' commands to machine.json Philippe Mathieu-Daudé
2020-10-02 13:39 ` [PATCH 3/5] qapi: Restrict '(p)memsave' command to machine code Philippe Mathieu-Daudé
2020-10-02 13:39 ` [PATCH 4/5] qapi: Restrict 'query-kvm' " Philippe Mathieu-Daudé
2020-10-02 13:39 ` [PATCH 5/5] qapi: Restrict Xen migration commands to migration.json Philippe Mathieu-Daudé
2020-10-02 17:04   ` Dr. David Alan Gilbert [this message]
2020-10-05  8:01 ` [PATCH 0/5] qapi: Restrict machine (and migration) specific commands Markus Armbruster
2020-10-05  8:46   ` Paolo Bonzini
2020-10-05 10:55     ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201002170412.GJ3286@work-vm \
    --to=dgilbert@redhat.com \
    --cc=anthony.perard@citrix.com \
    --cc=armbru@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=paul@xen.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=rth@twiddle.net \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).