summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnup Patel <[email protected]>2019-12-12 07:31:38 +0530
committerAnup Patel <[email protected]>2019-12-16 14:48:23 +0530
commit086dbdfc926301c8273a64a064452b7d97f0d9a4 (patch)
tree99b3056ffa31db16b181bbeaf1b0e4798935142b
parent4370f18f3467fee4a80fd463f1c0247d02f912d6 (diff)
lib: Fix sbi_get_insn() for load guest page fault
We should treat load guest page fault in sbi_get_insn() as fetch guest patch fault. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Alistair Francis <[email protected]>
-rw-r--r--lib/sbi/sbi_unpriv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sbi/sbi_unpriv.c b/lib/sbi/sbi_unpriv.c
index 9d384bb3..07ef4a9b 100644
--- a/lib/sbi/sbi_unpriv.c
+++ b/lib/sbi/sbi_unpriv.c
@@ -169,6 +169,10 @@ ulong sbi_get_insn(ulong mepc, struct sbi_scratch *scratch,
trap->cause = CAUSE_FETCH_PAGE_FAULT;
trap->tval = mepc;
break;
+ case CAUSE_LOAD_GUEST_PAGE_FAULT:
+ trap->cause = CAUSE_FETCH_GUEST_PAGE_FAULT;
+ trap->tval = mepc;
+ break;
default:
break;
};