From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKq57-0006uM-20 for qemu-devel@nongnu.org; Wed, 06 Jul 2016 12:53:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKq53-0008SN-Tm for qemu-devel@nongnu.org; Wed, 06 Jul 2016 12:53:49 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:33485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKq53-0008SD-KQ for qemu-devel@nongnu.org; Wed, 06 Jul 2016 12:53:45 -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 u66GiNUq119009 for ; Wed, 6 Jul 2016 12:53:45 -0400 Received: from e28smtp05.in.ibm.com (e28smtp05.in.ibm.com [125.16.236.5]) by mx0a-001b2d01.pphosted.com with ESMTP id 240ndxg2n7-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 06 Jul 2016 12:53:44 -0400 Received: from localhost by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 6 Jul 2016 22:23:41 +0530 Date: Wed, 6 Jul 2016 22:23:34 +0530 From: Bharata B Rao Reply-To: bharata@linux.vnet.ibm.com References: <1467795561-1007-1-git-send-email-bharata@linux.vnet.ibm.com> <1467795561-1007-4-git-send-email-bharata@linux.vnet.ibm.com> <20160706163528.25382183@bahia.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160706163528.25382183@bahia.lan> Message-Id: <20160706165333.GJ25522@in.ibm.com> Subject: Re: [Qemu-devel] [RFC PATCH v1 3/5] spapr: Implement CPUClass::get_migration_id() for PowerPC CPUs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, david@gibson.dropbear.id.au, imammedo@redhat.com, nikunj@linux.vnet.ibm.com, pbonzini@redhat.com On Wed, Jul 06, 2016 at 04:35:28PM +0200, Greg Kurz wrote: > On Wed, 6 Jul 2016 14:29:19 +0530 > Bharata B Rao wrote: > > cpu_index is used as migration_id by default. For machine type versions > > that set use-migration-id property, cpu_dt_it is returned. > > > > It looks wrong to hijack cpu_dt_id to fix migration. > > For pseries-2.7, you need to pass the sum of the index of the core in > spapr->cores and the index of the thread in sc->threads. > > All other machines just need to pass the index of the cpu in their > respective arrays, which happens to be equal to cs->cpu_index. Yes, that is indeed good and simplifies things. Thanks for noting this. Regards, Bharata.