From: Igor Mammedov <imammedo@redhat.com>
To: Zhao Liu <zhao1.liu@intel.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Markus Armbruster" <armbru@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
"Michael S . Tsirkin" <mst@redhat.com>,
"BALATON Zoltan" <balaton@eik.bme.hu>,
"Mark Cave-Ayland" <mark.caveayland@nutanix.com>,
devel@lists.libvirt.org
Subject: Re: [RFC 01/10] qom: Rename ObjectPropertyFlags to ObjectPropertyAccessorFlags
Date: Fri, 2 Jan 2026 13:12:53 +0100 [thread overview]
Message-ID: <20260102131253.5b60853b@imammedo-mac> (raw)
In-Reply-To: <20251202170502.3228625-2-zhao1.liu@intel.com>
On Wed, 3 Dec 2025 01:04:53 +0800
Zhao Liu <zhao1.liu@intel.com> wrote:
> At present, ObjectPropertyFlags is used to select accessors and such
> flags won't be stored in ObjectProperty itself.
>
> So it's not proper to extend this ObjectPropertyFlags for "deprecated"
> or "internal" flags.
>
> Therefore, rename ObjectPropertyFlags to ObjectPropertyAccessorFlags,
> and then the original name ObjectPropertyFlags can be used for other
> cases.
I wonder if we can just make existing ObjectPropertyFlags per object as you are planing
and still continue using it for accessor flags.
That basically will lets you use new flags everywhere without rewriting call sites
everywhere.
>
> Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
> ---
> include/qom/object.h | 28 ++++++++++++++--------------
> qom/object.c | 16 ++++++++--------
> 2 files changed, 22 insertions(+), 22 deletions(-)
>
> diff --git a/include/qom/object.h b/include/qom/object.h
> index 26df6137b911..3f807a03f5aa 100644
> --- a/include/qom/object.h
> +++ b/include/qom/object.h
> @@ -1846,14 +1846,14 @@ typedef enum {
> OBJ_PROP_FLAG_WRITE = 1 << 1,
> /* Automatically add a getter and a setter to the property */
> OBJ_PROP_FLAG_READWRITE = (OBJ_PROP_FLAG_READ | OBJ_PROP_FLAG_WRITE),
> -} ObjectPropertyFlags;
> +} ObjectPropertyAccessorFlags;
>
> /**
> * object_property_add_uint8_ptr:
> * @obj: the object to add a property to
> * @name: the name of the property
> * @v: pointer to value
> - * @flags: bitwise-or'd ObjectPropertyFlags
> + * @flags: bitwise-or'd ObjectPropertyAccessorFlags
> *
> * Add an integer property in memory. This function will add a
> * property of type 'uint8'.
> @@ -1861,20 +1861,20 @@ typedef enum {
> * Returns: The newly added property on success, or %NULL on failure.
> */
> ObjectProperty *object_property_add_uint8_ptr(Object *obj, const char *name,
> - const uint8_t *v,
> - ObjectPropertyFlags flags);
> + const uint8_t *v,
> + ObjectPropertyAccessorFlags flags);
>
> ObjectProperty *object_class_property_add_uint8_ptr(ObjectClass *klass,
> const char *name,
> const uint8_t *v,
> - ObjectPropertyFlags flags);
> + ObjectPropertyAccessorFlags flags);
>
> /**
> * object_property_add_uint16_ptr:
> * @obj: the object to add a property to
> * @name: the name of the property
> * @v: pointer to value
> - * @flags: bitwise-or'd ObjectPropertyFlags
> + * @flags: bitwise-or'd ObjectPropertyAccessorFlags
> *
> * Add an integer property in memory. This function will add a
> * property of type 'uint16'.
> @@ -1883,19 +1883,19 @@ ObjectProperty *object_class_property_add_uint8_ptr(ObjectClass *klass,
> */
> ObjectProperty *object_property_add_uint16_ptr(Object *obj, const char *name,
> const uint16_t *v,
> - ObjectPropertyFlags flags);
> + ObjectPropertyAccessorFlags flags);
>
> ObjectProperty *object_class_property_add_uint16_ptr(ObjectClass *klass,
> const char *name,
> const uint16_t *v,
> - ObjectPropertyFlags flags);
> + ObjectPropertyAccessorFlags flags);
>
> /**
> * object_property_add_uint32_ptr:
> * @obj: the object to add a property to
> * @name: the name of the property
> * @v: pointer to value
> - * @flags: bitwise-or'd ObjectPropertyFlags
> + * @flags: bitwise-or'd ObjectPropertyAccessorFlags
> *
> * Add an integer property in memory. This function will add a
> * property of type 'uint32'.
> @@ -1904,19 +1904,19 @@ ObjectProperty *object_class_property_add_uint16_ptr(ObjectClass *klass,
> */
> ObjectProperty *object_property_add_uint32_ptr(Object *obj, const char *name,
> const uint32_t *v,
> - ObjectPropertyFlags flags);
> + ObjectPropertyAccessorFlags flags);
>
> ObjectProperty *object_class_property_add_uint32_ptr(ObjectClass *klass,
> const char *name,
> const uint32_t *v,
> - ObjectPropertyFlags flags);
> + ObjectPropertyAccessorFlags flags);
>
> /**
> * object_property_add_uint64_ptr:
> * @obj: the object to add a property to
> * @name: the name of the property
> * @v: pointer to value
> - * @flags: bitwise-or'd ObjectPropertyFlags
> + * @flags: bitwise-or'd ObjectPropertyAccessorFlags
> *
> * Add an integer property in memory. This function will add a
> * property of type 'uint64'.
> @@ -1925,12 +1925,12 @@ ObjectProperty *object_class_property_add_uint32_ptr(ObjectClass *klass,
> */
> ObjectProperty *object_property_add_uint64_ptr(Object *obj, const char *name,
> const uint64_t *v,
> - ObjectPropertyFlags flags);
> + ObjectPropertyAccessorFlags flags);
>
> ObjectProperty *object_class_property_add_uint64_ptr(ObjectClass *klass,
> const char *name,
> const uint64_t *v,
> - ObjectPropertyFlags flags);
> + ObjectPropertyAccessorFlags flags);
>
> /**
> * object_property_add_alias:
> diff --git a/qom/object.c b/qom/object.c
> index 4f32c1aba7d7..85d31bb64b36 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -2636,7 +2636,7 @@ static void property_set_uint64_ptr(Object *obj, Visitor *v, const char *name,
> ObjectProperty *
> object_property_add_uint8_ptr(Object *obj, const char *name,
> const uint8_t *v,
> - ObjectPropertyFlags flags)
> + ObjectPropertyAccessorFlags flags)
> {
> ObjectPropertyAccessor *getter = NULL;
> ObjectPropertyAccessor *setter = NULL;
> @@ -2656,7 +2656,7 @@ object_property_add_uint8_ptr(Object *obj, const char *name,
> ObjectProperty *
> object_class_property_add_uint8_ptr(ObjectClass *klass, const char *name,
> const uint8_t *v,
> - ObjectPropertyFlags flags)
> + ObjectPropertyAccessorFlags flags)
> {
> ObjectPropertyAccessor *getter = NULL;
> ObjectPropertyAccessor *setter = NULL;
> @@ -2676,7 +2676,7 @@ object_class_property_add_uint8_ptr(ObjectClass *klass, const char *name,
> ObjectProperty *
> object_property_add_uint16_ptr(Object *obj, const char *name,
> const uint16_t *v,
> - ObjectPropertyFlags flags)
> + ObjectPropertyAccessorFlags flags)
> {
> ObjectPropertyAccessor *getter = NULL;
> ObjectPropertyAccessor *setter = NULL;
> @@ -2696,7 +2696,7 @@ object_property_add_uint16_ptr(Object *obj, const char *name,
> ObjectProperty *
> object_class_property_add_uint16_ptr(ObjectClass *klass, const char *name,
> const uint16_t *v,
> - ObjectPropertyFlags flags)
> + ObjectPropertyAccessorFlags flags)
> {
> ObjectPropertyAccessor *getter = NULL;
> ObjectPropertyAccessor *setter = NULL;
> @@ -2716,7 +2716,7 @@ object_class_property_add_uint16_ptr(ObjectClass *klass, const char *name,
> ObjectProperty *
> object_property_add_uint32_ptr(Object *obj, const char *name,
> const uint32_t *v,
> - ObjectPropertyFlags flags)
> + ObjectPropertyAccessorFlags flags)
> {
> ObjectPropertyAccessor *getter = NULL;
> ObjectPropertyAccessor *setter = NULL;
> @@ -2736,7 +2736,7 @@ object_property_add_uint32_ptr(Object *obj, const char *name,
> ObjectProperty *
> object_class_property_add_uint32_ptr(ObjectClass *klass, const char *name,
> const uint32_t *v,
> - ObjectPropertyFlags flags)
> + ObjectPropertyAccessorFlags flags)
> {
> ObjectPropertyAccessor *getter = NULL;
> ObjectPropertyAccessor *setter = NULL;
> @@ -2756,7 +2756,7 @@ object_class_property_add_uint32_ptr(ObjectClass *klass, const char *name,
> ObjectProperty *
> object_property_add_uint64_ptr(Object *obj, const char *name,
> const uint64_t *v,
> - ObjectPropertyFlags flags)
> + ObjectPropertyAccessorFlags flags)
> {
> ObjectPropertyAccessor *getter = NULL;
> ObjectPropertyAccessor *setter = NULL;
> @@ -2776,7 +2776,7 @@ object_property_add_uint64_ptr(Object *obj, const char *name,
> ObjectProperty *
> object_class_property_add_uint64_ptr(ObjectClass *klass, const char *name,
> const uint64_t *v,
> - ObjectPropertyFlags flags)
> + ObjectPropertyAccessorFlags flags)
> {
> ObjectPropertyAccessor *getter = NULL;
> ObjectPropertyAccessor *setter = NULL;
next prev parent reply other threads:[~2026-01-02 12:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-02 17:04 [RFC 00/10] qom: Support marking object properties as deprecated Zhao Liu
2025-12-02 17:04 ` [RFC 01/10] qom: Rename ObjectPropertyFlags to ObjectPropertyAccessorFlags Zhao Liu
2026-01-02 12:12 ` Igor Mammedov [this message]
2026-01-05 7:54 ` Zhao Liu
2026-01-05 12:28 ` Igor Mammedov
2026-01-06 2:14 ` Zhao Liu
2025-12-02 17:04 ` [RFC 02/10] qom: Add basic object property deprecation hint support Zhao Liu
2026-01-02 12:06 ` Igor Mammedov
2026-01-05 9:06 ` Zhao Liu
2025-12-02 17:04 ` [RFC 03/10] qom: Check property deprecation flag for global property Zhao Liu
2025-12-02 17:04 ` [RFC 04/10] qom: Check property deprecation flag for properities from qdict Zhao Liu
2025-12-02 17:04 ` [RFC 05/10] system/vl: Check property deprecation flag for properities of accelerator Zhao Liu
2025-12-02 17:04 ` [RFC 06/10] qom/qom-hmp-cmd: Check property deprecation flag for "qom-set" command Zhao Liu
2025-12-02 17:04 ` [RFC 07/10] hw/core/qdev-properties: Allow to mark qdev property as deprecated Zhao Liu
2026-01-02 12:27 ` Igor Mammedov
2026-01-05 8:34 ` Zhao Liu
2025-12-02 17:05 ` [RFC 08/10] target/i386: Deprecate fill-mtrr-mask property Zhao Liu
2025-12-02 17:05 ` [RFC 09/10] target/i386: Deprecate cpuid-0xb property Zhao Liu
2025-12-02 17:05 ` [RFC 10/10] hw/intc/ioapic: Deprecate version property Zhao Liu
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=20260102131253.5b60853b@imammedo-mac \
--to=imammedo@redhat.com \
--cc=armbru@redhat.com \
--cc=balaton@eik.bme.hu \
--cc=berrange@redhat.com \
--cc=devel@lists.libvirt.org \
--cc=eduardo@habkost.net \
--cc=mark.caveayland@nutanix.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
--cc=zhao1.liu@intel.com \
/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.