On Tue, Jun 27, 2017 at 12:10:10PM +0800, Peter Xu wrote: [...] > diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h > index 1e5c928..4ab4359 100644 > --- a/include/hw/qdev-properties.h > +++ b/include/hw/qdev-properties.h > @@ -208,6 +208,29 @@ void error_set_from_qdev_prop_error(Error **errp, int > ret, DeviceState *dev, > Property *prop, const char *value); > > /** > + * register_compat_prop: > + * > + * Register internal (not user-provided) global property, changing the > + * default value of a given property in a device type. This can be used > + * for enabling machine-type compatibility or for enabling > + * accelerator-specific defaults in devices. > + * > + * The property values set using this function must be always valid and > + * never report setter errors, as they property have
Typo (my fault, sorry). It should be "the property have", or "the property will have". With this fixed (which may be done manually by the maintainer when applying): Reviewed-by: Eduardo Habkost <ehabk...@redhat.com> > + * GlobalProperty::errp set to &error_abort. > + * > + * User-provided global properties should override internal global > + * properties, so callers of this function should ensure that it is > + * called before user-provided global properties are registered. > + * > + * @driver: Device type to be affected > + * @property: Property whose default value is going to be changed > + * @value: New default value for the property > + */ > +void register_compat_prop(const char *driver, const char *property, > + const char *value); > + > +/** > * qdev_property_add_static: > * @dev: Device to add the property to. > * @prop: The qdev property definition. > -- > 2.7.4 > -- Eduardo