Invalid tlb entry in function invalidate_tlb(), and its usage is simple and easy to use.
Signed-off-by: Bibo Mao <maob...@loongson.cn> --- target/loongarch/tcg/tlb_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/loongarch/tcg/tlb_helper.c b/target/loongarch/tcg/tlb_helper.c index 5864858ccf..df11ff4995 100644 --- a/target/loongarch/tcg/tlb_helper.c +++ b/target/loongarch/tcg/tlb_helper.c @@ -171,6 +171,7 @@ static void invalidate_tlb(CPULoongArchState *env, int index) return; } invalidate_tlb_entry(env, index); + tlb->tlb_misc = FIELD_DP64(tlb->tlb_misc, TLB_MISC, E, 0); } static void fill_tlb_entry(CPULoongArchState *env, LoongArchTLB *tlb) @@ -351,7 +352,6 @@ void helper_tlbwr(CPULoongArchState *env) old = env->tlb + index; if (FIELD_EX64(env->CSR_TLBIDX, CSR_TLBIDX, NE)) { invalidate_tlb(env, index); - old->tlb_misc = FIELD_DP64(old->tlb_misc, TLB_MISC, E, 0); return; } -- 2.39.3