All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v6 0/1] Introduce "xen-load-devices-state"
@ 2016-06-03  9:58 Changlong Xie
  2016-06-03  9:58 ` [Qemu-devel] [PATCH v6 1/1] " Changlong Xie
  2016-06-30  7:50 ` [Qemu-devel] [PATCH v6 0/1] " Changlong Xie
  0 siblings, 2 replies; 6+ messages in thread
From: Changlong Xie @ 2016-06-03  9:58 UTC (permalink / raw)
  To: qemu devel, Stefano Stabellini, Anthony PERARD, Juan Quintela,
	Amit Shah, Eric Blake, Markus Armbruster
  Cc: Dr. David Alan Gilbert, Wen Congyang, Changlong Xie, zhanghailiang

Changelog
v6:
1. Fix channel open flag
v5:
1. Introduce qio channel since 8925839f
v4:
1. Rebased to the lastest code
v3:
1. Addressed on David's commets, fix a bug
v2:
1. Rebased to the lastest code
2. Addressed on Eric's comments, fixed coding style

Wen Congyang (1):
  Introduce "xen-load-devices-state"

 migration/savevm.c | 37 +++++++++++++++++++++++++++++++++++++
 qapi-schema.json   | 14 ++++++++++++++
 qmp-commands.hx    | 27 +++++++++++++++++++++++++++
 3 files changed, 78 insertions(+)

-- 
1.9.3

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PATCH v6 1/1] Introduce "xen-load-devices-state"
  2016-06-03  9:58 [Qemu-devel] [PATCH v6 0/1] Introduce "xen-load-devices-state" Changlong Xie
@ 2016-06-03  9:58 ` Changlong Xie
  2016-06-03 10:33   ` Anthony PERARD
  2016-06-30  7:50 ` [Qemu-devel] [PATCH v6 0/1] " Changlong Xie
  1 sibling, 1 reply; 6+ messages in thread
From: Changlong Xie @ 2016-06-03  9:58 UTC (permalink / raw)
  To: qemu devel, Stefano Stabellini, Anthony PERARD, Juan Quintela,
	Amit Shah, Eric Blake, Markus Armbruster
  Cc: Dr. David Alan Gilbert, Wen Congyang, Changlong Xie, zhanghailiang

From: Wen Congyang <wency@cn.fujitsu.com>

Introduce a "xen-load-devices-state" QAPI command that can be used to
load the state of all devices, but not the RAM or the block devices of
the VM.

We only have hmp commands savevm/loadvm, and qmp commands
xen-save-devices-state.

We use this new command for COLO:
1. suspend both primary vm and secondary vm
2. sync the state
3. resume both primary vm and secondary vm

In such case, we need to update all devices' state in any time.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
---
 migration/savevm.c | 37 +++++++++++++++++++++++++++++++++++++
 qapi-schema.json   | 14 ++++++++++++++
 qmp-commands.hx    | 27 +++++++++++++++++++++++++++
 3 files changed, 78 insertions(+)

diff --git a/migration/savevm.c b/migration/savevm.c
index 6c21231..ae2ef8b 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -31,6 +31,7 @@
 #include "hw/boards.h"
 #include "hw/hw.h"
 #include "hw/qdev.h"
+#include "hw/xen/xen.h"
 #include "net/net.h"
 #include "monitor/monitor.h"
 #include "sysemu/sysemu.h"
@@ -1754,6 +1755,12 @@ qemu_loadvm_section_start_full(QEMUFile *f, MigrationIncomingState *mis)
         return -EINVAL;
     }
 
+    /* Validate if it is a device's state */
+    if (xen_enabled() && se->is_ram) {
+        error_report("loadvm: %s RAM loading not allowed on Xen", idstr);
+        return -EINVAL;
+    }
+
     /* Add entry */
     le = g_malloc0(sizeof(*le));
 
@@ -2064,6 +2071,36 @@ void qmp_xen_save_devices_state(const char *filename, Error **errp)
     }
 }
 
+void qmp_xen_load_devices_state(const char *filename, Error **errp)
+{
+    QEMUFile *f;
+    QIOChannelFile *ioc;
+    int ret;
+
+    /* Guest must be paused before loading the device state; the RAM state
+     * will already have been loaded by xc
+     */
+    if (runstate_is_running()) {
+        error_setg(errp, "Cannot update device state while vm is running");
+        return;
+    }
+    vm_stop(RUN_STATE_RESTORE_VM);
+
+    ioc = qio_channel_file_new_path(filename, O_RDONLY | O_BINARY, 0, errp);
+    if (!ioc) {
+        return;
+    }
+    f = qemu_fopen_channel_input(QIO_CHANNEL(ioc));
+
+    migration_incoming_state_new(f);
+    ret = qemu_loadvm_state(f);
+    qemu_fclose(f);
+    if (ret < 0) {
+        error_setg(errp, QERR_IO_ERROR);
+    }
+    migration_incoming_state_destroy();
+}
+
 int load_vmstate(const char *name)
 {
     BlockDriverState *bs, *bs_vm_state;
diff --git a/qapi-schema.json b/qapi-schema.json
index 8483bdf..48c3a6f 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4201,6 +4201,20 @@
   '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
+##
+{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
+
+##
 # @GICCapability:
 #
 # The struct describes capability for a specific GIC (Generic
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 28801a2..780e7f2 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -587,6 +587,33 @@ Example:
 EQMP
 
     {
+        .name       = "xen-load-devices-state",
+        .args_type  = "filename:F",
+        .mhandler.cmd_new = qmp_marshal_xen_load_devices_state,
+    },
+
+SQMP
+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": {} }
+
+EQMP
+
+    {
         .name       = "xen-set-global-dirty-log",
         .args_type  = "enable:b",
         .mhandler.cmd_new = qmp_marshal_xen_set_global_dirty_log,
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH v6 1/1] Introduce "xen-load-devices-state"
  2016-06-03  9:58 ` [Qemu-devel] [PATCH v6 1/1] " Changlong Xie
@ 2016-06-03 10:33   ` Anthony PERARD
  2016-06-13 10:08     ` Stefano Stabellini
  0 siblings, 1 reply; 6+ messages in thread
From: Anthony PERARD @ 2016-06-03 10:33 UTC (permalink / raw)
  To: Changlong Xie
  Cc: qemu devel, Stefano Stabellini, Juan Quintela, Amit Shah,
	Eric Blake, Markus Armbruster, Dr. David Alan Gilbert,
	Wen Congyang, zhanghailiang

On Fri, Jun 03, 2016 at 05:58:34PM +0800, Changlong Xie wrote:
> From: Wen Congyang <wency@cn.fujitsu.com>
> 
> Introduce a "xen-load-devices-state" QAPI command that can be used to
> load the state of all devices, but not the RAM or the block devices of
> the VM.
> 
> We only have hmp commands savevm/loadvm, and qmp commands
> xen-save-devices-state.
> 
> We use this new command for COLO:
> 1. suspend both primary vm and secondary vm
> 2. sync the state
> 3. resume both primary vm and secondary vm
> 
> In such case, we need to update all devices' state in any time.
> 
> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
> Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com>

Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks,

> ---
>  migration/savevm.c | 37 +++++++++++++++++++++++++++++++++++++
>  qapi-schema.json   | 14 ++++++++++++++
>  qmp-commands.hx    | 27 +++++++++++++++++++++++++++
>  3 files changed, 78 insertions(+)
> 
> diff --git a/migration/savevm.c b/migration/savevm.c
> index 6c21231..ae2ef8b 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -31,6 +31,7 @@
>  #include "hw/boards.h"
>  #include "hw/hw.h"
>  #include "hw/qdev.h"
> +#include "hw/xen/xen.h"
>  #include "net/net.h"
>  #include "monitor/monitor.h"
>  #include "sysemu/sysemu.h"
> @@ -1754,6 +1755,12 @@ qemu_loadvm_section_start_full(QEMUFile *f, MigrationIncomingState *mis)
>          return -EINVAL;
>      }
>  
> +    /* Validate if it is a device's state */
> +    if (xen_enabled() && se->is_ram) {
> +        error_report("loadvm: %s RAM loading not allowed on Xen", idstr);
> +        return -EINVAL;
> +    }
> +
>      /* Add entry */
>      le = g_malloc0(sizeof(*le));
>  
> @@ -2064,6 +2071,36 @@ void qmp_xen_save_devices_state(const char *filename, Error **errp)
>      }
>  }
>  
> +void qmp_xen_load_devices_state(const char *filename, Error **errp)
> +{
> +    QEMUFile *f;
> +    QIOChannelFile *ioc;
> +    int ret;
> +
> +    /* Guest must be paused before loading the device state; the RAM state
> +     * will already have been loaded by xc
> +     */
> +    if (runstate_is_running()) {
> +        error_setg(errp, "Cannot update device state while vm is running");
> +        return;
> +    }
> +    vm_stop(RUN_STATE_RESTORE_VM);
> +
> +    ioc = qio_channel_file_new_path(filename, O_RDONLY | O_BINARY, 0, errp);
> +    if (!ioc) {
> +        return;
> +    }
> +    f = qemu_fopen_channel_input(QIO_CHANNEL(ioc));
> +
> +    migration_incoming_state_new(f);
> +    ret = qemu_loadvm_state(f);
> +    qemu_fclose(f);
> +    if (ret < 0) {
> +        error_setg(errp, QERR_IO_ERROR);
> +    }
> +    migration_incoming_state_destroy();
> +}
> +
>  int load_vmstate(const char *name)
>  {
>      BlockDriverState *bs, *bs_vm_state;
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 8483bdf..48c3a6f 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -4201,6 +4201,20 @@
>    '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
> +##
> +{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
> +
> +##
>  # @GICCapability:
>  #
>  # The struct describes capability for a specific GIC (Generic
> diff --git a/qmp-commands.hx b/qmp-commands.hx
> index 28801a2..780e7f2 100644
> --- a/qmp-commands.hx
> +++ b/qmp-commands.hx
> @@ -587,6 +587,33 @@ Example:
>  EQMP
>  
>      {
> +        .name       = "xen-load-devices-state",
> +        .args_type  = "filename:F",
> +        .mhandler.cmd_new = qmp_marshal_xen_load_devices_state,
> +    },
> +
> +SQMP
> +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": {} }
> +
> +EQMP
> +
> +    {
>          .name       = "xen-set-global-dirty-log",
>          .args_type  = "enable:b",
>          .mhandler.cmd_new = qmp_marshal_xen_set_global_dirty_log,
> -- 
> 1.9.3
> 
> 
> 

-- 
Anthony PERARD

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH v6 1/1] Introduce "xen-load-devices-state"
  2016-06-03 10:33   ` Anthony PERARD
@ 2016-06-13 10:08     ` Stefano Stabellini
  2016-06-13 10:38       ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 6+ messages in thread
From: Stefano Stabellini @ 2016-06-13 10:08 UTC (permalink / raw)
  To: Dr. David Alan Gilbert
  Cc: Changlong Xie, qemu devel, Stefano Stabellini, Juan Quintela,
	Amit Shah, Eric Blake, Markus Armbruster, Wen Congyang,
	zhanghailiang, Anthony PERARD

On Fri, 3 Jun 2016, Anthony PERARD wrote:
> On Fri, Jun 03, 2016 at 05:58:34PM +0800, Changlong Xie wrote:
> > From: Wen Congyang <wency@cn.fujitsu.com>
> > 
> > Introduce a "xen-load-devices-state" QAPI command that can be used to
> > load the state of all devices, but not the RAM or the block devices of
> > the VM.
> > 
> > We only have hmp commands savevm/loadvm, and qmp commands
> > xen-save-devices-state.
> > 
> > We use this new command for COLO:
> > 1. suspend both primary vm and secondary vm
> > 2. sync the state
> > 3. resume both primary vm and secondary vm
> > 
> > In such case, we need to update all devices' state in any time.
> > 
> > Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
> > Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
> 
> Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>

David,

can we still have your Ack on this patch?


> > ---
> >  migration/savevm.c | 37 +++++++++++++++++++++++++++++++++++++
> >  qapi-schema.json   | 14 ++++++++++++++
> >  qmp-commands.hx    | 27 +++++++++++++++++++++++++++
> >  3 files changed, 78 insertions(+)
> > 
> > diff --git a/migration/savevm.c b/migration/savevm.c
> > index 6c21231..ae2ef8b 100644
> > --- a/migration/savevm.c
> > +++ b/migration/savevm.c
> > @@ -31,6 +31,7 @@
> >  #include "hw/boards.h"
> >  #include "hw/hw.h"
> >  #include "hw/qdev.h"
> > +#include "hw/xen/xen.h"
> >  #include "net/net.h"
> >  #include "monitor/monitor.h"
> >  #include "sysemu/sysemu.h"
> > @@ -1754,6 +1755,12 @@ qemu_loadvm_section_start_full(QEMUFile *f, MigrationIncomingState *mis)
> >          return -EINVAL;
> >      }
> >  
> > +    /* Validate if it is a device's state */
> > +    if (xen_enabled() && se->is_ram) {
> > +        error_report("loadvm: %s RAM loading not allowed on Xen", idstr);
> > +        return -EINVAL;
> > +    }
> > +
> >      /* Add entry */
> >      le = g_malloc0(sizeof(*le));
> >  
> > @@ -2064,6 +2071,36 @@ void qmp_xen_save_devices_state(const char *filename, Error **errp)
> >      }
> >  }
> >  
> > +void qmp_xen_load_devices_state(const char *filename, Error **errp)
> > +{
> > +    QEMUFile *f;
> > +    QIOChannelFile *ioc;
> > +    int ret;
> > +
> > +    /* Guest must be paused before loading the device state; the RAM state
> > +     * will already have been loaded by xc
> > +     */
> > +    if (runstate_is_running()) {
> > +        error_setg(errp, "Cannot update device state while vm is running");
> > +        return;
> > +    }
> > +    vm_stop(RUN_STATE_RESTORE_VM);
> > +
> > +    ioc = qio_channel_file_new_path(filename, O_RDONLY | O_BINARY, 0, errp);
> > +    if (!ioc) {
> > +        return;
> > +    }
> > +    f = qemu_fopen_channel_input(QIO_CHANNEL(ioc));
> > +
> > +    migration_incoming_state_new(f);
> > +    ret = qemu_loadvm_state(f);
> > +    qemu_fclose(f);
> > +    if (ret < 0) {
> > +        error_setg(errp, QERR_IO_ERROR);
> > +    }
> > +    migration_incoming_state_destroy();
> > +}
> > +
> >  int load_vmstate(const char *name)
> >  {
> >      BlockDriverState *bs, *bs_vm_state;
> > diff --git a/qapi-schema.json b/qapi-schema.json
> > index 8483bdf..48c3a6f 100644
> > --- a/qapi-schema.json
> > +++ b/qapi-schema.json
> > @@ -4201,6 +4201,20 @@
> >    '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
> > +##
> > +{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
> > +
> > +##
> >  # @GICCapability:
> >  #
> >  # The struct describes capability for a specific GIC (Generic
> > diff --git a/qmp-commands.hx b/qmp-commands.hx
> > index 28801a2..780e7f2 100644
> > --- a/qmp-commands.hx
> > +++ b/qmp-commands.hx
> > @@ -587,6 +587,33 @@ Example:
> >  EQMP
> >  
> >      {
> > +        .name       = "xen-load-devices-state",
> > +        .args_type  = "filename:F",
> > +        .mhandler.cmd_new = qmp_marshal_xen_load_devices_state,
> > +    },
> > +
> > +SQMP
> > +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": {} }
> > +
> > +EQMP
> > +
> > +    {
> >          .name       = "xen-set-global-dirty-log",
> >          .args_type  = "enable:b",
> >          .mhandler.cmd_new = qmp_marshal_xen_set_global_dirty_log,
> > -- 
> > 1.9.3
> > 
> > 
> > 
> 
> -- 
> Anthony PERARD
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH v6 1/1] Introduce "xen-load-devices-state"
  2016-06-13 10:08     ` Stefano Stabellini
@ 2016-06-13 10:38       ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2016-06-13 10:38 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Changlong Xie, qemu devel, Juan Quintela, Amit Shah, Eric Blake,
	Markus Armbruster, Wen Congyang, zhanghailiang, Anthony PERARD

* Stefano Stabellini (sstabellini@kernel.org) wrote:
> On Fri, 3 Jun 2016, Anthony PERARD wrote:
> > On Fri, Jun 03, 2016 at 05:58:34PM +0800, Changlong Xie wrote:
> > > From: Wen Congyang <wency@cn.fujitsu.com>
> > > 
> > > Introduce a "xen-load-devices-state" QAPI command that can be used to
> > > load the state of all devices, but not the RAM or the block devices of
> > > the VM.
> > > 
> > > We only have hmp commands savevm/loadvm, and qmp commands
> > > xen-save-devices-state.
> > > 
> > > We use this new command for COLO:
> > > 1. suspend both primary vm and secondary vm
> > > 2. sync the state
> > > 3. resume both primary vm and secondary vm
> > > 
> > > In such case, we need to update all devices' state in any time.
> > > 
> > > Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
> > > Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
> > 
> > Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
> 
> David,
> 
> can we still have your Ack on this patch?

Yes,

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


Dave
> 
> 
> > > ---
> > >  migration/savevm.c | 37 +++++++++++++++++++++++++++++++++++++
> > >  qapi-schema.json   | 14 ++++++++++++++
> > >  qmp-commands.hx    | 27 +++++++++++++++++++++++++++
> > >  3 files changed, 78 insertions(+)
> > > 
> > > diff --git a/migration/savevm.c b/migration/savevm.c
> > > index 6c21231..ae2ef8b 100644
> > > --- a/migration/savevm.c
> > > +++ b/migration/savevm.c
> > > @@ -31,6 +31,7 @@
> > >  #include "hw/boards.h"
> > >  #include "hw/hw.h"
> > >  #include "hw/qdev.h"
> > > +#include "hw/xen/xen.h"
> > >  #include "net/net.h"
> > >  #include "monitor/monitor.h"
> > >  #include "sysemu/sysemu.h"
> > > @@ -1754,6 +1755,12 @@ qemu_loadvm_section_start_full(QEMUFile *f, MigrationIncomingState *mis)
> > >          return -EINVAL;
> > >      }
> > >  
> > > +    /* Validate if it is a device's state */
> > > +    if (xen_enabled() && se->is_ram) {
> > > +        error_report("loadvm: %s RAM loading not allowed on Xen", idstr);
> > > +        return -EINVAL;
> > > +    }
> > > +
> > >      /* Add entry */
> > >      le = g_malloc0(sizeof(*le));
> > >  
> > > @@ -2064,6 +2071,36 @@ void qmp_xen_save_devices_state(const char *filename, Error **errp)
> > >      }
> > >  }
> > >  
> > > +void qmp_xen_load_devices_state(const char *filename, Error **errp)
> > > +{
> > > +    QEMUFile *f;
> > > +    QIOChannelFile *ioc;
> > > +    int ret;
> > > +
> > > +    /* Guest must be paused before loading the device state; the RAM state
> > > +     * will already have been loaded by xc
> > > +     */
> > > +    if (runstate_is_running()) {
> > > +        error_setg(errp, "Cannot update device state while vm is running");
> > > +        return;
> > > +    }
> > > +    vm_stop(RUN_STATE_RESTORE_VM);
> > > +
> > > +    ioc = qio_channel_file_new_path(filename, O_RDONLY | O_BINARY, 0, errp);
> > > +    if (!ioc) {
> > > +        return;
> > > +    }
> > > +    f = qemu_fopen_channel_input(QIO_CHANNEL(ioc));
> > > +
> > > +    migration_incoming_state_new(f);
> > > +    ret = qemu_loadvm_state(f);
> > > +    qemu_fclose(f);
> > > +    if (ret < 0) {
> > > +        error_setg(errp, QERR_IO_ERROR);
> > > +    }
> > > +    migration_incoming_state_destroy();
> > > +}
> > > +
> > >  int load_vmstate(const char *name)
> > >  {
> > >      BlockDriverState *bs, *bs_vm_state;
> > > diff --git a/qapi-schema.json b/qapi-schema.json
> > > index 8483bdf..48c3a6f 100644
> > > --- a/qapi-schema.json
> > > +++ b/qapi-schema.json
> > > @@ -4201,6 +4201,20 @@
> > >    '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
> > > +##
> > > +{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
> > > +
> > > +##
> > >  # @GICCapability:
> > >  #
> > >  # The struct describes capability for a specific GIC (Generic
> > > diff --git a/qmp-commands.hx b/qmp-commands.hx
> > > index 28801a2..780e7f2 100644
> > > --- a/qmp-commands.hx
> > > +++ b/qmp-commands.hx
> > > @@ -587,6 +587,33 @@ Example:
> > >  EQMP
> > >  
> > >      {
> > > +        .name       = "xen-load-devices-state",
> > > +        .args_type  = "filename:F",
> > > +        .mhandler.cmd_new = qmp_marshal_xen_load_devices_state,
> > > +    },
> > > +
> > > +SQMP
> > > +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": {} }
> > > +
> > > +EQMP
> > > +
> > > +    {
> > >          .name       = "xen-set-global-dirty-log",
> > >          .args_type  = "enable:b",
> > >          .mhandler.cmd_new = qmp_marshal_xen_set_global_dirty_log,
> > > -- 
> > > 1.9.3
> > > 
> > > 
> > > 
> > 
> > -- 
> > Anthony PERARD
> > 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH v6 0/1] Introduce "xen-load-devices-state"
  2016-06-03  9:58 [Qemu-devel] [PATCH v6 0/1] Introduce "xen-load-devices-state" Changlong Xie
  2016-06-03  9:58 ` [Qemu-devel] [PATCH v6 1/1] " Changlong Xie
@ 2016-06-30  7:50 ` Changlong Xie
  1 sibling, 0 replies; 6+ messages in thread
From: Changlong Xie @ 2016-06-30  7:50 UTC (permalink / raw)
  To: qemu devel, Stefano Stabellini, Anthony PERARD, Juan Quintela,
	Amit Shah, Eric Blake, Markus Armbruster
  Cc: Dr. David Alan Gilbert, Wen Congyang, zhanghailiang

Would any migration maintainer pick this patch or give some comments?

Thanks
	-Xie

On 06/03/2016 05:58 PM, Changlong Xie wrote:
> Changelog
> v6:
> 1. Fix channel open flag
> v5:
> 1. Introduce qio channel since 8925839f
> v4:
> 1. Rebased to the lastest code
> v3:
> 1. Addressed on David's commets, fix a bug
> v2:
> 1. Rebased to the lastest code
> 2. Addressed on Eric's comments, fixed coding style
>
> Wen Congyang (1):
>    Introduce "xen-load-devices-state"
>
>   migration/savevm.c | 37 +++++++++++++++++++++++++++++++++++++
>   qapi-schema.json   | 14 ++++++++++++++
>   qmp-commands.hx    | 27 +++++++++++++++++++++++++++
>   3 files changed, 78 insertions(+)
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-06-30  7:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-03  9:58 [Qemu-devel] [PATCH v6 0/1] Introduce "xen-load-devices-state" Changlong Xie
2016-06-03  9:58 ` [Qemu-devel] [PATCH v6 1/1] " Changlong Xie
2016-06-03 10:33   ` Anthony PERARD
2016-06-13 10:08     ` Stefano Stabellini
2016-06-13 10:38       ` Dr. David Alan Gilbert
2016-06-30  7:50 ` [Qemu-devel] [PATCH v6 0/1] " Changlong Xie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.