[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat prope
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals |
Date: |
Fri, 30 Nov 2018 12:37:10 +0100 |
On Thu, 29 Nov 2018 14:32:18 +0400
Marc-André Lureau <address@hidden> wrote:
> Hi
> On Wed, Nov 28, 2018 at 9:53 PM Igor Mammedov <address@hidden> wrote:
> >
> > On Tue, 27 Nov 2018 11:35:27 -0200
> > Eduardo Habkost <address@hidden> wrote:
> >
> > > On Tue, Nov 27, 2018 at 05:10:05PM +0400, Marc-André Lureau wrote:
> > > > On Tue, Nov 27, 2018 at 4:57 PM Eduardo Habkost <address@hidden> wrote:
> > > >
> > > > >
> > > > > On Tue, Nov 27, 2018 at 01:27:49PM +0400, Marc-André Lureau wrote:
> > > > > > Similarly to accel properties, move compat properties out of globals
> > > > > > registration, and apply the machine compat properties during
> > > > > > device_post_init().
> > > > > >
> > > > > > Signed-off-by: Marc-André Lureau <address@hidden>
> > > > > [...]
> > > > > > diff --git a/hw/core/qdev.c b/hw/core/qdev.c
> > > > > > index 7066d28271..3b31b2c025 100644
> > > > > > --- a/hw/core/qdev.c
> > > > > > +++ b/hw/core/qdev.c
> > > > > > @@ -971,17 +971,26 @@ static void device_initfn(Object *obj)
> > > > > > }
> > > > > >
> > > > > > static const GPtrArray *ac_compat_props;
> > > > > > +static const GPtrArray *mc_compat_props;
> > why you didn't use just 'compat_props' for both?
> > (it would be cleaner have single registry for compat
> > properties, and the place that takes care of registration
> > will take care of necessary ordering)
>
> There are two arrays, one from the accelerator class, the other from
> the machine class. We can't make it a singleton (all compats props for
> the various machines would be mixed).
My impression was that we register properties explicitly here,
so only registered ones endup here and in the order they were added.
Hence machine and accel compats could be merged here.
> We could create a third array that would be the set of both, but that
> would require more copy/allocation.
[...]
- Re: [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, (continued)
- Re: [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Eduardo Habkost, 2018/11/27
- Re: [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Marc-André Lureau, 2018/11/27
- Re: [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Eduardo Habkost, 2018/11/27
- Re: [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Igor Mammedov, 2018/11/28
- Re: [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Eduardo Habkost, 2018/11/28
- Re: [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Marc-André Lureau, 2018/11/29
- Re: [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Eduardo Habkost, 2018/11/29
- Re: [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Marc-André Lureau, 2018/11/29
- Re: [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Igor Mammedov, 2018/11/30
- Re: [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Eduardo Habkost, 2018/11/30
- Re: [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals,
Igor Mammedov <=
Re: [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Eduardo Habkost, 2018/11/29
[Qemu-devel] [PATCH for-3.2 v4 18/28] qdev: all globals are now user-provided, Marc-André Lureau, 2018/11/27
[Qemu-devel] [PATCH for-3.2 v4 19/28] qdev-props: convert global_props to GPtrArray, Marc-André Lureau, 2018/11/27
[Qemu-devel] [PATCH for-3.2 v4 20/28] qdev-props: remove errp from GlobalProperty, Marc-André Lureau, 2018/11/27
[Qemu-devel] [PATCH for-3.2 v4 21/28] qdev-props: call object_apply_global_props(), Marc-André Lureau, 2018/11/27
[Qemu-devel] [PATCH for-3.2 v4 22/28] qom: teach interfaces to implement post-init, Marc-André Lureau, 2018/11/27
[Qemu-devel] [PATCH for-3.2 v4 23/28] qom: add object_class_get_class_data(), Marc-André Lureau, 2018/11/27
[Qemu-devel] [PATCH for-3.2 v4 25/28] machine: add compat-props interface, Marc-André Lureau, 2018/11/27