From: Song Gao <[email protected]> Exception ADEM/ADEF need update CSR_BADV, the value from the virtual address.
Signed-off-by: Song Gao <[email protected]> Signed-off-by: Bibo Mao <[email protected]> Reviewed-by: Bibo Mao <[email protected]> --- target/loongarch/tcg/tcg_cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/loongarch/tcg/tcg_cpu.c b/target/loongarch/tcg/tcg_cpu.c index 4b4bf39d09..af92277669 100644 --- a/target/loongarch/tcg/tcg_cpu.c +++ b/target/loongarch/tcg/tcg_cpu.c @@ -227,6 +227,7 @@ static void loongarch_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr, { CPULoongArchState *env = cpu_env(cs); + env->CSR_BADV = addr; if (access_type == MMU_INST_FETCH) { do_raise_exception(env, EXCCODE_ADEF, retaddr); } else { -- 2.52.0
