[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 01/16] hw/riscv/virt.c: Make block devices default to virtio
From: |
Sunil V L |
Subject: |
[PATCH v4 01/16] hw/riscv/virt.c: Make block devices default to virtio |
Date: |
Tue, 25 Jun 2024 20:38:24 +0530 |
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: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
---
hw/riscv/virt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index 5676d66d12..e578c6dba7 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -1746,6 +1746,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;
--
2.40.1
- [PATCH v4 00/16] Add support for RISC-V ACPI tests, Sunil V L, 2024/06/25
- [PATCH v4 01/16] hw/riscv/virt.c: Make block devices default to virtio,
Sunil V L <=
- [PATCH v4 02/16] uefi-test-tools/UefiTestToolsPkg: Add RISC-V support, Sunil V L, 2024/06/25
- [PATCH v4 03/16] uefi-test-tools: Add support for python based build script, Sunil V L, 2024/06/25
- [PATCH v4 04/16] tests/data/uefi-boot-images: Add RISC-V ISO image, Sunil V L, 2024/06/25
- [PATCH v4 05/16] qtest: bios-tables-test: Rename aarch64 tests with aarch64 in them, Sunil V L, 2024/06/25
- [PATCH v4 06/16] tests/qtest/bios-tables-test.c: Add support for arch in path, Sunil V L, 2024/06/25
- [PATCH v4 07/16] tests/qtest/bios-tables-test.c: Set "arch" for aarch64 tests, Sunil V L, 2024/06/25
- [PATCH v4 08/16] tests/qtest/bios-tables-test.c: Set "arch" for x86 tests, Sunil V L, 2024/06/25
- [PATCH v4 09/16] tests/data/acpi: Move x86 ACPI tables under x86/${machine} path, Sunil V L, 2024/06/25
- [PATCH v4 10/16] tests/data/acpi/virt: Move ARM64 ACPI tables under aarch64/${machine} path, Sunil V L, 2024/06/25
- [PATCH v4 11/16] meson.build: Add RISC-V to the edk2-target list, Sunil V L, 2024/06/25