qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 6/7] qom: replace object property list with G


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH v4 6/7] qom: replace object property list with GHashTable
Date: Mon, 16 Nov 2015 10:48:34 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

Am 16.11.2015 um 09:53 schrieb Paolo Bonzini:
> On 13/11/2015 22:25, Andreas Färber wrote:
>> Thanks! sclp_init() seems to violate several QOM design principles in
>> that it uses object_new() during TypeInfo::instance_init()
> 
> There's nothing wrong with that.  It's wrong however to use
> qdev_set_parent_bus in instance_init.  That should be moved to
> sclp_realize, before the realized property is set to true.

Negative, realize is too late. Since there are two call sites for
initialization, I don't see a better place for it.

> Otherwise, sclp->event_facility outlives its parent.  I'm not sure why
> that works only with the list and not with the hash table though.  It
> may well be a bug in this patch.

Luckily that's not the problem here. The unref should account for its
lifetime.

>> and uses a TYPE_... constant as property name.
> 
> That's just a little weird, it doesn't break anything per se.

It risks renaming the type causing the property to change name, which
affects ABI stability. Therefore we always "inline" property names. Will
adjust after I have a fix.

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton; HRB 21284 (AG Nürnberg)



reply via email to

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