From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJ1CV-00069z-Mt for qemu-devel@nongnu.org; Fri, 22 Mar 2013 08:36:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UJ1CQ-0001rZ-2J for qemu-devel@nongnu.org; Fri, 22 Mar 2013 08:36:03 -0400 Message-ID: <514C5027.1040900@suse.de> Date: Fri, 22 Mar 2013 13:35:51 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1363953412-27847-1-git-send-email-yeongkyoon.lee@samsung.com> In-Reply-To: <1363953412-27847-1-git-send-email-yeongkyoon.lee@samsung.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-stable][PATCH v2] tcg: Fix occasional TCG broken problem when ldst optimization enabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yeongkyoon Lee Cc: sw@weilnetz.de, qemu-devel@nongnu.org, qemu-stable@nongnu.org, blauwirbel@gmail.com, aurelien@aurel32.net, rth@twiddle.net Am 22.03.2013 12:56, schrieb Yeongkyoon Lee: > is_tcg_gen_code() checks the upper limit of TCG generated code range wr= ong, so > that TCG could get broken occasionally only when CONFIG_QEMU_LDST_OPTIM= IZATION > enabled. The reason is code_gen_buffer_max_size does not cover the uppe= r range > up to (TCG_MAX_OP_SIZE * OPC_BUF_SIZE), thus code_gen_buffer_max_size s= hould be > modified to code_gen_buffer_size. >=20 > Signed-off-by: Yeongkyoon Lee > --- >=20 > Here's is the promised patch with Aurelien Jarno for TCG broken problem= , which > is supposed to be applied to 1.3.x and 1.4.x releases as well as master= . In that case either the author or the committer should add Cc: qemu-stable@nongnu.org to the commit message please. Andreas > Thanks to Aurelien Jarno and Stefan Weil. >=20 > translate-all.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/translate-all.c b/translate-all.c > index 1f3237e..72bea9b 100644 > --- a/translate-all.c > +++ b/translate-all.c > @@ -1308,11 +1308,11 @@ static void tb_link_page(TranslationBlock *tb, = tb_page_addr_t phys_pc, > /* check whether the given addr is in TCG generated code buffer or not= */ > bool is_tcg_gen_code(uintptr_t tc_ptr) > { > - /* This can be called during code generation, code_gen_buffer_max_= size > + /* This can be called during code generation, code_gen_buffer_size > is used instead of code_gen_ptr for upper boundary checking */ > return (tc_ptr >=3D (uintptr_t)tcg_ctx.code_gen_buffer && > tc_ptr < (uintptr_t)(tcg_ctx.code_gen_buffer + > - tcg_ctx.code_gen_buffer_max_size)); > + tcg_ctx.code_gen_buffer_size)); > } > #endif > =20 >=20 --=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