[PATCH v6 04/33] riscv: Add support for per-thread envcfg CSR values