diff options
author | Daniel Henrique Barboza <dbarboza@ventanamicro.com> | 2023-01-17 10:27:51 -0300 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2023-01-20 10:14:14 +1000 |
commit | b748352c555b42d497fe8ee00ee2e44eb8627660 (patch) | |
tree | 1f3bf8b2e85c63f31169a49c507f5fbc405a458a /qemu-io.c | |
parent | f251c01a623e0c998a2127f8648d4d02cd04e702 (diff) |
hw/riscv/virt.c: move create_fw_cfg() back to virt_machine_init()
Commit 1c20d3ff6004 ("hw/riscv: virt: Add a machine done notifier")
moved the initialization of fw_cfg to the virt_machine_done() callback.
Problem is that the validation of fw_cfg by devices such as ramfb is
done before the machine done notifier is called. Moving create_fw_cfg()
to machine_done() results in QEMU failing to boot when using a ramfb
device:
./qemu-system-riscv64 -machine virt -device ramfb -serial stdio
qemu-system-riscv64: -device ramfb: ramfb device requires fw_cfg with DMA
The fix is simple: move create_fw_cfg() config back to
virt_machine_init(). This happens to be the same way the ARM 'virt'
machine deals with fw_cfg (see machvirt_init() and virt_machine_done()
in hw/arm/virt.c), so we're keeping consistency with how other machines
handle this device.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1343
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20230117132751.229738-2-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'qemu-io.c')
0 files changed, 0 insertions, 0 deletions