From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eduardo Habkost Subject: Re: [Qemu-devel] [uq/master PATCH 7/7] target-i386: CPU model subclasses Date: Fri, 31 Jan 2014 15:20:12 -0200 Message-ID: <20140131172012.GA28427@otherpad.lan.raisama.net> References: <1391111339-6958-1-git-send-email-ehabkost@redhat.com> <1391111339-6958-8-git-send-email-ehabkost@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, libvir-list@redhat.com, Igor Mammedov , Paolo Bonzini , Jiri Denemark , Andreas =?iso-8859-1?Q?F=E4rber?= To: qemu-devel@nongnu.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:44635 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932236AbaAaRUW (ORCPT ); Fri, 31 Jan 2014 12:20:22 -0500 Content-Disposition: inline In-Reply-To: <1391111339-6958-8-git-send-email-ehabkost@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Jan 30, 2014 at 05:48:59PM -0200, Eduardo Habkost wrote: > Register separate QOM classes for each x86 CPU model. > > This will allow management code to more easily probe what each CPU model > provides, by simply creating objects using the appropriate class name, > without having to restart QEMU. > > This also allows us to eliminate the qdev_prop_set_globals_for_type() > hack to set CPU-model-specific global properties. > > Instead of creating separate class_init functions for each class, I just > used class_dat to store a pointer to the X86CPUDefinition struct for > each CPU model. This should make the patch shorter and easier to review. > Later we can gradually convert each X86CPUDefinition field to lists of > per-class property defaults. > > Signed-off-by: Eduardo Habkost > --- > This version is closer to the version sent by Andrea and then later > resubmitted by Igor as "[RFC v5] target-i386: Slim conversion to X86CPU > subclasses + KVM subclasses", as it doesn't create one new class_init > function for each subclass. One main difference is that this version > does not use KVM-specific subclasses, to keep things simpler. I will submit a new version of this patch later, as I will: * Split some changes that can be made in a separate patch, after the conversion (the x86_cpudef_setup() removal and the CPU listing code); * Add proper attribution to Andreas and Igor, who wrote "[RFC v5] target-i386: Slim conversion to X86CPU subclasses + KVM subclasses". -- Eduardo