qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH qom-cpu v10 2/2] target-i386: X86CPU model subcl


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH qom-cpu v10 2/2] target-i386: X86CPU model subclasses
Date: Sun, 09 Mar 2014 16:49:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Am 04.03.2014 20:53, schrieb Eduardo Habkost:
> On Tue, Feb 25, 2014 at 08:36:27AM +0100, Andreas Färber wrote:
>> From: Eduardo Habkost <address@hidden>
>>
>> Register separate QOM types 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_data 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.
>>
>> The "host" CPU model is special, as the feature flags depend on KVM
>> being initialized. So it has its own class_init and instance_init
>> function, and feature flags are set on instance_init instead of
>> class_init.
>>
>> Signed-off-by: Andreas Färber <address@hidden>
>> Signed-off-by: Igor Mammedov <address@hidden>
>> Signed-off-by: Eduardo Habkost <address@hidden>
>> Signed-off-by: Andreas Färber <address@hidden>
> 
> For the changes you introduced:
> 
> Reviewed-by: Eduardo Habkost <address@hidden>
> Tested-by: Eduardo Habkost <address@hidden>
> 
> After hacking the code to allow device_add on CPUs, I could use the
> classes to instantiate CPUs from different models using device_add
> (which would be useful to allow probing of CPU model information in a
> single QEMU instance).

Thanks a lot, I'm proceeding to staging this on qom-cpu-next:
https://github.com/afaerber/qemu-cpu/commits/qom-cpu-next

Features parsing needs minor merges. Goal is still 2.0.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]