All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/3] Fix migration of old pseries
@ 2016-02-17 16:03 Greg Kurz
  2016-02-17 16:05 ` [Qemu-devel] [PATCH v2 1/3] migration: allow configuration section to be optional Greg Kurz
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Greg Kurz @ 2016-02-17 16:03 UTC (permalink / raw)
  To: Juan Quintela
  Cc: Laurent Vivier, qemu-devel, Dr. David Alan Gilbert, qemu-ppc,
	Amit Shah, David Gibson

QEMU 2.4 broke the migration of old pseries machine with the addition
of configuration sections, which are sent unconditionally.

This series tries to fix the issue by providing knobs to control submission
and reception of configuration sections. It is an alternative to simply
skipping configuration for older machines (as it done for x86) because we
don't want to break migration from QEMU 2.4 either.

Patches 1 and 2 allow to migrate pseries-2.3 from QEMU 2.3.

Patch 3 is a tentative to support backward migration to QEMU 2.3,
but it needs manual intervention.

With this series, I could migrate a pseries-2.3 from QEMU 2.3 or QEMU 2.4
to current head without manual intervention. I could then migrate it back
either to QEMU 2.3 with suppress-config-section=on or to QEMU 2.4 without
manual intervention.

---

Greg Kurz (3):
      migration: allow configuration section to be optional
      spapr: fix migration of older pseries
      migration: allow to suppress configuration section submission


 hw/core/machine.c   |   43 +++++++++++++++++++++++++++++++++++++++++++
 hw/ppc/spapr.c      |   10 ++++++++++
 include/hw/boards.h |    2 ++
 migration/savevm.c  |   29 ++++++++++++++++++++++-------
 qemu-options.hx     |    4 +++-
 5 files changed, 80 insertions(+), 8 deletions(-)
---
Greg

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

* [Qemu-devel] [PATCH v2 1/3] migration: allow configuration section to be optional
  2016-02-17 16:03 [Qemu-devel] [PATCH v2 0/3] Fix migration of old pseries Greg Kurz
@ 2016-02-17 16:05 ` Greg Kurz
  2016-02-17 16:06 ` [Qemu-devel] [PATCH v2 2/3] spapr: fix migration of older pseries Greg Kurz
  2016-02-17 16:06 ` [Qemu-devel] [PATCH v2 3/3] migration: allow to suppress configuration section submission Greg Kurz
  2 siblings, 0 replies; 8+ messages in thread
From: Greg Kurz @ 2016-02-17 16:05 UTC (permalink / raw)
  To: Juan Quintela
  Cc: Laurent Vivier, qemu-devel, Dr. David Alan Gilbert, qemu-ppc,
	Amit Shah, David Gibson

Since QEMU 2.4, the migration stream begins with a configuration section.
It is known to break migration of pseries machine from older QEMU. It is
possible to fix this in the pseries compat code but it will then break
migration of old pseries from latest QEMU.

As an alternative, this patch introduces a new machine property which
allows to ignore the abscence of configuration section during incoming
migration. It boils to adding:

	-machine require-config-section=off

Using this property only makes sense when migrating from an older
QEMU. It has no effect on outgoing migration.

Suggested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
---
v2: - renamed property to require-config-section
---
 hw/core/machine.c   |   22 ++++++++++++++++++++++
 include/hw/boards.h |    1 +
 migration/savevm.c  |   21 +++++++++++++++------
 qemu-options.hx     |    3 ++-
 4 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/hw/core/machine.c b/hw/core/machine.c
index 6d1a0d8eebc4..7203dd260bf2 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -312,6 +312,21 @@ static bool machine_get_suppress_vmdesc(Object *obj, Error **errp)
     return ms->suppress_vmdesc;
 }
 
+static void machine_set_require_config_section(Object *obj, bool value,
+                                               Error **errp)
+{
+    MachineState *ms = MACHINE(obj);
+
+    ms->require_config_section = value;
+}
+
+static bool machine_get_require_config_section(Object *obj, Error **errp)
+{
+    MachineState *ms = MACHINE(obj);
+
+    return ms->require_config_section;
+}
+
 static int error_on_sysbus_device(SysBusDevice *sbdev, void *opaque)
 {
     error_report("Option '-device %s' cannot be handled by this machine",
@@ -365,6 +380,7 @@ static void machine_initfn(Object *obj)
     ms->kvm_shadow_mem = -1;
     ms->dump_guest_core = true;
     ms->mem_merge = true;
+    ms->require_config_section = true;
 
     object_property_add_str(obj, "accel",
                             machine_get_accel, machine_set_accel, NULL);
@@ -467,6 +483,12 @@ static void machine_initfn(Object *obj)
     object_property_set_description(obj, "suppress-vmdesc",
                                     "Set on to disable self-describing migration",
                                     NULL);
+    object_property_add_bool(obj, "require-config-section",
+                             machine_get_require_config_section,
+                             machine_set_require_config_section, NULL);
+    object_property_set_description(obj, "require-config-section",
+                                    "Set on/off to reject/accept migration without configuration section",
+                                    NULL);
 
     /* Register notifier when init is done for sysbus sanity checks */
     ms->sysbus_notifier.notify = machine_init_notify;
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 0f30959e2e3b..d6ff1ba4c260 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -128,6 +128,7 @@ struct MachineState {
     char *firmware;
     bool iommu;
     bool suppress_vmdesc;
+    bool require_config_section;
 
     ram_addr_t ram_size;
     ram_addr_t maxram_size;
diff --git a/migration/savevm.c b/migration/savevm.c
index 94f2894243ce..f8dee03a3350 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -1847,6 +1847,12 @@ static int qemu_loadvm_state_main(QEMUFile *f, MigrationIncomingState *mis)
     return 0;
 }
 
+static bool must_receive_configuration(void)
+{
+    MachineState *machine = MACHINE(qdev_get_machine());
+    return machine->require_config_section;
+}
+
 int qemu_loadvm_state(QEMUFile *f)
 {
     MigrationIncomingState *mis = migration_incoming_get_current();
@@ -1876,15 +1882,18 @@ int qemu_loadvm_state(QEMUFile *f)
     }
 
     if (!savevm_state.skip_configuration) {
-        if (qemu_get_byte(f) != QEMU_VM_CONFIGURATION) {
+        if (qemu_peek_byte(f, 0) == QEMU_VM_CONFIGURATION) {
+            qemu_file_skip(f, 1);
+            ret = vmstate_load_state(f, &vmstate_configuration, &savevm_state,
+                                     0);
+
+            if (ret) {
+                return ret;
+            }
+        } else if (must_receive_configuration()) {
             error_report("Configuration section missing");
             return -EINVAL;
         }
-        ret = vmstate_load_state(f, &vmstate_configuration, &savevm_state, 0);
-
-        if (ret) {
-            return ret;
-        }
     }
 
     ret = qemu_loadvm_state_main(f, mis);
diff --git a/qemu-options.hx b/qemu-options.hx
index 2f0465eeb1d1..172471c75b1c 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -43,7 +43,8 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
     "                aes-key-wrap=on|off controls support for AES key wrapping (default=on)\n"
     "                dea-key-wrap=on|off controls support for DEA key wrapping (default=on)\n"
     "                suppress-vmdesc=on|off disables self-describing migration (default=off)\n"
-    "                nvdimm=on|off controls NVDIMM support (default=off)\n",
+    "                nvdimm=on|off controls NVDIMM support (default=off)\n"
+    "                require-config-section=on|off incoming migration requires configuration section (default=on)\n",
     QEMU_ARCH_ALL)
 STEXI
 @item -machine [type=]@var{name}[,prop=@var{value}[,...]]

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

* [Qemu-devel] [PATCH v2 2/3] spapr: fix migration of older pseries
  2016-02-17 16:03 [Qemu-devel] [PATCH v2 0/3] Fix migration of old pseries Greg Kurz
  2016-02-17 16:05 ` [Qemu-devel] [PATCH v2 1/3] migration: allow configuration section to be optional Greg Kurz
@ 2016-02-17 16:06 ` Greg Kurz
  2016-02-17 16:06 ` [Qemu-devel] [PATCH v2 3/3] migration: allow to suppress configuration section submission Greg Kurz
  2 siblings, 0 replies; 8+ messages in thread
From: Greg Kurz @ 2016-02-17 16:06 UTC (permalink / raw)
  To: Juan Quintela
  Cc: Laurent Vivier, qemu-devel, Dr. David Alan Gilbert, qemu-ppc,
	Amit Shah, David Gibson

Use the require-config-section machine property to fix migration of older
pseries (version < 2.4) started with an older QEMU (version < 2.4).

Older machines started with QEMU 2.4 are not affected by this change since
they send the configuration section unconditionally.

Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
---
v2: - added comment to explain the migration breakage
    - updated changelog
---
 hw/ppc/spapr.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 5bd8fd3ef842..256d90de8b2c 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2446,6 +2446,16 @@ static void spapr_machine_2_3_instance_options(MachineState *machine)
     spapr_machine_2_4_instance_options(machine);
     savevm_skip_section_footers();
     global_state_set_optional();
+    /* QEMU 2.4 added a configuration section to the migration stream. A
+     * call to savevm_skip_configuration() should have been added here
+     * since pseries-2.3 came with QEMU 2.3. This did not occur.
+     * The consequence is that pseries-2.3 will now always submit a
+     * configuration section by default and cannot be migrated back to
+     * QEMU 2.3.
+     * The require-config-section property allows pseries-2.3 to be migrated
+     * from QEMU 2.3 though.
+     */
+    machine->require_config_section = false;
 }
 
 static void spapr_machine_2_3_class_options(MachineClass *mc)

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

* [Qemu-devel] [PATCH v2 3/3] migration: allow to suppress configuration section submission
  2016-02-17 16:03 [Qemu-devel] [PATCH v2 0/3] Fix migration of old pseries Greg Kurz
  2016-02-17 16:05 ` [Qemu-devel] [PATCH v2 1/3] migration: allow configuration section to be optional Greg Kurz
  2016-02-17 16:06 ` [Qemu-devel] [PATCH v2 2/3] spapr: fix migration of older pseries Greg Kurz
@ 2016-02-17 16:06 ` Greg Kurz
  2016-02-18  2:50   ` David Gibson
  2 siblings, 1 reply; 8+ messages in thread
From: Greg Kurz @ 2016-02-17 16:06 UTC (permalink / raw)
  To: Juan Quintela
  Cc: Laurent Vivier, qemu-devel, Dr. David Alan Gilbert, qemu-ppc,
	Amit Shah, David Gibson

Since the addition of the configuration section in QEMU 2.4, it is impossible
to migrate a pseries-2.3 machine back to QEMU 2.3.

This patch makes it possible thanks to a new machine property which allows to
disable configuration section submission.

To disable submission, just add:

-machine suppress-config-section=on

Alternatively, if the target QEMU version isn't known at startup, this can
be done later from the QEMU monitor with:

qom-set /machine suppress-config-section on

This property won't be automatically set for pseries-2.3 because it would
then break backward migration to QEMU 2.4. If automatic behaviour is needed,
it is up to the tooling to handle this.

Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
---
 hw/core/machine.c   |   21 +++++++++++++++++++++
 include/hw/boards.h |    1 +
 migration/savevm.c  |    8 +++++++-
 qemu-options.hx     |    3 ++-
 4 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/hw/core/machine.c b/hw/core/machine.c
index 7203dd260bf2..ad4ecdc65787 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -327,6 +327,21 @@ static bool machine_get_require_config_section(Object *obj, Error **errp)
     return ms->require_config_section;
 }
 
+static void machine_set_suppress_config_section(Object *obj, bool value,
+                                                Error **errp)
+{
+    MachineState *ms = MACHINE(obj);
+
+    ms->suppress_config_section = value;
+}
+
+static bool machine_get_suppress_config_section(Object *obj, Error **errp)
+{
+    MachineState *ms = MACHINE(obj);
+
+    return ms->suppress_config_section;
+}
+
 static int error_on_sysbus_device(SysBusDevice *sbdev, void *opaque)
 {
     error_report("Option '-device %s' cannot be handled by this machine",
@@ -489,6 +504,12 @@ static void machine_initfn(Object *obj)
     object_property_set_description(obj, "require-config-section",
                                     "Set on/off to reject/accept migration without configuration section",
                                     NULL);
+    object_property_add_bool(obj, "suppress-config-section",
+                             machine_get_suppress_config_section,
+                             machine_set_suppress_config_section, NULL);
+    object_property_set_description(obj, "suppress-config-section",
+                                    "Set on/off to enable/disable configuration section migration",
+                                    NULL);
 
     /* Register notifier when init is done for sysbus sanity checks */
     ms->sysbus_notifier.notify = machine_init_notify;
diff --git a/include/hw/boards.h b/include/hw/boards.h
index d6ff1ba4c260..35aaa6493458 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -129,6 +129,7 @@ struct MachineState {
     bool iommu;
     bool suppress_vmdesc;
     bool require_config_section;
+    bool suppress_config_section;
 
     ram_addr_t ram_size;
     ram_addr_t maxram_size;
diff --git a/migration/savevm.c b/migration/savevm.c
index f8dee03a3350..3fd07efeb38b 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -878,13 +878,19 @@ bool qemu_savevm_state_blocked(Error **errp)
     return false;
 }
 
+static bool should_send_configuration(void)
+{
+    MachineState *machine = MACHINE(qdev_get_machine());
+    return !machine->suppress_config_section;
+}
+
 void qemu_savevm_state_header(QEMUFile *f)
 {
     trace_savevm_state_header();
     qemu_put_be32(f, QEMU_VM_FILE_MAGIC);
     qemu_put_be32(f, QEMU_VM_FILE_VERSION);
 
-    if (!savevm_state.skip_configuration) {
+    if (!savevm_state.skip_configuration && should_send_configuration()) {
         qemu_put_byte(f, QEMU_VM_CONFIGURATION);
         vmstate_save_state(f, &vmstate_configuration, &savevm_state, 0);
     }
diff --git a/qemu-options.hx b/qemu-options.hx
index 172471c75b1c..af08fa8ec314 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -44,7 +44,8 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
     "                dea-key-wrap=on|off controls support for DEA key wrapping (default=on)\n"
     "                suppress-vmdesc=on|off disables self-describing migration (default=off)\n"
     "                nvdimm=on|off controls NVDIMM support (default=off)\n"
-    "                require-config-section=on|off incoming migration requires configuration section (default=on)\n",
+    "                require-config-section=on|off incoming migration requires configuration section (default=on)\n"
+    "                suppress-config-section=on|off disables configuration section migration (default=off)\n",
     QEMU_ARCH_ALL)
 STEXI
 @item -machine [type=]@var{name}[,prop=@var{value}[,...]]

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

* Re: [Qemu-devel] [PATCH v2 3/3] migration: allow to suppress configuration section submission
  2016-02-17 16:06 ` [Qemu-devel] [PATCH v2 3/3] migration: allow to suppress configuration section submission Greg Kurz
@ 2016-02-18  2:50   ` David Gibson
  2016-02-18  6:36     ` Amit Shah
  0 siblings, 1 reply; 8+ messages in thread
From: David Gibson @ 2016-02-18  2:50 UTC (permalink / raw)
  To: Greg Kurz
  Cc: Laurent Vivier, Juan Quintela, qemu-devel,
	Dr. David Alan Gilbert, qemu-ppc, Amit Shah

[-- Attachment #1: Type: text/plain, Size: 5631 bytes --]

On Wed, Feb 17, 2016 at 05:06:43PM +0100, Greg Kurz wrote:
> Since the addition of the configuration section in QEMU 2.4, it is impossible
> to migrate a pseries-2.3 machine back to QEMU 2.3.
> 
> This patch makes it possible thanks to a new machine property which allows to
> disable configuration section submission.
> 
> To disable submission, just add:
> 
> -machine suppress-config-section=on
> 
> Alternatively, if the target QEMU version isn't known at startup, this can
> be done later from the QEMU monitor with:
> 
> qom-set /machine suppress-config-section on
> 
> This property won't be automatically set for pseries-2.3 because it would
> then break backward migration to QEMU 2.4. If automatic behaviour is needed,
> it is up to the tooling to handle this.

As noted elsewhere, I'd actually be ok with enabling it for
pseries-2.3.  Basically we have to chose whether to work against qemu
2.3 or 2.4 out of the box, we can't have both, and it sounds like qemu
2.3 is more widely deployed than qemu 2.4.

> 
> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

I'm not sure whose tree these need to go in via.

> ---
>  hw/core/machine.c   |   21 +++++++++++++++++++++
>  include/hw/boards.h |    1 +
>  migration/savevm.c  |    8 +++++++-
>  qemu-options.hx     |    3 ++-
>  4 files changed, 31 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index 7203dd260bf2..ad4ecdc65787 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -327,6 +327,21 @@ static bool machine_get_require_config_section(Object *obj, Error **errp)
>      return ms->require_config_section;
>  }
>  
> +static void machine_set_suppress_config_section(Object *obj, bool value,
> +                                                Error **errp)
> +{
> +    MachineState *ms = MACHINE(obj);
> +
> +    ms->suppress_config_section = value;
> +}
> +
> +static bool machine_get_suppress_config_section(Object *obj, Error **errp)
> +{
> +    MachineState *ms = MACHINE(obj);
> +
> +    return ms->suppress_config_section;
> +}
> +
>  static int error_on_sysbus_device(SysBusDevice *sbdev, void *opaque)
>  {
>      error_report("Option '-device %s' cannot be handled by this machine",
> @@ -489,6 +504,12 @@ static void machine_initfn(Object *obj)
>      object_property_set_description(obj, "require-config-section",
>                                      "Set on/off to reject/accept migration without configuration section",
>                                      NULL);
> +    object_property_add_bool(obj, "suppress-config-section",
> +                             machine_get_suppress_config_section,
> +                             machine_set_suppress_config_section, NULL);
> +    object_property_set_description(obj, "suppress-config-section",
> +                                    "Set on/off to enable/disable configuration section migration",
> +                                    NULL);
>  
>      /* Register notifier when init is done for sysbus sanity checks */
>      ms->sysbus_notifier.notify = machine_init_notify;
> diff --git a/include/hw/boards.h b/include/hw/boards.h
> index d6ff1ba4c260..35aaa6493458 100644
> --- a/include/hw/boards.h
> +++ b/include/hw/boards.h
> @@ -129,6 +129,7 @@ struct MachineState {
>      bool iommu;
>      bool suppress_vmdesc;
>      bool require_config_section;
> +    bool suppress_config_section;
>  
>      ram_addr_t ram_size;
>      ram_addr_t maxram_size;
> diff --git a/migration/savevm.c b/migration/savevm.c
> index f8dee03a3350..3fd07efeb38b 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -878,13 +878,19 @@ bool qemu_savevm_state_blocked(Error **errp)
>      return false;
>  }
>  
> +static bool should_send_configuration(void)
> +{
> +    MachineState *machine = MACHINE(qdev_get_machine());
> +    return !machine->suppress_config_section;
> +}
> +
>  void qemu_savevm_state_header(QEMUFile *f)
>  {
>      trace_savevm_state_header();
>      qemu_put_be32(f, QEMU_VM_FILE_MAGIC);
>      qemu_put_be32(f, QEMU_VM_FILE_VERSION);
>  
> -    if (!savevm_state.skip_configuration) {
> +    if (!savevm_state.skip_configuration && should_send_configuration()) {
>          qemu_put_byte(f, QEMU_VM_CONFIGURATION);
>          vmstate_save_state(f, &vmstate_configuration, &savevm_state, 0);
>      }
> diff --git a/qemu-options.hx b/qemu-options.hx
> index 172471c75b1c..af08fa8ec314 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -44,7 +44,8 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
>      "                dea-key-wrap=on|off controls support for DEA key wrapping (default=on)\n"
>      "                suppress-vmdesc=on|off disables self-describing migration (default=off)\n"
>      "                nvdimm=on|off controls NVDIMM support (default=off)\n"
> -    "                require-config-section=on|off incoming migration requires configuration section (default=on)\n",
> +    "                require-config-section=on|off incoming migration requires configuration section (default=on)\n"
> +    "                suppress-config-section=on|off disables configuration section migration (default=off)\n",
>      QEMU_ARCH_ALL)
>  STEXI
>  @item -machine [type=]@var{name}[,prop=@var{value}[,...]]
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [Qemu-devel] [PATCH v2 3/3] migration: allow to suppress configuration section submission
  2016-02-18  2:50   ` David Gibson
@ 2016-02-18  6:36     ` Amit Shah
  2016-02-18  9:24       ` Greg Kurz
  0 siblings, 1 reply; 8+ messages in thread
From: Amit Shah @ 2016-02-18  6:36 UTC (permalink / raw)
  To: David Gibson
  Cc: Laurent Vivier, Juan Quintela, qemu-devel,
	Dr. David Alan Gilbert, qemu-ppc, Greg Kurz

On (Thu) 18 Feb 2016 [13:50:25], David Gibson wrote:
> On Wed, Feb 17, 2016 at 05:06:43PM +0100, Greg Kurz wrote:
> > Since the addition of the configuration section in QEMU 2.4, it is impossible
> > to migrate a pseries-2.3 machine back to QEMU 2.3.
> > 
> > This patch makes it possible thanks to a new machine property which allows to
> > disable configuration section submission.
> > 
> > To disable submission, just add:
> > 
> > -machine suppress-config-section=on
> > 
> > Alternatively, if the target QEMU version isn't known at startup, this can
> > be done later from the QEMU monitor with:
> > 
> > qom-set /machine suppress-config-section on
> > 
> > This property won't be automatically set for pseries-2.3 because it would
> > then break backward migration to QEMU 2.4. If automatic behaviour is needed,
> > it is up to the tooling to handle this.
> 
> As noted elsewhere, I'd actually be ok with enabling it for
> pseries-2.3.  Basically we have to chose whether to work against qemu
> 2.3 or 2.4 out of the box, we can't have both, and it sounds like qemu
> 2.3 is more widely deployed than qemu 2.4.
> 
> > 
> > Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
> 
> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> 
> I'm not sure whose tree these need to go in via.

I'd like to see Juan's ack, and I'm fine if you take it via your tree.



		Amit

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

* Re: [Qemu-devel] [PATCH v2 3/3] migration: allow to suppress configuration section submission
  2016-02-18  6:36     ` Amit Shah
@ 2016-02-18  9:24       ` Greg Kurz
  2016-02-18 10:25         ` Laurent Vivier
  0 siblings, 1 reply; 8+ messages in thread
From: Greg Kurz @ 2016-02-18  9:24 UTC (permalink / raw)
  To: Amit Shah
  Cc: Laurent Vivier, Juan Quintela, qemu-devel,
	Dr. David Alan Gilbert, qemu-ppc, David Gibson

On Thu, 18 Feb 2016 12:06:39 +0530
Amit Shah <amit.shah@redhat.com> wrote:

> On (Thu) 18 Feb 2016 [13:50:25], David Gibson wrote:
> > On Wed, Feb 17, 2016 at 05:06:43PM +0100, Greg Kurz wrote:  
> > > Since the addition of the configuration section in QEMU 2.4, it is impossible
> > > to migrate a pseries-2.3 machine back to QEMU 2.3.
> > > 
> > > This patch makes it possible thanks to a new machine property which allows to
> > > disable configuration section submission.
> > > 
> > > To disable submission, just add:
> > > 
> > > -machine suppress-config-section=on
> > > 
> > > Alternatively, if the target QEMU version isn't known at startup, this can
> > > be done later from the QEMU monitor with:
> > > 
> > > qom-set /machine suppress-config-section on
> > > 
> > > This property won't be automatically set for pseries-2.3 because it would
> > > then break backward migration to QEMU 2.4. If automatic behaviour is needed,
> > > it is up to the tooling to handle this.  
> > 
> > As noted elsewhere, I'd actually be ok with enabling it for
> > pseries-2.3.  Basically we have to chose whether to work against qemu
> > 2.3 or 2.4 out of the box, we can't have both, and it sounds like qemu
> > 2.3 is more widely deployed than qemu 2.4.
> >   
> > > 
> > > Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>  
> > 
> > Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> > 
> > I'm not sure whose tree these need to go in via.  
> 
> I'd like to see Juan's ack, and I'm fine if you take it via your tree.
> 
> 
> 
> 		Amit
> 

Hi,

I also have another option I'd like to submit. Basically, this would
be:
- introduce a enforce-config-section machine property which allows to
  override the savevm_state.skip_configuration flag
- update pseries-2.3 to skip configuration section by default (like it
  should have been done in the beginning)

It would fix migration from/to QEMU 2.3 of pseries-2.3 without manual
intervention. Only migration to/from QEMU 2.4/2.5 would require manual
use of the enforce-config-section.

Laurent, is this what you had in mind ?

--
Greg

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

* Re: [Qemu-devel] [PATCH v2 3/3] migration: allow to suppress configuration section submission
  2016-02-18  9:24       ` Greg Kurz
@ 2016-02-18 10:25         ` Laurent Vivier
  0 siblings, 0 replies; 8+ messages in thread
From: Laurent Vivier @ 2016-02-18 10:25 UTC (permalink / raw)
  To: Greg Kurz, Amit Shah
  Cc: Juan Quintela, qemu-ppc, qemu-devel, Dr. David Alan Gilbert,
	David Gibson



On 18/02/2016 10:24, Greg Kurz wrote:
> On Thu, 18 Feb 2016 12:06:39 +0530
> Amit Shah <amit.shah@redhat.com> wrote:
> 
>> On (Thu) 18 Feb 2016 [13:50:25], David Gibson wrote:
>>> On Wed, Feb 17, 2016 at 05:06:43PM +0100, Greg Kurz wrote:  
>>>> Since the addition of the configuration section in QEMU 2.4, it is impossible
>>>> to migrate a pseries-2.3 machine back to QEMU 2.3.
>>>>
>>>> This patch makes it possible thanks to a new machine property which allows to
>>>> disable configuration section submission.
>>>>
>>>> To disable submission, just add:
>>>>
>>>> -machine suppress-config-section=on
>>>>
>>>> Alternatively, if the target QEMU version isn't known at startup, this can
>>>> be done later from the QEMU monitor with:
>>>>
>>>> qom-set /machine suppress-config-section on
>>>>
>>>> This property won't be automatically set for pseries-2.3 because it would
>>>> then break backward migration to QEMU 2.4. If automatic behaviour is needed,
>>>> it is up to the tooling to handle this.  
>>>
>>> As noted elsewhere, I'd actually be ok with enabling it for
>>> pseries-2.3.  Basically we have to chose whether to work against qemu
>>> 2.3 or 2.4 out of the box, we can't have both, and it sounds like qemu
>>> 2.3 is more widely deployed than qemu 2.4.
>>>   
>>>>
>>>> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>  
>>>
>>> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
>>>
>>> I'm not sure whose tree these need to go in via.  
>>
>> I'd like to see Juan's ack, and I'm fine if you take it via your tree.
>>
>>
>>
>> 		Amit
>>
> 
> Hi,
> 
> I also have another option I'd like to submit. Basically, this would
> be:
> - introduce a enforce-config-section machine property which allows to
>   override the savevm_state.skip_configuration flag
> - update pseries-2.3 to skip configuration section by default (like it
>   should have been done in the beginning)
> 
> It would fix migration from/to QEMU 2.3 of pseries-2.3 without manual
> intervention. Only migration to/from QEMU 2.4/2.5 would require manual
> use of the enforce-config-section.
> 
> Laurent, is this what you had in mind ?

Yes :)

If you post a new series with this idea, I'll test it to be sure we
don't introduce new problems.

Laurent

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

end of thread, other threads:[~2016-02-18 10:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-17 16:03 [Qemu-devel] [PATCH v2 0/3] Fix migration of old pseries Greg Kurz
2016-02-17 16:05 ` [Qemu-devel] [PATCH v2 1/3] migration: allow configuration section to be optional Greg Kurz
2016-02-17 16:06 ` [Qemu-devel] [PATCH v2 2/3] spapr: fix migration of older pseries Greg Kurz
2016-02-17 16:06 ` [Qemu-devel] [PATCH v2 3/3] migration: allow to suppress configuration section submission Greg Kurz
2016-02-18  2:50   ` David Gibson
2016-02-18  6:36     ` Amit Shah
2016-02-18  9:24       ` Greg Kurz
2016-02-18 10:25         ` Laurent Vivier

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.