From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGGGx-0007NY-SI for qemu-devel@nongnu.org; Tue, 27 Jan 2015 19:14:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGGGt-00028s-NO for qemu-devel@nongnu.org; Tue, 27 Jan 2015 19:14:19 -0500 Received: from eddie.linux-mips.org ([148.251.95.138]:52215 helo=cvs.linux-mips.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGGGt-00028S-Eu for qemu-devel@nongnu.org; Tue, 27 Jan 2015 19:14:15 -0500 Received: from localhost.localdomain ([127.0.0.1]:60682 "EHLO localhost.localdomain" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S27011158AbbA1AOOBjzWG (ORCPT ); Wed, 28 Jan 2015 01:14:14 +0100 Date: Wed, 28 Jan 2015 00:14:13 +0000 (GMT) From: "Maciej W. Rozycki" In-Reply-To: <1422287596-5621-1-git-send-email-leon.alrae@imgtec.com> Message-ID: References: <1422287596-5621-1-git-send-email-leon.alrae@imgtec.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [Qemu-devel] [PATCH] target-mips: fix detection of the end of the page during translation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leon Alrae Cc: qemu-devel@nongnu.org On Mon, 26 Jan 2015, Leon Alrae wrote: > The test is supposed to terminate TB if the end of the page is reached. > However, with current implementation it may never succeed for microMIPS or > mips16. > > Reported-by: Richard Henderson > Signed-off-by: Leon Alrae > --- I'm not sure if you need this, but just in case it helps anyhow. Reviewed-by: Maciej W. Rozycki > diff --git a/target-mips/translate.c b/target-mips/translate.c > index e9d86b2..f33c10c 100644 > --- a/target-mips/translate.c > +++ b/target-mips/translate.c > @@ -19103,6 +19104,7 @@ gen_intermediate_code_internal(MIPSCPU *cpu, TranslationBlock *tb, > qemu_log("search pc %d\n", search_pc); > > pc_start = tb->pc; > + next_page_start = (pc_start & TARGET_PAGE_MASK) + TARGET_PAGE_SIZE; As a related issue -- I don't know offhand how far we are with small page support, but we may have to revise these macros -- or specifically how TARGET_PAGE_BITS these build on has been defined -- once we get there, to avoid surprises. Just a heads-up! Maciej