[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] qdev properties vs qom object properties
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] qdev properties vs qom object properties |
Date: |
Mon, 5 Jun 2017 10:39:07 -0300 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Mon, Jun 05, 2017 at 03:32:56PM +0200, Paolo Bonzini wrote:
[...]
> > Which is the recommended one for new device code?
> > Do we have a transition plan for old code?
> > Where should I be looking for the documentation on this?
>
> There is no transition plan, qdev properties are not going to go away
> soon unless someone actually makes a plan.
>
> Now that there are QOM class properties, it would actually be feasible
> to make qdev_property_add_static define QOM properties on the class
> rather than the object. In other words, instead of
>
> dc->props = virtio_serial_pci_properties;
>
> you'd have something like:
>
> qdev_add_class_properties(klass, usb_tablet_properties);
I have an old branch that does that. I don't remember if I
submitted it to qemu-devel. I will try to rebase and (re)submit
it.
--
Eduardo