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 <anup.patel@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
Anup Patel
2019-12-12 07:31:38 +05:30
committed by Anup Patel
parent 4370f18f34
commit 086dbdfc92

View File

@@ -169,6 +169,10 @@ ulong sbi_get_insn(ulong mepc, struct sbi_scratch *scratch,
trap->cause = CAUSE_FETCH_PAGE_FAULT; trap->cause = CAUSE_FETCH_PAGE_FAULT;
trap->tval = mepc; trap->tval = mepc;
break; break;
case CAUSE_LOAD_GUEST_PAGE_FAULT:
trap->cause = CAUSE_FETCH_GUEST_PAGE_FAULT;
trap->tval = mepc;
break;
default: default:
break; break;
}; };