From 6ec99ee2f1d90be6c115c74fb7a5bdb2969c4dba Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 9 Apr 2013 12:03:24 +0000 Subject: qemu: Add backported patch to address random segfaults We've been seeing random sefgaults on a variety of architectures which appear to be from an issue in qemu. The attached backport from upstream appears to fix these. [YOCTO #4216] (From OE-Core rev: 55a22b7341571179d5e026d102953a6d9f2045bf) Signed-off-by: Richard Purdie --- .../3f08ffb4a4741d147634761dc053ed386243a0de.patch | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 meta/recipes-devtools/qemu/files/3f08ffb4a4741d147634761dc053ed386243a0de.patch (limited to 'meta/recipes-devtools/qemu/files/3f08ffb4a4741d147634761dc053ed386243a0de.patch') diff --git a/meta/recipes-devtools/qemu/files/3f08ffb4a4741d147634761dc053ed386243a0de.patch b/meta/recipes-devtools/qemu/files/3f08ffb4a4741d147634761dc053ed386243a0de.patch new file mode 100644 index 0000000000..6bcf3d1552 --- /dev/null +++ b/meta/recipes-devtools/qemu/files/3f08ffb4a4741d147634761dc053ed386243a0de.patch @@ -0,0 +1,42 @@ +Upsteream-Status: Backport + +[Appears to fix the random segfaults we were seeing in a variety of architectures: +https://bugzilla.yoctoproject.org/show_bug.cgi?id=4216 ] + + +From: Yeongkyoon Lee +Date: Fri, 22 Mar 2013 12:50:17 +0000 (+0900) +Subject: tcg: Fix occasional TCG broken problem when ldst optimization enabled +X-Git-Url: http://git.qemu.org/?p=qemu.git;a=commitdiff_plain;h=52ae646d4a3ebdcdcc973492c6a56f2c49b6578f;hp=3f08ffb4a4741d147634761dc053ed386243a0de + +tcg: Fix occasional TCG broken problem when ldst optimization enabled + +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. + +CC: qemu-stable@nongnu.org +Signed-off-by: Yeongkyoon Lee +Reviewed-by: Peter Maydell +Signed-off-by: Aurelien Jarno +--- + +Index: qemu-1.4.0/translate-all.c +=================================================================== +--- qemu-1.4.0.orig/translate-all.c 2013-04-09 10:58:19.000000000 +0000 ++++ qemu-1.4.0/translate-all.c 2013-04-09 10:58:34.783203406 +0000 +@@ -1310,10 +1310,10 @@ + /* 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)code_gen_buffer && +- tc_ptr < (uintptr_t)(code_gen_buffer + code_gen_buffer_max_size)); ++ tc_ptr < (uintptr_t)(code_gen_buffer + code_gen_buffer_size)); + } + #endif + -- cgit v1.2.3-54-g00ecf