aboutsummaryrefslogtreecommitdiff
path: root/accel
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-11-13 14:03:46 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2019-12-17 19:32:27 +0100
commitfc5cf8262113e80d35177f06d49bcc1a9d3dc9fc (patch)
treeec88d5dc2e1bf2b328a45e8daa80fd6207afd7e4 /accel
parent3c75e12ea64666f2fc9f822675490e8672f45453 (diff)
downloadqemu-fc5cf8262113e80d35177f06d49bcc1a9d3dc9fc.zip
qemu-fc5cf8262113e80d35177f06d49bcc1a9d3dc9fc.tar.gz
qemu-fc5cf8262113e80d35177f06d49bcc1a9d3dc9fc.tar.bz2
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>
Diffstat (limited to 'accel')
-rw-r--r--accel/accel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/accel/accel.c b/accel/accel.c
index dd38a46..1c5c3a6 100644
--- a/accel/accel.c
+++ b/accel/accel.c
@@ -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;