mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
hw: apply accel compat properties without touching globals
Instead of registering compat properties as globals, let's keep them in their own array, to avoid mixing with user globals. Introduce object_apply_global_props() function, to apply compatibility properties from a GPtrArray. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Acked-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
e59dbbac03
commit
ea9ce8934c
8 changed files with 54 additions and 19 deletions
|
@ -174,18 +174,21 @@ static GlobalProperty xen_compat_props[] = {
|
|||
.driver = "migration",
|
||||
.property = "send-section-footer",
|
||||
.value = "off",
|
||||
},
|
||||
{ /* end of list */ },
|
||||
}
|
||||
};
|
||||
|
||||
static void xen_accel_class_init(ObjectClass *oc, void *data)
|
||||
{
|
||||
AccelClass *ac = ACCEL_CLASS(oc);
|
||||
|
||||
ac->name = "Xen";
|
||||
ac->init_machine = xen_init;
|
||||
ac->setup_post = xen_setup_post;
|
||||
ac->allowed = &xen_allowed;
|
||||
ac->global_props = xen_compat_props;
|
||||
ac->compat_props = g_ptr_array_new();
|
||||
|
||||
compat_props_add(ac->compat_props,
|
||||
xen_compat_props, G_N_ELEMENTS(xen_compat_props));
|
||||
}
|
||||
|
||||
#define TYPE_XEN_ACCEL ACCEL_CLASS_NAME("xen")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue