[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH for-3.2 v4 16/28] hw: apply machine compat propert
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-ppc] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals |
Date: |
Tue, 27 Nov 2018 10:56:44 -0200 |
User-agent: |
Mutt/1.9.2 (2017-12-15) |
On Tue, Nov 27, 2018 at 01:27:49PM +0400, Marc-André Lureau wrote:
> Similarly to accel properties, move compat properties out of globals
> registration, and apply the machine compat properties during
> device_post_init().
>
> Signed-off-by: Marc-André Lureau <address@hidden>
[...]
> diff --git a/hw/core/qdev.c b/hw/core/qdev.c
> index 7066d28271..3b31b2c025 100644
> --- a/hw/core/qdev.c
> +++ b/hw/core/qdev.c
> @@ -971,17 +971,26 @@ static void device_initfn(Object *obj)
> }
>
> static const GPtrArray *ac_compat_props;
> +static const GPtrArray *mc_compat_props;
>
> void accel_register_compat_props(const GPtrArray *props)
> {
> ac_compat_props = props;
> }
>
> +void machine_register_compat_props(const GPtrArray *props)
> +{
> + mc_compat_props = props;
> +}
> +
> static void device_post_init(Object *obj)
> {
> if (ac_compat_props) {
> object_apply_global_props(obj, ac_compat_props, &error_abort);
> }
Why not just use MACHINE(qdev_get_machine())->accel->compat_props
directly?
> + if (mc_compat_props) {
> + object_apply_global_props(obj, mc_compat_props, &error_abort);
> + }
Why not just use MACHINE(qdev_get_machine())->compat_props
directly?
>
> qdev_prop_set_globals(DEVICE(obj));
> }
[...]
--
Eduardo
- [Qemu-ppc] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Marc-André Lureau, 2018/11/27
- Re: [Qemu-ppc] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals,
Eduardo Habkost <=
- Re: [Qemu-ppc] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Marc-André Lureau, 2018/11/27
- Re: [Qemu-ppc] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Eduardo Habkost, 2018/11/27
- Re: [Qemu-ppc] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Igor Mammedov, 2018/11/28
- Re: [Qemu-ppc] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Eduardo Habkost, 2018/11/28
- Re: [Qemu-ppc] [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Marc-André Lureau, 2018/11/29
- Re: [Qemu-ppc] [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Eduardo Habkost, 2018/11/29
- Re: [Qemu-ppc] [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Marc-André Lureau, 2018/11/29
- Re: [Qemu-ppc] [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Igor Mammedov, 2018/11/30
- Re: [Qemu-ppc] [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Eduardo Habkost, 2018/11/30
- Re: [Qemu-ppc] [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals, Igor Mammedov, 2018/11/30