From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTWH1-0001Zv-0G for qemu-devel@nongnu.org; Thu, 24 Nov 2011 05:11:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTWGv-0000mG-9C for qemu-devel@nongnu.org; Thu, 24 Nov 2011 05:11:18 -0500 Received: from cantor2.suse.de ([195.135.220.15]:43105 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTWGv-0000m8-4L for qemu-devel@nongnu.org; Thu, 24 Nov 2011 05:11:13 -0500 Message-ID: <4ECE1821.8030106@suse.de> Date: Thu, 24 Nov 2011 11:10:41 +0100 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] TLB collision List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Rolnik Cc: Blue Swirl , qemu-devel@nongnu.org Hi, Am 24.11.2011 10:53, schrieb Michael Rolnik: > I have a question regarding MMU. > I've built a SPARC based small embedded system. You've already sent this two times. What you keep forgetting is to cc the sparc maintainer and to tell us whether this is sparc32 or sparc64. The latter was rather incomplete, so you might be hitting a corner case. Also when building new machines you are generally well advised to use an up-to-date git version. Regards, Andreas > at this system addresses 0x00000000-0x00008000 (32KB) belong to ROM an= d > 0x80000000 - 0x80010000 to RAM.=20 > the problem is that when a code from first ROM page accesses a memory a= t > the address 0x80000000 there is an infinite loop. >=20 > - cpu_sparc_handle_mmu_fault is called to bring addres 0x00000000 > - cpu_sparc_handle_mmu_fault is called to bring 0x80000000 and > flushes 0x00000000 > - cpu_sparc_handle_mmu_fault is called to bring 0x00000000 and > flushes 0x80000000 > ... >=20 > this can be fixed if I set CPU_TLB_BITS to be 20 bits (assuming page > size of 4KB). >=20 > is there a better solution? >=20 >=20 > I was thinking about 2-way TLB so two virtual addresses sharing same TL= B > entry will be resident.=20 > in order not to degrade performance=20 > 1. *tcg_out_qemu_ld* and *tcg_out_qemu_st* should remain as it, > which mean they will always look into way0. > 2. *tlb_set_page* should copy way0 to way1 and program way0 with ne= w > values > 3. all other routines dealing with TLB should search both ways. >=20 > what do you think? >=20 > --=20 > Best Regards, > Michael Rolnik --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg