Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | From cf8c9aac5243f506a1a3e8e284414f311cde04f5 Mon Sep 17 00:00:00 2001 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 2 | From: Alistair Francis <alistair.francis@xilinx.com> |
| 3 | Date: Wed, 17 Jan 2018 10:51:49 -0800 |
| 4 | Subject: [PATCH] linux-user: Fix webkitgtk hangs on 32-bit x86 target |
| 5 | |
| 6 | Since commit "linux-user: Tidy and enforce reserved_va initialization" |
| 7 | (18e80c55bb6ec17c05ec0ba717ec83933c2bfc07) the Yocto webkitgtk build |
| 8 | hangs when cross compiling for 32-bit x86 on a 64-bit x86 machine using |
| 9 | musl. |
| 10 | |
| 11 | To fix the issue reduce the MAX_RESERVED_VA macro to be a closer match |
| 12 | to what it was before the problematic commit. |
| 13 | |
| 14 | Upstream-Status: Submitted http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg04185.html |
| 15 | Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> |
| 16 | |
| 17 | --- |
| 18 | linux-user/main.c | 2 +- |
| 19 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 20 | |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame^] | 21 | Index: qemu-5.1.0/linux-user/main.c |
| 22 | =================================================================== |
| 23 | --- qemu-5.1.0.orig/linux-user/main.c |
| 24 | +++ qemu-5.1.0/linux-user/main.c |
| 25 | @@ -92,7 +92,7 @@ static int last_log_mask; |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 26 | (TARGET_LONG_BITS == 32 || defined(TARGET_ABI32)) |
| 27 | /* There are a number of places where we assign reserved_va to a variable |
| 28 | of type abi_ulong and expect it to fit. Avoid the last page. */ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 29 | -# define MAX_RESERVED_VA(CPU) (0xfffffffful & TARGET_PAGE_MASK) |
| 30 | +# define MAX_RESERVED_VA(CPU) (0x7ffffffful & TARGET_PAGE_MASK) |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 31 | # else |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 32 | # define MAX_RESERVED_VA(CPU) (1ul << TARGET_VIRT_ADDR_SPACE_BITS) |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 33 | # endif |