[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCHv9 2/3] fw_cfg: move qdev_init_nofail() from fw_c
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCHv9 2/3] fw_cfg: move qdev_init_nofail() from fw_cfg_init1() to callers |
Date: |
Fri, 14 Jul 2017 14:15:14 -0300 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Fri, Jul 14, 2017 at 10:40:07AM +0100, Mark Cave-Ayland wrote:
> When looking to instantiate a TYPE_FW_CFG_MEM or TYPE_FW_CFG_IO device to be
> able to wire it up differently, it is much more convenient for the caller to
> instantiate the device and have the fw_cfg default files already preloaded
> during realize.
>
> Move fw_cfg_init1() to the end of both the fw_cfg_mem_realize() and
> fw_cfg_io_realize() functions so it no longer needs to be called manually
> when instantiating the device, and also rename it to fw_cfg_common_realize()
> which better describes its new purpose.
>
> Since it is now the responsibility of the machine to wire up the fw_cfg device
> it is necessary to introduce a object_property_add_child() call into
> fw_cfg_init_io() and fw_cfg_init_mem() to link the fw_cfg device to the root
> machine object as before.
>
> Finally with the previous change to fw_cfg_find() we can now remove the
> assert() preventing multiple fw_cfg devices being instantiated and replace
> them with a simple call to fw_cfg_find() at realize time instead. This allows
> us to remove FW_CFG_NAME and FW_CFG_PATH since they are no longer required.
>
> Signed-off-by: Mark Cave-Ayland <address@hidden>
> Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
--
Eduardo
- [Qemu-devel] [PATCHv9 0/3] fw_cfg: qdev-related tidy-ups, Mark Cave-Ayland, 2017/07/14
- [Qemu-devel] [PATCHv9 1/3] fw_cfg: switch fw_cfg_find() to locate the fw_cfg device by type rather than path, Mark Cave-Ayland, 2017/07/14
- [Qemu-devel] [PATCHv9 2/3] fw_cfg: move qdev_init_nofail() from fw_cfg_init1() to callers, Mark Cave-Ayland, 2017/07/14
- Re: [Qemu-devel] [PATCHv9 2/3] fw_cfg: move qdev_init_nofail() from fw_cfg_init1() to callers,
Eduardo Habkost <=
- [Qemu-devel] [PATCHv9 3/3] fw_cfg: move QOM type defines and fw_cfg types into fw_cfg.h, Mark Cave-Ayland, 2017/07/14
- Re: [Qemu-devel] [PATCHv9 3/3] fw_cfg: move QOM type defines and fw_cfg types into fw_cfg.h, Eduardo Habkost, 2017/07/14
- Re: [Qemu-devel] [PATCHv9 3/3] fw_cfg: move QOM type defines and fw_cfg types into fw_cfg.h, Laszlo Ersek, 2017/07/14
- Re: [Qemu-devel] [PATCHv9 3/3] fw_cfg: move QOM type defines and fw_cfg types into fw_cfg.h, Eduardo Habkost, 2017/07/14
- Re: [Qemu-devel] [PATCHv9 3/3] fw_cfg: move QOM type defines and fw_cfg types into fw_cfg.h, Mark Cave-Ayland, 2017/07/16
- Re: [Qemu-devel] [PATCHv9 3/3] fw_cfg: move QOM type defines and fw_cfg types into fw_cfg.h, Igor Mammedov, 2017/07/17
- Re: [Qemu-devel] [PATCHv9 3/3] fw_cfg: move QOM type defines and fw_cfg types into fw_cfg.h, Eduardo Habkost, 2017/07/17
- Re: [Qemu-devel] [PATCHv9 3/3] fw_cfg: move QOM type defines and fw_cfg types into fw_cfg.h, Eduardo Habkost, 2017/07/17