summary refs log tree commit diff stats
path: root/hw/riscv/virt.c
diff options
context:
space:
mode:
authorIvan Klokov <ivan.klokov@syntacore.com>2024-03-14 14:57:03 -0300
committerAlistair Francis <alistair.francis@wdc.com>2024-03-22 15:24:37 +1000
commitbac802ada83100c0c47f64ff219aba0e5357dcbd (patch)
tree0e32a6d9e7b760e0d02f2a2f1f187010a0cff5ac /hw/riscv/virt.c
parentd57dfe4b37ae542cec84a0cf751ecef313614cb6 (diff)
downloadfocaccia-qemu-bac802ada83100c0c47f64ff219aba0e5357dcbd.tar.gz
focaccia-qemu-bac802ada83100c0c47f64ff219aba0e5357dcbd.zip
target/riscv: enable 'vstart_eq_zero' in the end of insns
The vstart_eq_zero flag is updated at the beginning of the translation
phase from the env->vstart variable. During the execution phase all
functions will set env->vstart = 0 after a successful execution, but the
vstart_eq_zero flag remains the same as at the start of the block. This
will wrongly cause SIGILLs in translations that requires env->vstart = 0
and might be reading vstart_eq_zero = false.

This patch adds a new finalize_rvv_inst() helper that is called at the
end of each vector instruction that will both update vstart_eq_zero and
do a mark_vs_dirty().

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1976
Signed-off-by: Ivan Klokov <ivan.klokov@syntacore.com>
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240314175704.478276-10-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'hw/riscv/virt.c')
0 files changed, 0 insertions, 0 deletions