Received: from eggs.gnu.org ([208.118.235.92]:37265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKafT-0003P2-Tk for qemu-devel@nongnu.org; Sat, 06 Oct 2012 16:08:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKafS-0004mw-MA for qemu-devel@nongnu.org; Sat, 06 Oct 2012 16:08:11 -0400 References: <1349369735-14997-1-git-send-email-agraf@suse.de> <20121006183532.GA31504@ohm.aurel32.net> In-Reply-To: <20121006183532.GA31504@ohm.aurel32.net> Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <470CA5EC-080D-4F52-8D4C-F25EA8ECAF20@suse.de> From: Alexander Graf Date: Sat, 6 Oct 2012 22:08:29 +0200 Subject: Re: [Qemu-devel] [PATCH] PPC: e500: Only expose even TLB sizes in initial TLB List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: "qemu-ppc@nongnu.org List" , qemu-devel qemu-devel On 06.10.2012, at 20:35, Aurelien Jarno wrote: > On Thu, Oct 04, 2012 at 06:55:35PM +0200, Alexander Graf wrote: >> When booting our e500 machine, we automatically generate a big TLB entry >> in TLB1 that covers all of the code we need to run in there until the gue= st >> can handle its TLB on its own. >>=20 >> However, e500v2 can only handle MAS1.0 sizes. However, we keep our TLB >> information in MAS2.0 layout, which means we have twice as many TLB sizes= >> to choose from. That also means we can run into a situation where we try >> to add a TLB size that could not fit into the MAS1.0 size bits. >>=20 >> Fix it by making sure we always have the lower bit set to 0. That way we >> are always guaranteed to have MAS1.0 compatible TLB size information. >>=20 >> Signed-off-by: Alexander Graf >> --- >> hw/ppc/e500.c | 4 ++++ >> 1 files changed, 4 insertions(+), 0 deletions(-) >>=20 >> diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c >> index feb712e..d23f9b2 100644 >> --- a/hw/ppc/e500.c >> +++ b/hw/ppc/e500.c >> @@ -362,6 +362,10 @@ static void mmubooke_create_initial_mapping(CPUPPCSt= ate *env) >> the device tree top */ >> dt_end =3D bi->dt_base + bi->dt_size; >> ps =3D booke206_page_size_to_tlb(dt_end) + 1; >> + if (ps & 1) { >> + /* e500v2 can only do even TLB size bits */ >> + ps++; >> + } >> size =3D (ps << MAS1_TSIZE_SHIFT); >> tlb->mas1 =3D MAS1_VALID | size; >> tlb->mas2 =3D 0; >=20 > Applied (actually as part of the PPC pull). Yes, these were quite critical bugfixes that I folded into the pull request.= Sorry for not noting it anywhere :). Alex >=20 >=20 > --=20 > Aurelien Jarno GPG: 1024D/F1BCDB73 > aurelien@aurel32.net http://www.aurel32.net