On 26/5/23 14:10, Sunil V L wrote:
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 <suni...@ventanamicro.com>
Reported-by: Andrea Bolognani <abolo...@redhat.com>
Tested-by: Andrea Bolognani <abolo...@redhat.com>
---
  hw/riscv/virt.c | 9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>


Reply via email to