]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/riscv: rvv: Fix incorrect vlen comparison in prop_vlen_set
authorMax Chou <max.chou@sifive.com>
Fri, 24 Jan 2025 09:05:38 +0000 (17:05 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 18 Mar 2025 06:02:47 +0000 (09:02 +0300)
commit1fc0a58a982c821100a353edf2e5fca76effb1a2
tree4e5c3897fd2adeb1d043c9d1ab90279d1d7e974e
parent39408f6f145de8401675501d7ee1ff34268523d9
target/riscv: rvv: Fix incorrect vlen comparison in prop_vlen_set

In prop_vlen_set function, there is an incorrect comparison between
vlen(bit) and vlenb(byte).
This will cause unexpected error when user applies the `vlen=1024` cpu
option with a vendor predefined cpu type that the default vlen is
1024(vlenb=128).

Fixes: 4f6d036ccc ("target/riscv/cpu.c: remove cpu->cfg.vlen")
Signed-off-by: Max Chou <max.chou@sifive.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-ID: <20250124090539.2506448-1-max.chou@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
(cherry picked from commit bf3adf93f16730ca5aaa6c26cf969e64eeff6e7b)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/riscv/cpu.c