lib: sbi_trap: Set hypervisor CSRs for HS-mode
authorVivian Wang <dramforever@live.com>
Thu, 4 Aug 2022 14:32:30 +0000 (22:32 +0800)
committerAnup Patel <anup@brainfault.org>
Mon, 22 Aug 2022 03:20:04 +0000 (08:50 +0530)
commit5a0ca098f176fd5b84d311e82543a05aaab8cafb
tree57b4b6c2377cb9b1cca0453f305c06680340b918
parent1c4ce74f5128b7e1094ad253c9bc5fd732e3d82b
lib: sbi_trap: Set hypervisor CSRs for HS-mode

The hypervisor CSRs hstatus, htval, htinst should always be set if the
trap is to be taken in HS-mode, regardless of which mode it came from.

Signed-off-by: Vivian Wang <dramforever@live.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
lib/sbi/sbi_trap.c