diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2018-12-04 18:20:08 +0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2018-12-11 15:45:22 -0200 |
commit | 745a4f5ed7e4aabeddddcb0e5c1687a0128e68d7 (patch) | |
tree | bf8668e236a7de9e0576fbb3f9b09dbadb351726 /accel/accel.c | |
parent | 3650b2de3418daf38960a1d87f6ce1f1bf80183c (diff) | |
download | qemu-745a4f5ed7e4aabeddddcb0e5c1687a0128e68d7.zip |
accel: register global_props like machine globals
global_props is only used for Xen xen_compat_props. It's a static
array of GlobalProperty, like machine globals in SET_MACHINE_COMPAT().
Let's register the globals the same way, without extra copy allocation.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20181204142023.15982-5-marcandre.lureau@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'accel/accel.c')
-rw-r--r-- | accel/accel.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/accel/accel.c b/accel/accel.c index 966b2d8f53..3da26eb90f 100644 --- a/accel/accel.c +++ b/accel/accel.c @@ -34,6 +34,7 @@ #include "qom/object.h" #include "qemu/error-report.h" #include "qemu/option.h" +#include "qapi/error.h" static const TypeInfo accel_type = { .name = TYPE_ACCEL, @@ -121,7 +122,13 @@ 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); + GlobalProperty *prop = class->global_props; + + for (; prop && prop->driver; prop++) { + /* Any compat_props must never cause error */ + prop->errp = &error_abort; + qdev_prop_register_global(prop); + } } void accel_setup_post(MachineState *ms) |