diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/qdev-core.h | 10 | ||||
-rw-r--r-- | include/qom/object.h | 3 | ||||
-rw-r--r-- | include/sysemu/accel.h | 4 |
3 files changed, 14 insertions, 3 deletions
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 92851e55df..84e612f473 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -267,6 +267,16 @@ typedef struct GlobalProperty { Error **errp; } GlobalProperty; +static inline void +compat_props_add(GPtrArray *arr, + GlobalProperty props[], size_t nelem) +{ + int i; + for (i = 0; i < nelem; i++) { + g_ptr_array_add(arr, (void *)&props[i]); + } +} + /*** Board API. This should go away once we have a machine config file. ***/ DeviceState *qdev_create(BusState *bus, const char *name); diff --git a/include/qom/object.h b/include/qom/object.h index bcae3f4951..e0262962b5 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -675,6 +675,9 @@ Object *object_new_with_propv(const char *typename, Error **errp, va_list vargs); +void object_apply_global_props(Object *obj, const GPtrArray *props, + Error **errp); + /** * object_set_props: * @obj: the object instance to set properties on diff --git a/include/sysemu/accel.h b/include/sysemu/accel.h index 637358f430..f331d128e9 100644 --- a/include/sysemu/accel.h +++ b/include/sysemu/accel.h @@ -49,7 +49,7 @@ typedef struct AccelClass { * global properties may be overridden by machine-type * compat_props or user-provided global properties. */ - GlobalProperty *global_props; + GPtrArray *compat_props; } AccelClass; #define TYPE_ACCEL "accel" @@ -67,8 +67,6 @@ typedef struct AccelClass { extern unsigned long tcg_tb_size; void configure_accelerator(MachineState *ms); -/* Register accelerator specific global properties */ -void accel_register_compat_props(AccelState *accel); /* Called just before os_setup_post (ie just before drop OS privs) */ void accel_setup_post(MachineState *ms); |