[libvirt] [Qemu-devel] [uq/master PATCH 7/7] target-i386: CPU model subclasses
Eduardo Habkost
ehabkost at redhat.com
Fri Jan 31 17:20:12 UTC 2014
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 <ehabkost at redhat.com>
> ---
> 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
More information about the libvir-list
mailing list