diff options
| author | Sunil V L <sunilvl@ventanamicro.com> | 2024-06-20 12:17:18 +0530 |
|---|---|---|
| committer | Alistair Francis <alistair.francis@wdc.com> | 2024-06-26 23:00:59 +1000 |
| commit | 4406ba2b5efce6af64905f827ca244f699db8170 (patch) | |
| tree | 490c0161eb8056ea129691b3808d5a980e749f73 /hw/riscv/virt.c | |
| parent | 3adf4def19c61ae15611af15a5291d13a1c9c546 (diff) | |
| download | focaccia-qemu-4406ba2b5efce6af64905f827ca244f699db8170.tar.gz focaccia-qemu-4406ba2b5efce6af64905f827ca244f699db8170.zip | |
hw/riscv/virt.c: Make block devices default to virtio
RISC-V virt is currently missing default type for block devices. Without this being set, proper backend is not created when option like -cdrom is used. So, make the virt board's default block device type be IF_VIRTIO similar to other architectures. We also need to set no_cdrom to avoid getting a default cdrom device. Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Message-ID: <20240620064718.275427-1-sunilvl@ventanamicro.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'hw/riscv/virt.c')
| -rw-r--r-- | hw/riscv/virt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 9b648540e6..bc0893e087 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1764,6 +1764,8 @@ static void virt_machine_class_init(ObjectClass *oc, void *data) mc->init = virt_machine_init; mc->max_cpus = VIRT_CPUS_MAX; mc->default_cpu_type = TYPE_RISCV_CPU_BASE; + mc->block_default_type = IF_VIRTIO; + mc->no_cdrom = 1; mc->pci_allow_0_address = true; mc->possible_cpu_arch_ids = riscv_numa_possible_cpu_arch_ids; mc->cpu_index_to_instance_props = riscv_numa_cpu_index_to_props; |