Received: from eggs.gnu.org ([140.186.70.92]:34035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QIpAv-0006LH-0x for qemu-devel@nongnu.org; Sat, 07 May 2011 17:36:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QIpAu-0005UM-2m for qemu-devel@nongnu.org; Sat, 07 May 2011 17:36:32 -0400 Received: from cantor.suse.de ([195.135.220.2]:48460 helo=mx1.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QIpAt-0005UI-RU for qemu-devel@nongnu.org; Sat, 07 May 2011 17:36:32 -0400 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <20110506172532.6f03cd81@schlenkerla.am.freescale.net> Date: Sat, 7 May 2011 23:36:29 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <47DDFCCF-2385-4763-BDFD-1E945809D0FC@suse.de> References: <1304683237-26177-1-git-send-email-agraf@suse.de> <1304683237-26177-6-git-send-email-agraf@suse.de> <20110506172532.6f03cd81@schlenkerla.am.freescale.net> Subject: Re: [Qemu-devel] [PATCH 5/7] PPC: Implement e500 (FSL) MMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Scott Wood Cc: "Edgar E. Iglesias" , Liu Yu , QEMU-devel Developers On 07.05.2011, at 00:25, Scott Wood wrote: > On Fri, 6 May 2011 14:00:35 +0200 > Alexander Graf wrote: >=20 >> +static inline void booke206_flush_tlb_one(ppc_tlb_t *tlb, int num) >> +{ >> + int i; >> + >> + for (i =3D 0; i < num; i++) { >> + if ((tlb[i].tlbe.prot & PAGE_VALID) && >> + !(tlb[i].tlbe.attr & MAS1_IPROT)) { >> + tlb[i].tlbe.prot =3D 0; >> + } >> + } >> +} >=20 > When this is called on reset, we want to ignore IPROT. Ugh. Yes. This functions needs a constant parameter to know if it should = check for IPROT - and not do so on reset :). > The valid check seems unnecessary. Yup, but it really helps to reduce debug output when putting in some in = that line which I did :). It shouldn't really hurt, right? >> +void helper_booke206_tlbsx(target_ulong address_hi, target_ulong = address_lo) >=20 > What is address_hi? >=20 > =46rom gen_tlbsx_booke206() it looks like these two arguments = correspond to > the two operands, so shouldn't they be added together? I only see > address_lo used. Yup. According to the e500 spec: Note that rA =3D 0 is the preferred form for tlbsx and that some = Freescale implementations, such as the e500, take an illegal instruction = exception program interrupt if rA!=3D0. So I figured that we're architecturally close enough if we just ignore = it for now :). Alex