From 9ffea096b93388e4a3727ae766583715d9e61741 Mon Sep 17 00:00:00 2001 From: Peter Xu Date: Tue, 27 Jun 2017 12:10:11 +0800 Subject: accel: introduce AccelClass.global_props Introduce this new field for the accelerator classes so that each specific accelerator in the future can register its own global properties to be used further by the system. It works just like how the old machine compatible properties do, but only tailored for accelerators. Introduce register_compat_props_array() for it. Export it so that it may be used in other codes as well in the future. Suggested-by: Eduardo Habkost Signed-off-by: Peter Xu Message-Id: <1498536619-14548-3-git-send-email-peterx@redhat.com> Reviewed-by: Eduardo Habkost Signed-off-by: Juan Quintela --- include/hw/qdev-properties.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/hw/qdev-properties.h') diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index 50ade839b7..0604c337e0 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -231,6 +231,12 @@ void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev, */ 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: -- cgit v1.2.3