On Tue, Feb 10, 2026 at 11:23:41AM +0800, Zhao Liu wrote:
> Update qdev property interfaces (qdev_property_add_static() and
> qdev_class_add_property()) to accept and pass 'ObjectPropertyFlags'.
> This enables marking qdev properties with flags such as DEPRECATED or
> INTERNAL.
> 
> To facilitate this at the definition level, extend the boolean and
> uint8_t property macros (as the examples) to accept variable arguments
> (VA_ARGS). This allows callers to optionally specify flags in the
> property definition.
> 
> Example:
> 
> DEFINE_PROP_UINT8("version", IOAPICCommonState, version, IOAPIC_VER_DEF,
>                   .flags = OBJECT_PROPERTY_DEPRECATED),

In other places where we track deprecation in QEMU, we have not used
a boolean flag. Instead we have used a "const char *deprecation_note"
internally, which lets us provide a user facing message, to be printed
out in the warn_report, informing them what to do instead (either the
feature is entirely removed, or there is a better alternative). IMHO
we should be following the same pattern for properties, as it is much
more user friendly than just printing a totally generic message
"XXXX is deprecated, stop using it" 


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Reply via email to