aboutsummaryrefslogtreecommitdiff
path: root/target/riscv
diff options
context:
space:
mode:
authorRob Bradford <rbradford@rivosinc.com>2024-09-30 17:52:57 +0100
committerAlistair Francis <alistair.francis@wdc.com>2024-10-30 11:22:08 +1000
commitf8c1f36a2e3dab4935e7c5690e578ac71765766b (patch)
treebbf0fef41f04b923bd063c9c5f869c61d2c1e4c9 /target/riscv
parenta84be2baa9eca8bc500f866ad943b8f63dc99adf (diff)
target/riscv: Set vtype.vill on CPU reset
The RISC-V unprivileged specification "31.3.11. State of Vector Extension at Reset" has a note that recommends vtype.vill be set on reset as part of ensuring that the vector extension have a consistent state at reset. This change now makes QEMU consistent with Spike which sets vtype.vill on reset. Signed-off-by: Rob Bradford <rbradford@rivosinc.com> Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Message-ID: <20240930165258.72258-1-rbradford@rivosinc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target/riscv')
-rw-r--r--target/riscv/cpu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index 0c8e017f71..2a78cd639b 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -1010,6 +1010,7 @@ static void riscv_cpu_reset_hold(Object *obj, ResetType type)
cs->exception_index = RISCV_EXCP_NONE;
env->load_res = -1;
set_default_nan_mode(1, &env->fp_status);
+ env->vill = true;
#ifndef CONFIG_USER_ONLY
if (cpu->cfg.debug) {