From: pbrook Date: Sun, 12 Nov 2006 20:55:05 +0000 (+0000) Subject: Avoid redundant TLB flushes (Daniel Jacobowitz). X-Git-Tag: release_0_9_1~1684 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e45eeab0990c8c05d8a3371e9218fc40c1bd8ff0;p=qemu-xen-4.6-testing.git Avoid redundant TLB flushes (Daniel Jacobowitz). --- diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index bf397c9b4..6e31436f5 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -572,8 +572,17 @@ static void invalidate_tlb (int idx) { tlb_t *tlb; target_ulong addr; + uint8_t ASID; + + ASID = env->CP0_EntryHi & 0xFF; tlb = &env->tlb[idx]; + /* The qemu TLB is flushed then the ASID changes, so no need to + flush these entries again. */ + if (tlb->G == 0 && tlb->ASID != ASID) { + return; + } + if (tlb->V0) { tb_invalidate_page_range(tlb->PFN[0], tlb->end - tlb->VPN); addr = tlb->VPN;