qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/9] target-i386: cpu: convert existing dynamic


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 1/9] target-i386: cpu: convert existing dynamic properties into static properties
Date: Mon, 18 Feb 2013 21:36:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2

Am 18.02.2013 21:30, schrieb Eduardo Habkost:
> On Mon, Feb 11, 2013 at 05:35:03PM +0100, Igor Mammedov wrote:
>> Following properties are converted:
>>     * vendor
>>     * xlevel
>>         * custom setter/getter replaced by qdev's DEFINE_PROP_UINT32
>>     * level
>>         * custom setter/getter replaced by qdev's DEFINE_PROP_UINT32
>>     * tsc-frequency
>>     * stepping
>>     * model
>>     * family
>>     * model-id
>>         * check "if (model_id == NULL)" looks unnecessary now, since all
>>         builtin model-ids are not NULL and user shouldn't be able to set
>>         it NULL (cpumodel string parsing code takes care of it, if feature
>>         is specified as "model-id=" on command line, its parsing will
>>         result in an empty string as value).
>>         * use g_malloc0() instead of g_malloc() in x86_cpuid_get_model_id()
>>
>> Common changes to all properties:
>>     * properties code are moved to the top of file, before properties array
>>       definition
>>     * s/error_set/error_setg/;s/QERR*/with similar message/
> 
> Why?

Been having a similar question (sorry for not replying yet):

Can't we leave my new-style getters and setters in place and invoke them
through some glue code from whatever old-style machinery qdev static
properties still use?

BTW I'm not yet clear on how we should proceed with subclasses and KVM.
Proposing we proceed with your properties refactoring after all, then
maybe it becomes more clear where the problems are.

Regards,
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]