mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
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 <ehabkost@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <1498536619-14548-3-git-send-email-peterx@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
60d7cacac8
commit
9ffea096b9
5 changed files with 31 additions and 0 deletions
|
@ -1098,6 +1098,13 @@ void register_compat_prop(const char *driver,
|
|||
qdev_prop_register_global(p);
|
||||
}
|
||||
|
||||
void register_compat_props_array(GlobalProperty *prop)
|
||||
{
|
||||
for (; prop && prop->driver; prop++) {
|
||||
register_compat_prop(prop->driver, prop->property, prop->value);
|
||||
}
|
||||
}
|
||||
|
||||
void qdev_prop_register_global_list(GlobalProperty *props)
|
||||
{
|
||||
int i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue