[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH for 4.1 v1 3/6] riscv: virt: Allow specifying a CPU
From: |
Alistair Francis |
Subject: |
[Qemu-devel] [PATCH for 4.1 v1 3/6] riscv: virt: Allow specifying a CPU via commandline |
Date: |
Tue, 19 Mar 2019 18:21:14 +0000 |
Signed-off-by: Alistair Francis <address@hidden>
---
hw/riscv/virt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index fc4c6b306e..5b25f028ad 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -400,7 +400,7 @@ static void riscv_virt_board_init(MachineState *machine)
/* Initialize SOC */
object_initialize_child(OBJECT(machine), "soc", &s->soc, sizeof(s->soc),
TYPE_RISCV_HART_ARRAY, &error_abort, NULL);
- object_property_set_str(OBJECT(&s->soc), VIRT_CPU, "cpu-type",
+ object_property_set_str(OBJECT(&s->soc), machine->cpu_type, "cpu-type",
&error_abort);
object_property_set_int(OBJECT(&s->soc), smp_cpus, "num-harts",
&error_abort);
@@ -526,6 +526,7 @@ static void riscv_virt_board_machine_init(MachineClass *mc)
mc->desc = "RISC-V VirtIO Board (Privileged ISA v1.10)";
mc->init = riscv_virt_board_init;
mc->max_cpus = 8; /* hardcoded limit in BBL */
+ mc->default_cpu_type = VIRT_CPU;
}
DEFINE_MACHINE("virt", riscv_virt_board_machine_init)
--
2.21.0
- [Qemu-devel] [PATCH for 4.1 v1 0/6] RISC-V: Allow specifying CPU ISA via command line, Alistair Francis, 2019/03/19
- [Qemu-devel] [PATCH for 4.1 v1 5/6] target/riscv: Remove the generic no MMU CPUs, Alistair Francis, 2019/03/19
- [Qemu-devel] [PATCH for 4.1 v1 1/6] target/riscv: Fall back to generating a RISC-V CPU, Alistair Francis, 2019/03/19
- [Qemu-devel] [PATCH for 4.1 v1 3/6] riscv: virt: Allow specifying a CPU via commandline,
Alistair Francis <=
- [Qemu-devel] [PATCH for 4.1 v1 4/6] target/riscvL Remove the unused any CPU, Alistair Francis, 2019/03/19
- [Qemu-devel] [PATCH for 4.1 v1 2/6] target/riscv: Create settable CPU properties, Alistair Francis, 2019/03/19
- [Qemu-devel] [PATCH for 4.1 v1 6/6] riscv: Add a generic spike machine, Alistair Francis, 2019/03/19