From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8l8I-0002IR-NG for qemu-devel@nongnu.org; Tue, 15 Dec 2015 03:38:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8l8D-0004bl-Ls for qemu-devel@nongnu.org; Tue, 15 Dec 2015 03:38:54 -0500 Received: from e28smtp02.in.ibm.com ([125.16.236.2]:59310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8l8C-0004bf-Um for qemu-devel@nongnu.org; Tue, 15 Dec 2015 03:38:49 -0500 Received: from localhost by e28smtp02.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 15 Dec 2015 14:08:44 +0530 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id EF3F5125805A for ; Tue, 15 Dec 2015 14:08:54 +0530 (IST) Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay05.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tBF8cQgQ35848384 for ; Tue, 15 Dec 2015 14:08:26 +0530 Received: from d28av03.in.ibm.com (localhost [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tBF8cP5e008301 for ; Tue, 15 Dec 2015 14:08:25 +0530 Date: Tue, 15 Dec 2015 14:08:09 +0530 From: Bharata B Rao Message-ID: <20151215083809.GI18759@in.ibm.com> References: <1449728144-6223-1-git-send-email-bharata@linux.vnet.ibm.com> <1449728144-6223-3-git-send-email-bharata@linux.vnet.ibm.com> <20151214172949.GC3774@thinpad.lan.raisama.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151214172949.GC3774@thinpad.lan.raisama.net> Subject: Re: [Qemu-devel] [RFC PATCH v0 2/9] cpu: Store CPU typename in MachineState Reply-To: bharata@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: peter.maydell@linaro.org, agraf@suse.de, qemu-devel@nongnu.org, borntraeger@de.ibm.com, imammedo@redhat.com, pbonzini@redhat.com, afaerber@suse.de, david@gibson.dropbear.id.au On Mon, Dec 14, 2015 at 03:29:49PM -0200, Eduardo Habkost wrote: > On Thu, Dec 10, 2015 at 11:45:37AM +0530, Bharata B Rao wrote: > > Storing CPU typename in MachineState lets us to create CPU threads > > for all architectures in uniform manner from arch-neutral code. > > > > TODO: Touching only i386 and spapr targets for now > > > > Signed-off-by: Bharata B Rao > > Suggestions: > > * Name the field "cpu_base_type" to indicate it is the base CPU > class name, not the actual CPU class name used when creating > CPUs. > * Put it in MachineClass, as it may be useful for code that > runs before machine->init(), in the future. Ok. > * Maybe make it a CPUClass* field instead of a string? In the current use case, this base cpu type string is being passed to cpu_generic_init(const char *typename, const char *cpu_model) to create boot time CPUs with given typename and cpu_mode. So for now the string makes sense for use case. Making it CPUClass* would necessiate more changes to cpu_generic_init(). Regards, Bharata.