[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/37] target/riscv/cpu.c: Fix elen check
From: |
Alistair Francis |
Subject: |
[PULL 13/37] target/riscv/cpu.c: Fix elen check |
Date: |
Fri, 20 Jan 2023 17:38:49 +1000 |
From: Dongxue Zhang <elta.era@gmail.com>
The elen check should be cpu->cfg.elen in range [8, 64].
Signed-off-by: Dongxue Zhang <elta.era@gmail.com>
Reviewed-by: LIU Zhiwei <zhiwe_liu@linux.alibaba.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <167236721596.15277.2653405273227256289-0@git.sr.ht>
[ Changes by AF:
- Tidy up commit message
]
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
target/riscv/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index cc75ca7667..a2e6238bd7 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -882,7 +882,7 @@ static void riscv_cpu_realize(DeviceState *dev, Error
**errp)
"Vector extension ELEN must be power of 2");
return;
}
- if (cpu->cfg.elen > 64 || cpu->cfg.vlen < 8) {
+ if (cpu->cfg.elen > 64 || cpu->cfg.elen < 8) {
error_setg(errp,
"Vector extension implementation only supports ELEN "
"in the range [8, 64]");
--
2.39.0
- [PULL 09/37] hw/riscv/boot.c: make riscv_find_firmware() static, (continued)
- [PULL 09/37] hw/riscv/boot.c: make riscv_find_firmware() static, Alistair Francis, 2023/01/20
- [PULL 06/37] hw/char: riscv_htif: Remove forward declarations for non-existent variables, Alistair Francis, 2023/01/20
- [PULL 10/37] hw/riscv/boot.c: introduce riscv_default_firmware_name(), Alistair Francis, 2023/01/20
- [PULL 03/37] hw/char: riscv_htif: Drop useless assignment of memory region, Alistair Francis, 2023/01/20
- [PULL 04/37] hw/char: riscv_htif: Use conventional 's' for HTIFState, Alistair Francis, 2023/01/20
- [PULL 05/37] hw/char: riscv_htif: Move registers from CPUArchState to HTIFState, Alistair Francis, 2023/01/20
- [PULL 07/37] hw/char: riscv_htif: Support console output via proxy syscall, Alistair Francis, 2023/01/20
- [PULL 08/37] hw/riscv: spike: Remove the out-of-date comments, Alistair Francis, 2023/01/20
- [PULL 11/37] hw/riscv/boot.c: Introduce riscv_find_firmware(), Alistair Francis, 2023/01/20
- [PULL 12/37] hw/riscv: spike: Decouple create_fdt() dependency to ELF loading, Alistair Francis, 2023/01/20
- [PULL 13/37] target/riscv/cpu.c: Fix elen check,
Alistair Francis <=
- [PULL 14/37] tests/avocado: add RISC-V OpenSBI boot test, Alistair Francis, 2023/01/20
- [PULL 16/37] hw/riscv/sifive_u: use 'fdt' from MachineState, Alistair Francis, 2023/01/20
- [PULL 15/37] hw/riscv/spike: use 'fdt' from MachineState, Alistair Francis, 2023/01/20
- [PULL 17/37] hw/riscv/boot.c: exit early if filename is NULL in load functions, Alistair Francis, 2023/01/20
- [PULL 18/37] hw/riscv/spike.c: load initrd right after riscv_load_kernel(), Alistair Francis, 2023/01/20
- [PULL 19/37] hw/riscv: write initrd 'chosen' FDT inside riscv_load_initrd(), Alistair Francis, 2023/01/20
- [PULL 20/37] hw/riscv: write bootargs 'chosen' FDT after riscv_load_kernel(), Alistair Francis, 2023/01/20
- [PULL 21/37] hw/riscv/boot.c: use MachineState in riscv_load_initrd(), Alistair Francis, 2023/01/20
- [PULL 22/37] hw/riscv/boot.c: use MachineState in riscv_load_kernel(), Alistair Francis, 2023/01/20
- [PULL 23/37] target/riscv/cpu: set cpu->cfg in register_cpu_props(), Alistair Francis, 2023/01/20