mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
accel: pass object to accel_init_machine
We will have to set QOM properties before accel_init_machine, based on the options provided to -accel. Construct the object outside it so that it will be possible to iterate on properties between object_new_with_class and accel_init_machine. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
3c75e12ea6
commit
fc5cf82621
3 changed files with 6 additions and 4 deletions
|
@ -46,9 +46,9 @@ AccelClass *accel_find(const char *opt_name)
|
|||
return ac;
|
||||
}
|
||||
|
||||
int accel_init_machine(AccelClass *acc, MachineState *ms)
|
||||
int accel_init_machine(AccelState *accel, MachineState *ms)
|
||||
{
|
||||
AccelState *accel = ACCEL(object_new_with_class(OBJECT_CLASS(acc)));
|
||||
AccelClass *acc = ACCEL_GET_CLASS(accel);
|
||||
int ret;
|
||||
ms->accelerator = accel;
|
||||
*(acc->allowed) = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue