[RFC PATCH v1 02/28] riscv: envcfg save and restore on trap entry/exit