* [Qemu-devel] [Qemu-stable][PATCH v2] tcg: Fix occasional TCG broken problem when ldst optimization enabled
@ 2013-03-22 11:56 Yeongkyoon Lee
2013-03-22 11:58 ` Peter Maydell
2013-03-22 12:35 ` Andreas Färber
0 siblings, 2 replies; 3+ messages in thread
From: Yeongkyoon Lee @ 2013-03-22 11:56 UTC (permalink / raw)
To: qemu-devel; +Cc: Yeongkyoon Lee, sw, qemu-stable, blauwirbel, aurelien, rth
is_tcg_gen_code() checks the upper limit of TCG generated code range wrong, so
that TCG could get broken occasionally only when CONFIG_QEMU_LDST_OPTIMIZATION
enabled. The reason is code_gen_buffer_max_size does not cover the upper range
up to (TCG_MAX_OP_SIZE * OPC_BUF_SIZE), thus code_gen_buffer_max_size should be
modified to code_gen_buffer_size.
Signed-off-by: Yeongkyoon Lee <yeongkyoon.lee@samsung.com>
---
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.
Thanks to Aurelien Jarno and Stefan Weil.
translate-all.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 >= (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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [Qemu-stable][PATCH v2] tcg: Fix occasional TCG broken problem when ldst optimization enabled
2013-03-22 11:56 [Qemu-devel] [Qemu-stable][PATCH v2] tcg: Fix occasional TCG broken problem when ldst optimization enabled Yeongkyoon Lee
@ 2013-03-22 11:58 ` Peter Maydell
2013-03-22 12:35 ` Andreas Färber
1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2013-03-22 11:58 UTC (permalink / raw)
To: Yeongkyoon Lee; +Cc: sw, qemu-devel, qemu-stable, blauwirbel, aurelien, rth
On 22 March 2013 11:56, Yeongkyoon Lee <yeongkyoon.lee@samsung.com> wrote:
> is_tcg_gen_code() checks the upper limit of TCG generated code range wrong, so
> that TCG could get broken occasionally only when CONFIG_QEMU_LDST_OPTIMIZATION
> enabled. The reason is code_gen_buffer_max_size does not cover the upper range
> up to (TCG_MAX_OP_SIZE * OPC_BUF_SIZE), thus code_gen_buffer_max_size should be
> modified to code_gen_buffer_size.
>
> Signed-off-by: Yeongkyoon Lee <yeongkyoon.lee@samsung.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [Qemu-stable][PATCH v2] tcg: Fix occasional TCG broken problem when ldst optimization enabled
2013-03-22 11:56 [Qemu-devel] [Qemu-stable][PATCH v2] tcg: Fix occasional TCG broken problem when ldst optimization enabled Yeongkyoon Lee
2013-03-22 11:58 ` Peter Maydell
@ 2013-03-22 12:35 ` Andreas Färber
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Färber @ 2013-03-22 12:35 UTC (permalink / raw)
To: Yeongkyoon Lee; +Cc: sw, qemu-devel, qemu-stable, blauwirbel, aurelien, rth
Am 22.03.2013 12:56, schrieb Yeongkyoon Lee:
> is_tcg_gen_code() checks the upper limit of TCG generated code range wrong, so
> that TCG could get broken occasionally only when CONFIG_QEMU_LDST_OPTIMIZATION
> enabled. The reason is code_gen_buffer_max_size does not cover the upper range
> up to (TCG_MAX_OP_SIZE * OPC_BUF_SIZE), thus code_gen_buffer_max_size should be
> modified to code_gen_buffer_size.
>
> Signed-off-by: Yeongkyoon Lee <yeongkyoon.lee@samsung.com>
> ---
>
> 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.
>
> translate-all.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> 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 >= (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
>
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-22 12:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-22 11:56 [Qemu-devel] [Qemu-stable][PATCH v2] tcg: Fix occasional TCG broken problem when ldst optimization enabled Yeongkyoon Lee
2013-03-22 11:58 ` Peter Maydell
2013-03-22 12:35 ` Andreas Färber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).