All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, "Andreas Färber" <afaerber@suse.de>,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 4/7] qdev: Introduce DEFINE_PROP_LINK
Date: Wed, 28 Jun 2017 22:02:19 +0800	[thread overview]
Message-ID: <20170628140219.GI14166@lemon.lan> (raw)
In-Reply-To: <a729ca7e-726d-f8ca-79ab-243592d6bffa@redhat.com>

On Wed, 06/28 15:38, Paolo Bonzini wrote:
> 
> 
> On 28/06/2017 14:48, 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?

> 
> Also, I think _check and _flags can be always
> qdev_prop_allow_set_link_before_realize and
> OBJ_PROP_LINK_UNREF_ON_RELEASE for DEFINE_PROP_LINK.

A quick grep gave me some object_property_add_link() callers using different
parameters, but I don't know if they should use DEFINE_PROP_LINK.

Fam

  reply	other threads:[~2017-06-28 14:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 12:48 [Qemu-devel] [PATCH 0/7] qdev: Introduce DEFINE_PROP_LINK Fam Zheng
2017-06-28 12:48 ` [Qemu-devel] [PATCH 1/7] qom: Make link property API public Fam Zheng
2017-06-28 13:32   ` Paolo Bonzini
2017-06-28 13:36     ` Andreas Färber
2017-06-28 14:09       ` Fam Zheng
2017-06-28 12:48 ` [Qemu-devel] [PATCH 2/7] qom: Handle property lookup failure in object_resolve_link Fam Zheng
2017-06-28 12:48 ` [Qemu-devel] [PATCH 3/7] qom: Save type name in LinkProperty Fam Zheng
2017-06-28 12:48 ` [Qemu-devel] [PATCH 4/7] qdev: Introduce DEFINE_PROP_LINK Fam Zheng
2017-06-28 13:38   ` Paolo Bonzini
2017-06-28 14:02     ` Fam Zheng [this message]
2017-06-28 14:06       ` Paolo Bonzini
2017-06-28 14:32         ` Fam Zheng
2017-06-28 12:48 ` [Qemu-devel] [PATCH 5/7] virtio-blk: Use DEFINE_PROP_LINK Fam Zheng
2017-06-28 12:48 ` [Qemu-devel] [PATCH 6/7] virtio-scsi: " Fam Zheng
2017-06-28 12:48 ` [Qemu-devel] [PATCH 7/7] virtio-rng: " Fam Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170628140219.GI14166@lemon.lan \
    --to=famz@redhat.com \
    --cc=afaerber@suse.de \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.