qemu/qemu/dcd028517749835a618bb1fe8dca32d82318e1c1 target/riscv: Apply UXL WARL handling to vsstatus
write_mstatus() already handles the reserved UXL value by writing a
legal value instead.
Apply the same handling when writing vsstatus so that reserved UXL
values follow the same WARL behavior.
Factor the common logic into a local helper riscv_write_uxl() and use
it for both mstatus and vsstatus.
Suggested-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Fixes: f310df58bd2 ("target/riscv: Enable uxl field write")
Signed-off-by: SeungJu Cheon <suunj1331@gmail.com>
Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Message-ID: <20260625081521.595683-1-suunj1331@gmail.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
1 file changed