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