Is there an existing CVA6 bug for this?
Bug Description
Description
The RISC-V Privileged Specification defines mstatus.SXL and mstatus.UXL as the effective XLEN for S-mode and U-mode. When the corresponding privilege mode is not implemented, these fields should be read-only zero.
In CVA6, SXL and UXL are unconditionally assigned to XLEN_64 when IS_XLEN64 is true, regardless of whether S-mode (RVS) or U-mode (RVU) are implemented.
Spec reference
RISC-V Privileged Spec:
If S-mode is not supported: SXL is read-only 0
If U-mode is not supported: UXL is read-only 0

in CVA6
csr_regfile.sv

This makes SXL/UXL appear non-zero in configurations where CVA6Cfg.RVS=0 and/or CVA6Cfg.RVU=0.