Hi BALATON,

> > diff --git a/include/qom/object.h b/include/qom/object.h
> > index 856b12e7289c..1b77429aa28b 100644
> > --- a/include/qom/object.h
> > +++ b/include/qom/object.h
> > @@ -109,6 +109,30 @@ typedef enum {
> >      * will automatically add a getter and a setter to this property.
> >      */
> >     OBJ_PROP_FLAG_READWRITE = (OBJ_PROP_FLAG_READ | OBJ_PROP_FLAG_WRITE),
> > +    /*
> > +     * The property was explicitly set by an external user.
> > +     *
> > +     * This flag is set whenever the property is modified via external 
> > interfaces
> > +     * (CLI, QMP, HMP). It allows internal code to distinguish whether the
> > +     * property has been modified by the user.
> > +     *
> > +     * Once set, this flag persists even if the property value is 
> > subsequently
> > +     * overwritten by internal logic. It is NOT automatically cleared and 
> > must
> > +     * be explicitly cleared using object_property_clear_flags().
> > +     */
> > +    OBJ_PROP_FLAG_USER_SET = BIT(2),
> 
> As this isn't strictly for user set maybe jusr call it
> OBJ_PROP_FLAG_EXTERNAL? (Can be set by external management application or
> global compat prop in later patches so user set is not quite right name,)

This flag is dynamic - when external user touched a property via
CLI/HMP/QMP, then this flag will be set.

Even though later some QEMU internal logic re-set the property, this
flag is still there.

So, this flag means external user *has touched/set* the property.

Thanks,
Zhao



Reply via email to