From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IgmKW-0006R3-Vs for qemu-devel@nongnu.org; Sat, 13 Oct 2007 15:07:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IgmKV-0006Pr-8a for qemu-devel@nongnu.org; Sat, 13 Oct 2007 15:07:20 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IgmKV-0006Pc-2f for qemu-devel@nongnu.org; Sat, 13 Oct 2007 15:07:19 -0400 Received: from relay01.mx.bawue.net ([193.7.176.67]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IgmKU-0001ZF-Nz for qemu-devel@nongnu.org; Sat, 13 Oct 2007 15:07:19 -0400 Date: Sat, 13 Oct 2007 20:07:10 +0100 From: Thiemo Seufer Subject: Re: [Fwd: Re: [Qemu-devel] RFC: Code fetch optimisation] Message-ID: <20071013190710.GO3379@networkno.de> References: <1192230023.9976.291.camel@rapid> <1192269423.9976.310.camel@rapid> <1192273558.9976.321.camel@rapid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1192273558.9976.321.camel@rapid> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "J. Mayer" Cc: qemu-devel@nongnu.org J. Mayer wrote: [snip] > > My idea of always using the ldx_code_p function is that we may have the > > occasion to make it more cleaver and make the slow case handle code > > execution in mmio areas, when it will be possible. > > Here's an updated patch. I added a definition TARGET_HAS_VLE_INSNS which > is defined is the cris, i386, m68k and ppcemb cases. Arm already has an > explicit support for 32 bits thumb instructions spanning 2 pages, so it > should not need this define. When this define is not set, the > ldxxx_code_p function just does ldxxx_raw(phys_pc) in the softmmu case > and ldxxx_raw(pc) in the user-mode only case. This is optimal for pure > RISC architectures and does not need the #ifdef CONFIG_USER_ONLY you > added for Sparc in your patch version. I also added a provision for a > TARGET_MMIO_CODE define which may be used later when this will really be > supported by Qemu. > I also took your fixes for Sparc phys_pc computation, but reversed your > patch to use ldl_raw as it should not be needed anymore. > I did test PowerPC in user-mode only and softmmu mode and i386 in > softmmu successfully using this new version of the patch. Works ok for MIPS. There's no obvious change in performance, I guess the slow TLB emulation drowns out any possible improvement. Thiemo