mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -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
|
@ -120,6 +120,12 @@ void configure_accelerator(MachineState *ms)
|
|||
}
|
||||
}
|
||||
|
||||
void accel_register_compat_props(AccelState *accel)
|
||||
{
|
||||
AccelClass *class = ACCEL_GET_CLASS(accel);
|
||||
register_compat_props_array(class->global_props);
|
||||
}
|
||||
|
||||
static void register_accel_types(void)
|
||||
{
|
||||
type_register_static(&accel_type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue