summaryrefslogtreecommitdiff
path: root/lib/sbi/sbi_hart.c
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-05-28 06:07:42 +0300
committerAnup Patel <anup@brainfault.org>2020-06-08 13:11:23 +0300
commit1b8c0128f1d79d69ea0a46b758fef4be8dc0a73e (patch)
treef7f5a322710d6cd9638444b1130b1662c883f459 /lib/sbi/sbi_hart.c
parent51f0e4a0533fe8b5d713379ab3a6cb676add82da (diff)
downloadopensbi-1b8c0128f1d79d69ea0a46b758fef4be8dc0a73e.tar.xz
lib: Add RISC-V hypervisor v0.6.1 support
To support RISC-V hypervisor v0.6.1, we: 1. Don't need to explicitly forward WFI traps from VS/VU-mode 2. Have to delegate virtual instruction trap to HS-mode 3. Have to update trap redirection for changes in HSTATUS CSR Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/sbi/sbi_hart.c')
-rw-r--r--lib/sbi/sbi_hart.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c
index 5fa30f3..88d0ac8 100644
--- a/lib/sbi/sbi_hart.c
+++ b/lib/sbi/sbi_hart.c
@@ -110,6 +110,7 @@ static int delegate_traps(struct sbi_scratch *scratch, u32 hartid)
exceptions |= (1U << CAUSE_SUPERVISOR_ECALL);
exceptions |= (1U << CAUSE_FETCH_GUEST_PAGE_FAULT);
exceptions |= (1U << CAUSE_LOAD_GUEST_PAGE_FAULT);
+ exceptions |= (1U << CAUSE_VIRTUAL_INST_FAULT);
exceptions |= (1U << CAUSE_STORE_GUEST_PAGE_FAULT);
}