qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, david@gibson.dropbear.id.au,
	imammedo@redhat.com, groug@kaod.org, nikunj@linux.vnet.ibm.com,
	pbonzini@redhat.com, Bharata B Rao <bharata@linux.vnet.ibm.com>
Subject: [Qemu-devel] [RFC PATCH v1 5/5] cpu, spapr: Use migration_id from pseries-2.7 onwards
Date: Wed,  6 Jul 2016 14:29:21 +0530	[thread overview]
Message-ID: <1467795561-1007-6-git-send-email-bharata@linux.vnet.ibm.com> (raw)
In-Reply-To: <1467795561-1007-1-git-send-email-bharata@linux.vnet.ibm.com>

Turn on use-migration-id property. Starting from pseries-2.7, prefer the
use of migration_id (cpu_dt_id) over cpu_index for cpu vmstate registration
and in XICS code.

This allows migration to work when CPU cores are not necessarily
unplugged in LIFO order.

TODO: Property use-migration-id is by default turned on, check
if this needs to turned off for older machine type versions of
all archs.

Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
---
 hw/ppc/spapr.c | 5 +++++
 qom/cpu.c      | 1 +
 2 files changed, 6 insertions(+)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 7f33a1b..be9af10 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2501,6 +2501,11 @@ DEFINE_SPAPR_MACHINE(2_7, "2.7", true);
         .driver   = TYPE_SPAPR_PCI_HOST_BRIDGE,\
         .property = "ddw",\
         .value    = stringify(off),\
+    }, \
+    { \
+        .driver   = TYPE_CPU,\
+        .property = "use-migration-id",\
+        .value    = stringify(off),\
     },
 
 static void spapr_machine_2_6_instance_options(MachineState *machine)
diff --git a/qom/cpu.c b/qom/cpu.c
index 01cf136..e505810 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -351,6 +351,7 @@ static void cpu_common_initfn(Object *obj)
     object_property_add_bool(obj, "use-migration-id",
                              cpu_common_get_use_migration_id,
                              cpu_common_set_use_migration_id, NULL);
+    object_property_set_bool(obj, true, "use-migration-id", NULL);
 }
 
 static void cpu_common_finalize(Object *obj)
-- 
2.7.4

  parent reply	other threads:[~2016-07-06  8:59 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06  8:59 [Qemu-devel] [RFC PATCH v1 0/5] sPAPR: Fix migration when CPUs are removed in random order Bharata B Rao
2016-07-06  8:59 ` [Qemu-devel] [RFC PATCH v1 1/5] cpu, target-ppc: Move cpu_vmstate_[un]register calls to cpu_common_[un]realize Bharata B Rao
2016-07-06 10:57   ` Igor Mammedov
2016-07-06 14:16     ` Bharata B Rao
2016-07-06 14:44       ` Igor Mammedov
2016-07-06 16:52         ` Bharata B Rao
2016-07-07  0:47   ` David Gibson
2016-07-06  8:59 ` [Qemu-devel] [RFC PATCH v1 2/5] cpu: Introduce CPUState::migration_id Bharata B Rao
2016-07-06 11:34   ` Igor Mammedov
2016-07-06 14:18     ` Bharata B Rao
2016-07-06 14:47       ` Igor Mammedov
2016-07-07  0:53   ` David Gibson
2016-07-06  8:59 ` [Qemu-devel] [RFC PATCH v1 3/5] spapr: Implement CPUClass::get_migration_id() for PowerPC CPUs Bharata B Rao
2016-07-06 12:01   ` Igor Mammedov
2016-07-06 14:21     ` Bharata B Rao
2016-07-06 14:37       ` Greg Kurz
2016-07-07  0:57       ` David Gibson
2016-07-07 12:32         ` Greg Kurz
2016-07-07  0:55     ` David Gibson
2016-07-06 14:35   ` Greg Kurz
2016-07-06 16:53     ` Bharata B Rao
2016-07-07  1:00   ` David Gibson
2016-07-07 13:43     ` [Qemu-devel] [Qemu-ppc] " Mark Cave-Ayland
2016-07-06  8:59 ` [Qemu-devel] [RFC PATCH v1 4/5] xics: Use migration_id instead of cpu_index in XICS code Bharata B Rao
2016-07-06  9:08   ` Nikunj A Dadhania
2016-07-06  8:59 ` Bharata B Rao [this message]
2016-07-06 11:44   ` [Qemu-devel] [RFC PATCH v1 5/5] cpu, spapr: Use migration_id from pseries-2.7 onwards Igor Mammedov
2016-07-06 11:45   ` Igor Mammedov
2016-07-06 14:24     ` Bharata B Rao

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=1467795561-1007-6-git-send-email-bharata@linux.vnet.ibm.com \
    --to=bharata@linux.vnet.ibm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=imammedo@redhat.com \
    --cc=nikunj@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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).