Received: from eggs.gnu.org ([2001:4830:134:3::10]:60725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKIp8-0001LD-Eq for qemu-devel@nongnu.org; Tue, 05 Jul 2016 01:23:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKIp4-0003mu-7m for qemu-devel@nongnu.org; Tue, 05 Jul 2016 01:23:05 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKIp3-0003mA-VN for qemu-devel@nongnu.org; Tue, 05 Jul 2016 01:23:02 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u655JaGd118382 for ; Tue, 5 Jul 2016 01:23:01 -0400 Received: from e23smtp05.au.ibm.com (e23smtp05.au.ibm.com [202.81.31.147]) by mx0a-001b2d01.pphosted.com with ESMTP id 23x6gjpcfy-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 05 Jul 2016 01:23:01 -0400 Received: from localhost by e23smtp05.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 5 Jul 2016 15:22:58 +1000 Date: Tue, 5 Jul 2016 10:52:47 +0530 From: Bharata B Rao Reply-To: bharata@linux.vnet.ibm.com References: <1467693772-7391-1-git-send-email-bharata@linux.vnet.ibm.com> <1467693772-7391-3-git-send-email-bharata@linux.vnet.ibm.com> <20160705045653.GF2251@voom.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160705045653.GF2251@voom.fritz.box> Message-Id: <20160705052247.GB12977@in.ibm.com> Subject: Re: [Qemu-devel] [RFC PATCH v0 2/5] cpu: Optionally use arch_id instead of cpu_index in cpu vmstate_register() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, imammedo@redhat.com, groug@kaod.org, nikunj@linux.vnet.ibm.com, pbonzini@redhat.com On Tue, Jul 05, 2016 at 02:56:53PM +1000, David Gibson wrote: > On Tue, Jul 05, 2016 at 10:12:49AM +0530, Bharata B Rao wrote: > > Introduce CPUState.prefer_arch_id_over_cpu_index and > > MachineClass.prefer_arch_id_over_cpu_index that allow target > > machines to optionally switch to using arch_id instead of cpu_index > > as instance_id in vmstate_register(). This will help allow successful > > migration in cases where holes are introduced in cpu_index range > > after CPU hot removals. > > > > Whether to use arch_id or cpu_index is based on machine type version > > and hence added MachineClass.prefer_arch_id_over_cpu_index. However the > > enforcement is via and during CPU creation and hence added > > CPUState.prefer_arch_id_over_cpu_index. So it becomes a two step > > process for the target to enable the use of arch_id: > > > > 1. Set MachineClass.prefer_arch_id_over_cpu_index. > > 2. Ensure CPUState.prefer_arch_id_over_cpu_index is set for all CPUs > > based on 1. above. > > > > Suggested-by: Igor Mammedov > > Signed-off-by: Bharata B Rao > > How is migration between a version with this flag and a version > without this flag handled? There can't be such a case as this flag is enabled for a given machine version. Regards, Bharata.