From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKigQ-0007ct-94 for qemu-devel@nongnu.org; Wed, 06 Jul 2016 04:59:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKigM-000577-QP for qemu-devel@nongnu.org; Wed, 06 Jul 2016 04:59:50 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:11331 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKigM-00056w-Kt for qemu-devel@nongnu.org; Wed, 06 Jul 2016 04:59:46 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u668x1CV039097 for ; Wed, 6 Jul 2016 04:59:46 -0400 Received: from e28smtp08.in.ibm.com (e28smtp08.in.ibm.com [125.16.236.8]) by mx0b-001b2d01.pphosted.com with ESMTP id 240nbyqah0-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 06 Jul 2016 04:59:45 -0400 Received: from localhost by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 6 Jul 2016 14:29:42 +0530 From: Bharata B Rao Date: Wed, 6 Jul 2016 14:29:21 +0530 In-Reply-To: <1467795561-1007-1-git-send-email-bharata@linux.vnet.ibm.com> References: <1467795561-1007-1-git-send-email-bharata@linux.vnet.ibm.com> Message-Id: <1467795561-1007-6-git-send-email-bharata@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC PATCH v1 5/5] cpu, spapr: Use migration_id from pseries-2.7 onwards List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 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 --- 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