Skip to content

Commit 6674687

Browse files
committed
target/loongarch: Only flush one TLB entry in helper_invtlb_page_asid_or_g()
With function helper_invtlb_page_asid_or_g(), only one TLB entry in LoongArch emulated TLB is invalidated. so with QEMU TLB, it is not necessary to flush all QEMU TLB, only flush address range specified LoongArch emulated TLB is ok. Here invalidate_tlb_entry() is called so that only QEMU TLB entry with specified address range is flushed. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
1 parent 56db997 commit 6674687

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

target/loongarch/tcg/tlb_helper.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,7 @@ void helper_invtlb_page_asid_or_g(CPULoongArchState *env,
556556
func = tlb_match_any;
557557
tlb = loongarch_tlb_search_cb(env, addr, asid, func);
558558
if (tlb) {
559-
tlb->tlb_misc = FIELD_DP64(tlb->tlb_misc, TLB_MISC, E, 0);
560-
tlb_flush(env_cpu(env));
559+
invalidate_tlb(env, tlb - env->tlb);
561560
}
562561
}
563562

0 commit comments

Comments
 (0)