diff options
author | Daniel Henrique Barboza <dbarboza@ventanamicro.com> | 2024-03-06 14:19:24 -0300 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2024-03-08 20:48:03 +1000 |
commit | 944b6dfd3d67236882f2bc09d1d30ed923268e16 (patch) | |
tree | 7f9f7493e97ec1268e60b518bb4baa1190f57a88 /target/riscv/tcg | |
parent | e231ec8f677d94ee38316bce8e8bad3e324b0434 (diff) |
trans_rvv.c.inc: mark_vs_dirty() before loads and stores
While discussing a problem with how we're (not) setting vstart_eq_zero
Richard had the following to say w.r.t the conditional mark_vs_dirty()
calls on load/store functions [1]:
"I think it's required to have stores set dirty unconditionally, before
the operation.
Consider a store that traps on the 2nd element, leaving vstart = 2, and
exiting to the main loop via exception. The exception enters the kernel
page fault handler. The kernel may need to fault in the page for the
process, and in the meantime task switch.
If vs dirty is not already set, the kernel won't know to save vector
state on task switch."
Do a mark_vs_dirty() before both loads and stores.
[1] https://lore.kernel.org/qemu-riscv/72c7503b-0f43-44b8-aa82-fbafed2aac0c@linaro.org/
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
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: <20240306171932.549549-2-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target/riscv/tcg')
0 files changed, 0 insertions, 0 deletions