aboutsummaryrefslogtreecommitdiff
path: root/hw/mips
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2023-05-21 22:18:59 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-07-10 23:33:37 +0200
commit99eff13120c8695f5d14b2edfe24739dd13b982f (patch)
treede5529c0636391050f1fdec102a4db28152258f5 /hw/mips
parent03afdc28b3ffb9315f9612052b2b1c250370c344 (diff)
downloadqemu-99eff13120c8695f5d14b2edfe24739dd13b982f.zip
qemu-99eff13120c8695f5d14b2edfe24739dd13b982f.tar.gz
qemu-99eff13120c8695f5d14b2edfe24739dd13b982f.tar.bz2
hw/mips/loongson3_virt: Relax CPU restrictions for TCG
After implemented CPUCFG and CSR, we are now able to boot Linux kernel with Loongson-3A4000 CPU, so there is no point to restrict CPU type to 3A1000 only, instead we just check for presence of INSN_LOONGSON3A. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Message-Id: <20230521214832.20145-3-jiaxun.yang@flygoat.com> [JY: Check for cpu_type_supports_isa(INSN_LOONGSON3A)] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'hw/mips')
-rw-r--r--hw/mips/loongson3_virt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c
index 3dd91da..4018b8c 100644
--- a/hw/mips/loongson3_virt.c
+++ b/hw/mips/loongson3_virt.c
@@ -481,8 +481,8 @@ static void mips_loongson3_virt_init(MachineState *machine)
if (!machine->cpu_type) {
machine->cpu_type = MIPS_CPU_TYPE_NAME("Loongson-3A1000");
}
- if (!strstr(machine->cpu_type, "Loongson-3A1000")) {
- error_report("Loongson-3/TCG needs cpu type Loongson-3A1000");
+ if (!cpu_type_supports_isa(machine->cpu_type, INSN_LOONGSON3A)) {
+ error_report("Loongson-3/TCG needs a Loongson-3 series cpu");
exit(1);
}
} else {