diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2017-06-29 13:13:05 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2017-06-29 13:13:05 +0100 |
| commit | 4fe60423d7f401bd5d4ef461ef53402139f0d698 (patch) | |
| tree | 85f8153981737a140dc597986668bdb2d8a02c76 /include/hw/qdev-properties.h | |
| parent | 464588675455afda2899e20a0b120e4075de50c7 (diff) | |
| parent | 084140bd4989095d39978269fd0f43e398a0015d (diff) | |
| download | focaccia-qemu-4fe60423d7f401bd5d4ef461ef53402139f0d698.tar.gz focaccia-qemu-4fe60423d7f401bd5d4ef461ef53402139f0d698.zip | |
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20170628' into staging
migration/next for 20170628 # gpg: Signature made Wed 28 Jun 2017 12:16:44 BST # gpg: using RSA key 0xF487EF185872D723 # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" # gpg: aka "Juan Quintela <quintela@trasno.org>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723 * remotes/juanquintela/tags/migration/20170628: exec: fix access to ram_list.dirty_memory when sync dirty bitmap migration: add "return-path" capability vmstate: error hint for failed equal checks migration: add comment for TYPE_MIGRATE migration: hmp: dump globals migration: merge enforce_config_section somewhat migration: move skip_section_footers migration: move skip_configuration out migration: move only_migratable to MigrationState migration: move global_state.optional out migration: let MigrationState be a qdev vl: clean up global property registration accel: introduce AccelClass.global_props machine: export register_compat_prop() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/qdev-properties.h')
| -rw-r--r-- | include/hw/qdev-properties.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index 39bf4b292e..0604c337e0 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -210,6 +210,35 @@ 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 the property will have + * 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); +/* + * register_compat_props_array(): using register_compat_prop(), which + * only registers internal global properties (which has lower priority + * than user-provided global properties) + */ +void register_compat_props_array(GlobalProperty *prop); + +/** * qdev_property_add_static: * @dev: Device to add the property to. * @prop: The qdev property definition. |