[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 00/24] qom: Convert some properties to class properties
From: |
Eduardo Habkost |
Subject: |
Re: [PATCH 00/24] qom: Convert some properties to class properties |
Date: |
Tue, 22 Sep 2020 00:31:47 -0400 |
On Tue, Sep 22, 2020 at 09:47:57AM +0800, Li Qiang wrote:
> Eduardo Habkost <ehabkost@redhat.com> 于2020年9月22日周二 上午6:11写道:
> >
> > Class properties make QOM introspection simpler and easier, as it
> > doesn't require an object to be instantiated. This series
> > converts a few existing object_property_add*() calls to register
> > class properties instead.
> >
>
> Hello Eduardo,
>
> IIUC, most of the properties can be dev-spec or class-spec.
> Do we have any principle or rule to specify the property to be dev or class?
>
> Maybe if the property which is always the same between instances can
> be a class-property?
If you are talking about having the same value, this is not the
use case for class properties. Registering a class property just
means all instances of the object will have that property (but
each instance can have the property set to a different value),
and makes this information available for introspection before
instantiating the object.
--
Eduardo
- [PATCH 17/24] cpu/core: Register core-id and nr-threads as class properties, (continued)
- [PATCH 17/24] cpu/core: Register core-id and nr-threads as class properties, Eduardo Habkost, 2020/09/21
- [PATCH 18/24] arm/cpu64: Register "aarch64" as class property, Eduardo Habkost, 2020/09/21
- [PATCH 20/24] machine: Register "memory-backend" as class property, Eduardo Habkost, 2020/09/21
- [PATCH 24/24] sifive_u: Register "start-in-flash" as class property, Eduardo Habkost, 2020/09/21
- [PATCH 22/24] i440fx: Register i440FX-pcihost properties as class properties, Eduardo Habkost, 2020/09/21
- Re: [PATCH 00/24] qom: Convert some properties to class properties, Li Qiang, 2020/09/21
- Re: [PATCH 00/24] qom: Convert some properties to class properties,
Eduardo Habkost <=
- Re: [PATCH 00/24] qom: Convert some properties to class properties, no-reply, 2020/09/21
- Re: [PATCH 00/24] qom: Convert some properties to class properties, Eduardo Habkost, 2020/09/22