qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/7] qdev: Introduce DEFINE_PROP_LINK


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH 4/7] qdev: Introduce DEFINE_PROP_LINK
Date: Wed, 28 Jun 2017 22:32:38 +0800
User-agent: Mutt/1.8.0 (2017-02-23)

On Wed, 06/28 16:06, Paolo Bonzini wrote:
> 
> 
> On 28/06/2017 16:02, Fam Zheng wrote:
> >>> It's implemented by creating a wrapper property that basically forwards
> >>> operations to a QOM "link-FOO" property, which handles the check
> >>> callback and flags. The feature that is missing from QOM is the dynamic
> >>> child pointer which is done in the added code with the usual "offset"
> >>> approach.
> >> Would it be possible to add a ".create" field to PropertyInfo?  Then
> >> there's no need to introduce the wrapper.
> > QOM setter/getter want a LinkProperty opaque pointer, but qdev uses a 
> > Property
> > pointer. I don't see a way to adapt that with .create(). Can you elaborate?
> 
> The .create() callback would call object_property_add_link directly.
> There would be no change in the properties at the QOM level, but the
> PropertyInfo lets "info qtree" show the property.

Thanks, I see, I'll try it in v2 if Andreas agrees on the general idea.

Fam



reply via email to

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