At present, object_parse_property_opt() is only used for -accel, which handles user configurations from CLI. So, mark the property as USER_SET in object_property_parse(). Also, add a comment to the function to clarify this specific usage context, and it can serve as a reminder to future callers that utilizing this function implies the property setting originates from the external user. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> --- system/vl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/system/vl.c b/system/vl.c index 6d8167a50006..ef1d4e5d96af 100644 --- a/system/vl.c +++ b/system/vl.c @@ -1700,6 +1700,10 @@ static MachineClass *select_machine(QDict *qdict, Error **errp) return machine_class; } +/* + * object_parse_property_opt() is only used for -accel, so mark the + * property as USER_SET in object_property_parse(). + */ static int object_parse_property_opt(Object *obj, const char *name, const char *value, const char *skip, Error **errp) @@ -1708,7 +1712,7 @@ static int object_parse_property_opt(Object *obj, return 0; } - if (!object_property_parse(obj, name, value, false, errp)) { + if (!object_property_parse(obj, name, value, true, errp)) { return -1; } -- 2.34.1