]> git.ipfire.org Git - thirdparty/qemu.git/commit
riscv/virt: Support using pflash via -blockdev option
authorSunil V L <sunilvl@ventanamicro.com>
Thu, 1 Jun 2023 04:59:09 +0000 (10:29 +0530)
committerAlistair Francis <alistair.francis@wdc.com>
Tue, 13 Jun 2023 07:39:45 +0000 (17:39 +1000)
commit13bdfb8b5487ad5f68529a53bff09e8a57482206
treedada0b6b5625a67572bfad08683c535b48e2bbbb
parent4263e270a240cee6e17ae76a752ab2a76493a779
riscv/virt: Support using pflash via -blockdev option

Currently, pflash devices can be configured only via -pflash
or -drive options. This is the legacy way and the
better way is to use -blockdev as in other architectures.
libvirt also has moved to use -blockdev method.

To support -blockdev option, pflash devices need to be
created in instance_init itself. So, update the code to
move the virt_flash_create() to instance_init. Also, use
standard interfaces to detect whether pflash0 is
configured or not.

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Reported-by: Andrea Bolognani <abologna@redhat.com>
Tested-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20230601045910.18646-3-sunilvl@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/riscv/virt.c