From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FBdJk-0001RB-Cl for qemu-devel@nongnu.org; Tue, 21 Feb 2006 14:37:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FBdJg-0001Ph-LV for qemu-devel@nongnu.org; Tue, 21 Feb 2006 14:36:58 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FBdJf-0001P2-Fr for qemu-devel@nongnu.org; Tue, 21 Feb 2006 14:36:55 -0500 Received: from [193.7.176.20] (helo=bender.bawue.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1FBdPz-0006MJ-B1 for qemu-devel@nongnu.org; Tue, 21 Feb 2006 14:43:27 -0500 Received: from lagash (unknown [194.74.144.146]) (using TLSv1 with cipher DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by bender.bawue.de (Postfix) with ESMTP id 020E3441CF for ; Tue, 21 Feb 2006 20:36:54 +0100 (MET) Received: from ths by lagash with local (Exim 4.60) (envelope-from ) id 1FBdJz-0004vw-P7 for qemu-devel@nongnu.org; Tue, 21 Feb 2006 19:37:15 +0000 Date: Tue, 21 Feb 2006 19:37:15 +0000 Message-ID: <20060221193715.GF4110@networkno.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline From: Thiemo Seufer Subject: [Qemu-devel] [PATCH] Don't flush global TLB entries Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hello All, this avoids flushing of global TLB entries for differing ASIDs. Thiemo Index: qemu-work/target-mips/op_helper.c =================================================================== --- qemu-work.orig/target-mips/op_helper.c 2006-02-19 01:30:55.000000000 +0000 +++ qemu-work/target-mips/op_helper.c 2006-02-19 16:18:43.000000000 +0000 @@ -622,13 +622,14 @@ void do_tlbr (void) { tlb_t *tlb; + uint8_t ASID; int size; + ASID = env->CP0_EntryHi & 0xFF; tlb = &env->tlb[env->CP0_index & (MIPS_TLB_NB - 1)]; /* If this will change the current ASID, flush qemu's TLB. */ - /* FIXME: Could avoid flushing things which match global entries... */ - if ((env->CP0_EntryHi & 0xFF) != tlb->ASID) + if (ASID != tlb->ASID && tlb->G != 1) tlb_flush (env, 1); env->CP0_EntryHi = tlb->VPN | tlb->ASID;