diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2018-06-01 10:29:39 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-07 08:52:55 +0100 |
commit | f8ec8e89bbe913dd8afcf5136efc64a1d2793a8f (patch) | |
tree | 899b05ba8ceb6a5655c76a5ef095b95c20a87ed0 /meta/recipes-devtools/qemu | |
parent | 1c7ad49bfd3e60c44281a8f49d69f4b96c359703 (diff) | |
download | poky-f8ec8e89bbe913dd8afcf5136efc64a1d2793a8f.tar.gz |
qemu: upgrade to 2.12.0
* drop patches which are now included upstream
* revert "linux-user: fix mmap/munmap/mprotect/mremap/shma" which is
causing
0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
to stop working and qemu-i386 hanging during gobject-introspection in
webkitgtk when building for qemux86 with musl
(From OE-Core rev: e9d6e09bb51a857ce248f45124548d338a350ba1)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu')
17 files changed, 219 insertions, 257 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/0001-sdl.c-allow-user-to-disable-pointer-grabs.patch b/meta/recipes-devtools/qemu/qemu/0001-sdl.c-allow-user-to-disable-pointer-grabs.patch index add5d8b02f..b8a9206fee 100644 --- a/meta/recipes-devtools/qemu/qemu/0001-sdl.c-allow-user-to-disable-pointer-grabs.patch +++ b/meta/recipes-devtools/qemu/qemu/0001-sdl.c-allow-user-to-disable-pointer-grabs.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 273e1af49d3e0a58bb9464369deb2652f243e649 Mon Sep 17 00:00:00 2001 | 1 | From 18fb45c34a473c4ba247bb82bcea94b7c3ba493a Mon Sep 17 00:00:00 2001 |
2 | From: Ross Burton <ross.burton@intel.com> | 2 | From: Ross Burton <ross.burton@intel.com> |
3 | Date: Wed, 18 Sep 2013 14:04:54 +0100 | 3 | Date: Wed, 18 Sep 2013 14:04:54 +0100 |
4 | Subject: [PATCH] sdl.c: allow user to disable pointer grabs | 4 | Subject: [PATCH] sdl.c: allow user to disable pointer grabs |
@@ -22,25 +22,26 @@ Upstream-Status: Pending | |||
22 | Signed-off-by: Ross Burton <ross.burton@intel.com> | 22 | Signed-off-by: Ross Burton <ross.burton@intel.com> |
23 | Signed-off-by: Eric Bénard <eric@eukrea.com> | 23 | Signed-off-by: Eric Bénard <eric@eukrea.com> |
24 | --- | 24 | --- |
25 | ui/sdl.c | 12 ++++++++++-- | 25 | ui/sdl.c | 13 +++++++++++-- |
26 | 1 file changed, 10 insertions(+), 2 deletions(-) | 26 | 1 file changed, 11 insertions(+), 2 deletions(-) |
27 | 27 | ||
28 | diff --git a/ui/sdl.c b/ui/sdl.c | 28 | diff --git a/ui/sdl.c b/ui/sdl.c |
29 | index 7b71a9a..29ce1b9 100644 | 29 | index a5fd503c25..ab8d1b1eb1 100644 |
30 | --- a/ui/sdl.c | 30 | --- a/ui/sdl.c |
31 | +++ b/ui/sdl.c | 31 | +++ b/ui/sdl.c |
32 | @@ -63,6 +63,10 @@ static SDL_PixelFormat host_format; | 32 | @@ -68,6 +68,11 @@ static int idle_counter; |
33 | static int scaling_active = 0; | 33 | static const guint16 *keycode_map; |
34 | static Notifier mouse_mode_notifier; | 34 | static size_t keycode_maplen; |
35 | static int idle_counter; | 35 | |
36 | +#ifndef True | 36 | +#ifndef True |
37 | +#define True 1 | 37 | +#define True 1 |
38 | +#endif | 38 | +#endif |
39 | +static doing_grabs = True; | 39 | +static doing_grabs = True; |
40 | 40 | + | |
41 | #define SDL_REFRESH_INTERVAL_BUSY 10 | 41 | #define SDL_REFRESH_INTERVAL_BUSY 10 |
42 | #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \ | 42 | #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \ |
43 | @@ -431,14 +435,16 @@ static void sdl_grab_start(void) | 43 | / SDL_REFRESH_INTERVAL_BUSY + 1) |
44 | @@ -398,14 +403,16 @@ static void sdl_grab_start(void) | ||
44 | } | 45 | } |
45 | } else | 46 | } else |
46 | sdl_hide_cursor(); | 47 | sdl_hide_cursor(); |
@@ -59,7 +60,7 @@ index 7b71a9a..29ce1b9 100644 | |||
59 | gui_grab = 0; | 60 | gui_grab = 0; |
60 | sdl_show_cursor(); | 61 | sdl_show_cursor(); |
61 | sdl_update_caption(); | 62 | sdl_update_caption(); |
62 | @@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) | 63 | @@ -945,6 +952,8 @@ static void sdl1_display_init(DisplayState *ds, DisplayOptions *o) |
63 | * This requires SDL >= 1.2.14. */ | 64 | * This requires SDL >= 1.2.14. */ |
64 | setenv("SDL_DISABLE_LOCK_KEYS", "1", 1); | 65 | setenv("SDL_DISABLE_LOCK_KEYS", "1", 1); |
65 | 66 | ||
diff --git a/meta/recipes-devtools/qemu/qemu/0002-qemu-Add-missing-wacom-HID-descriptor.patch b/meta/recipes-devtools/qemu/qemu/0002-qemu-Add-missing-wacom-HID-descriptor.patch index 281803ecb5..90e4b800b5 100644 --- a/meta/recipes-devtools/qemu/qemu/0002-qemu-Add-missing-wacom-HID-descriptor.patch +++ b/meta/recipes-devtools/qemu/qemu/0002-qemu-Add-missing-wacom-HID-descriptor.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From a42726e017605ed3ca2b3fc2b1cc8d01ccf34730 Mon Sep 17 00:00:00 2001 | 1 | From 41603f745caaecdc7c9d760fb7d2df01ccc60128 Mon Sep 17 00:00:00 2001 |
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | 2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> |
3 | Date: Thu, 27 Nov 2014 14:04:29 +0000 | 3 | Date: Thu, 27 Nov 2014 14:04:29 +0000 |
4 | Subject: [PATCH] qemu: Add missing wacom HID descriptor | 4 | Subject: [PATCH] qemu: Add missing wacom HID descriptor |
@@ -14,11 +14,11 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | |||
14 | Upstream-Status: Submitted | 14 | Upstream-Status: Submitted |
15 | 2014/11/27 | 15 | 2014/11/27 |
16 | --- | 16 | --- |
17 | hw/usb/dev-wacom.c | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++- | 17 | hw/usb/dev-wacom.c | 94 +++++++++++++++++++++++++++++++++++++++++++++- |
18 | 1 file changed, 93 insertions(+), 1 deletion(-) | 18 | 1 file changed, 93 insertions(+), 1 deletion(-) |
19 | 19 | ||
20 | diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c | 20 | diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c |
21 | index bf70013..2f6e129 100644 | 21 | index bf70013059..2f6e129732 100644 |
22 | --- a/hw/usb/dev-wacom.c | 22 | --- a/hw/usb/dev-wacom.c |
23 | +++ b/hw/usb/dev-wacom.c | 23 | +++ b/hw/usb/dev-wacom.c |
24 | @@ -72,6 +72,89 @@ static const USBDescStrings desc_strings = { | 24 | @@ -72,6 +72,89 @@ static const USBDescStrings desc_strings = { |
diff --git a/meta/recipes-devtools/qemu/qemu/0003-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch b/meta/recipes-devtools/qemu/qemu/0003-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch index dc073000c9..0d43271c47 100644 --- a/meta/recipes-devtools/qemu/qemu/0003-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch +++ b/meta/recipes-devtools/qemu/qemu/0003-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From fda1eee8bc717528d57f6ff454f72c5325043c31 Mon Sep 17 00:00:00 2001 | 1 | From a9a669448ba6f1b295427e271d99f61736fc5189 Mon Sep 17 00:00:00 2001 |
2 | From: Juro Bystricky <juro.bystricky@intel.com> | 2 | From: Juro Bystricky <juro.bystricky@intel.com> |
3 | Date: Thu, 31 Aug 2017 11:06:56 -0700 | 3 | Date: Thu, 31 Aug 2017 11:06:56 -0700 |
4 | Subject: [PATCH] Add subpackage -ptest which runs all unit test cases for | 4 | Subject: [PATCH] Add subpackage -ptest which runs all unit test cases for |
@@ -14,10 +14,10 @@ Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> | |||
14 | 1 file changed, 8 insertions(+) | 14 | 1 file changed, 8 insertions(+) |
15 | 15 | ||
16 | diff --git a/tests/Makefile.include b/tests/Makefile.include | 16 | diff --git a/tests/Makefile.include b/tests/Makefile.include |
17 | index c002352..f557c26 100644 | 17 | index 3b9a5e31a2..dfbcd728d7 100644 |
18 | --- a/tests/Makefile.include | 18 | --- a/tests/Makefile.include |
19 | +++ b/tests/Makefile.include | 19 | +++ b/tests/Makefile.include |
20 | @@ -935,4 +935,12 @@ all: $(QEMU_IOTESTS_HELPERS-y) | 20 | @@ -972,4 +972,12 @@ all: $(QEMU_IOTESTS_HELPERS-y) |
21 | -include $(wildcard tests/*.d) | 21 | -include $(wildcard tests/*.d) |
22 | -include $(wildcard tests/libqos/*.d) | 22 | -include $(wildcard tests/libqos/*.d) |
23 | 23 | ||
diff --git a/meta/recipes-devtools/qemu/qemu/0004-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/meta/recipes-devtools/qemu/qemu/0004-qemu-Add-addition-environment-space-to-boot-loader-q.patch index 4f28e1676b..5152dcafe5 100644 --- a/meta/recipes-devtools/qemu/qemu/0004-qemu-Add-addition-environment-space-to-boot-loader-q.patch +++ b/meta/recipes-devtools/qemu/qemu/0004-qemu-Add-addition-environment-space-to-boot-loader-q.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From ad70fdcaf75084da2e02474c61d1d441ca100ab2 Mon Sep 17 00:00:00 2001 | 1 | From dd4404a334a545e9beafa1b1e41b3a8f35ef31a9 Mon Sep 17 00:00:00 2001 |
2 | From: Jason Wessel <jason.wessel@windriver.com> | 2 | From: Jason Wessel <jason.wessel@windriver.com> |
3 | Date: Fri, 28 Mar 2014 17:42:43 +0800 | 3 | Date: Fri, 28 Mar 2014 17:42:43 +0800 |
4 | Subject: [PATCH] qemu: Add addition environment space to boot loader | 4 | Subject: [PATCH] qemu: Add addition environment space to boot loader |
@@ -18,10 +18,10 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com> | |||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | 18 | 1 file changed, 1 insertion(+), 1 deletion(-) |
19 | 19 | ||
20 | diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c | 20 | diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c |
21 | index ec6af4a..6e76166 100644 | 21 | index f6513a4fd5..d5efafb1e8 100644 |
22 | --- a/hw/mips/mips_malta.c | 22 | --- a/hw/mips/mips_malta.c |
23 | +++ b/hw/mips/mips_malta.c | 23 | +++ b/hw/mips/mips_malta.c |
24 | @@ -61,7 +61,7 @@ | 24 | @@ -62,7 +62,7 @@ |
25 | 25 | ||
26 | #define ENVP_ADDR 0x80002000l | 26 | #define ENVP_ADDR 0x80002000l |
27 | #define ENVP_NB_ENTRIES 16 | 27 | #define ENVP_NB_ENTRIES 16 |
diff --git a/meta/recipes-devtools/qemu/qemu/0005-qemu-disable-Valgrind.patch b/meta/recipes-devtools/qemu/qemu/0005-qemu-disable-Valgrind.patch index b9e01834ef..70baf0fb09 100644 --- a/meta/recipes-devtools/qemu/qemu/0005-qemu-disable-Valgrind.patch +++ b/meta/recipes-devtools/qemu/qemu/0005-qemu-disable-Valgrind.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From e85ee3cc9988172662d6969af01f23fa8ffd5262 Mon Sep 17 00:00:00 2001 | 1 | From 4475b3d97371e588540333988a97d7df3ec2c65a Mon Sep 17 00:00:00 2001 |
2 | From: Ross Burton <ross.burton@intel.com> | 2 | From: Ross Burton <ross.burton@intel.com> |
3 | Date: Tue, 20 Oct 2015 22:19:08 +0100 | 3 | Date: Tue, 20 Oct 2015 22:19:08 +0100 |
4 | Subject: [PATCH] qemu: disable Valgrind | 4 | Subject: [PATCH] qemu: disable Valgrind |
@@ -12,10 +12,10 @@ Signed-off-by: Ross Burton <ross.burton@intel.com> | |||
12 | 1 file changed, 9 deletions(-) | 12 | 1 file changed, 9 deletions(-) |
13 | 13 | ||
14 | diff --git a/configure b/configure | 14 | diff --git a/configure b/configure |
15 | index 0c6e757..c30fd45 100755 | 15 | index 0a19b033bc..69e05fb6c0 100755 |
16 | --- a/configure | 16 | --- a/configure |
17 | +++ b/configure | 17 | +++ b/configure |
18 | @@ -4741,15 +4741,6 @@ fi | 18 | @@ -4895,15 +4895,6 @@ fi |
19 | # check if we have valgrind/valgrind.h | 19 | # check if we have valgrind/valgrind.h |
20 | 20 | ||
21 | valgrind_h=no | 21 | valgrind_h=no |
diff --git a/meta/recipes-devtools/qemu/qemu/0006-qemu-Limit-paths-searched-during-user-mode-emulation.patch b/meta/recipes-devtools/qemu/qemu/0006-qemu-Limit-paths-searched-during-user-mode-emulation.patch index 9315f8561a..a9d798cef6 100644 --- a/meta/recipes-devtools/qemu/qemu/0006-qemu-Limit-paths-searched-during-user-mode-emulation.patch +++ b/meta/recipes-devtools/qemu/qemu/0006-qemu-Limit-paths-searched-during-user-mode-emulation.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From c79c48a79710d0e2ef68062435596ac455cd9f71 Mon Sep 17 00:00:00 2001 | 1 | From c532bcdae8259b0f71723cda331ded4dbb0fa908 Mon Sep 17 00:00:00 2001 |
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | 2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> |
3 | Date: Wed, 9 Mar 2016 22:49:02 +0000 | 3 | Date: Wed, 9 Mar 2016 22:49:02 +0000 |
4 | Subject: [PATCH] qemu: Limit paths searched during user mode emulation | 4 | Subject: [PATCH] qemu: Limit paths searched during user mode emulation |
@@ -24,7 +24,7 @@ Upstream-Status: Pending | |||
24 | 1 file changed, 22 insertions(+), 22 deletions(-) | 24 | 1 file changed, 22 insertions(+), 22 deletions(-) |
25 | 25 | ||
26 | diff --git a/util/path.c b/util/path.c | 26 | diff --git a/util/path.c b/util/path.c |
27 | index 7f9fc27..a416cd4 100644 | 27 | index 7f9fc272fb..a416cd4ac2 100644 |
28 | --- a/util/path.c | 28 | --- a/util/path.c |
29 | +++ b/util/path.c | 29 | +++ b/util/path.c |
30 | @@ -15,6 +15,7 @@ struct pathelem | 30 | @@ -15,6 +15,7 @@ struct pathelem |
diff --git a/meta/recipes-devtools/qemu/qemu/0007-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch b/meta/recipes-devtools/qemu/qemu/0007-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch index ad52f37d9b..12456bb5c1 100644 --- a/meta/recipes-devtools/qemu/qemu/0007-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch +++ b/meta/recipes-devtools/qemu/qemu/0007-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 4b21a8db60c32f93df56e6111bb926c91680d6f2 Mon Sep 17 00:00:00 2001 | 1 | From 2d29d52b6f755758cfca6af0bcfd78091e16a7bc Mon Sep 17 00:00:00 2001 |
2 | From: Stephen Arnold <sarnold@vctlabs.com> | 2 | From: Stephen Arnold <sarnold@vctlabs.com> |
3 | Date: Sun, 12 Jun 2016 18:09:56 -0700 | 3 | Date: Sun, 12 Jun 2016 18:09:56 -0700 |
4 | Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some environment | 4 | Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some environment |
@@ -9,10 +9,10 @@ Upstream-Status: Pending | |||
9 | 1 file changed, 4 deletions(-) | 9 | 1 file changed, 4 deletions(-) |
10 | 10 | ||
11 | diff --git a/configure b/configure | 11 | diff --git a/configure b/configure |
12 | index c30fd45..b5312f4 100755 | 12 | index 69e05fb6c0..12fc3d8bdc 100755 |
13 | --- a/configure | 13 | --- a/configure |
14 | +++ b/configure | 14 | +++ b/configure |
15 | @@ -5115,10 +5115,6 @@ fi | 15 | @@ -5413,10 +5413,6 @@ write_c_skeleton |
16 | if test "$gcov" = "yes" ; then | 16 | if test "$gcov" = "yes" ; then |
17 | CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS" | 17 | CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS" |
18 | LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS" | 18 | LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS" |
@@ -22,4 +22,4 @@ index c30fd45..b5312f4 100755 | |||
22 | - CFLAGS="-O2 $CFLAGS" | 22 | - CFLAGS="-O2 $CFLAGS" |
23 | fi | 23 | fi |
24 | 24 | ||
25 | ########################################## | 25 | if test "$have_asan" = "yes"; then |
diff --git a/meta/recipes-devtools/qemu/qemu/0008-chardev-connect-socket-to-a-spawned-command.patch b/meta/recipes-devtools/qemu/qemu/0008-chardev-connect-socket-to-a-spawned-command.patch index f0c0fa19b4..2afe4e9376 100644 --- a/meta/recipes-devtools/qemu/qemu/0008-chardev-connect-socket-to-a-spawned-command.patch +++ b/meta/recipes-devtools/qemu/qemu/0008-chardev-connect-socket-to-a-spawned-command.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 55c9510311b7481a0c8f3f71b3ce130cc25563f9 Mon Sep 17 00:00:00 2001 | 1 | From 20a09bb18907e67565c54fc505a741cbbef53f7f Mon Sep 17 00:00:00 2001 |
2 | From: Alistair Francis <alistair.francis@xilinx.com> | 2 | From: Alistair Francis <alistair.francis@xilinx.com> |
3 | Date: Thu, 21 Dec 2017 11:35:16 -0800 | 3 | Date: Thu, 21 Dec 2017 11:35:16 -0800 |
4 | Subject: [PATCH] chardev: connect socket to a spawned command | 4 | Subject: [PATCH] chardev: connect socket to a spawned command |
@@ -45,16 +45,16 @@ Upstream-Status: Inappropriate [embedded specific] | |||
45 | 45 | ||
46 | Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> | 46 | Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> |
47 | --- | 47 | --- |
48 | chardev/char-socket.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++ | 48 | chardev/char-socket.c | 102 ++++++++++++++++++++++++++++++++++++++++++ |
49 | chardev/char.c | 3 ++ | 49 | chardev/char.c | 3 ++ |
50 | qapi/char.json | 5 +++ | 50 | qapi/char.json | 5 +++ |
51 | 3 files changed, 107 insertions(+) | 51 | 3 files changed, 110 insertions(+) |
52 | 52 | ||
53 | diff --git a/chardev/char-socket.c b/chardev/char-socket.c | 53 | diff --git a/chardev/char-socket.c b/chardev/char-socket.c |
54 | index 53eda8e..6c63555 100644 | 54 | index 159e69c3b1..84778cf31a 100644 |
55 | --- a/chardev/char-socket.c | 55 | --- a/chardev/char-socket.c |
56 | +++ b/chardev/char-socket.c | 56 | +++ b/chardev/char-socket.c |
57 | @@ -852,6 +852,68 @@ static gboolean socket_reconnect_timeout(gpointer opaque) | 57 | @@ -934,6 +934,68 @@ static gboolean socket_reconnect_timeout(gpointer opaque) |
58 | return false; | 58 | return false; |
59 | } | 59 | } |
60 | 60 | ||
@@ -123,7 +123,7 @@ index 53eda8e..6c63555 100644 | |||
123 | static void qmp_chardev_open_socket(Chardev *chr, | 123 | static void qmp_chardev_open_socket(Chardev *chr, |
124 | ChardevBackend *backend, | 124 | ChardevBackend *backend, |
125 | bool *be_opened, | 125 | bool *be_opened, |
126 | @@ -859,6 +921,9 @@ static void qmp_chardev_open_socket(Chardev *chr, | 126 | @@ -941,6 +1003,9 @@ static void qmp_chardev_open_socket(Chardev *chr, |
127 | { | 127 | { |
128 | SocketChardev *s = SOCKET_CHARDEV(chr); | 128 | SocketChardev *s = SOCKET_CHARDEV(chr); |
129 | ChardevSocket *sock = backend->u.socket.data; | 129 | ChardevSocket *sock = backend->u.socket.data; |
@@ -133,24 +133,24 @@ index 53eda8e..6c63555 100644 | |||
133 | bool do_nodelay = sock->has_nodelay ? sock->nodelay : false; | 133 | bool do_nodelay = sock->has_nodelay ? sock->nodelay : false; |
134 | bool is_listen = sock->has_server ? sock->server : true; | 134 | bool is_listen = sock->has_server ? sock->server : true; |
135 | bool is_telnet = sock->has_telnet ? sock->telnet : false; | 135 | bool is_telnet = sock->has_telnet ? sock->telnet : false; |
136 | @@ -925,7 +990,14 @@ static void qmp_chardev_open_socket(Chardev *chr, | 136 | @@ -1008,6 +1073,14 @@ static void qmp_chardev_open_socket(Chardev *chr, |
137 | } else if (reconnect > 0) { | ||
138 | s->reconnect_time = reconnect; | 137 | s->reconnect_time = reconnect; |
139 | } | 138 | } |
139 | |||
140 | +#ifndef _WIN32 | 140 | +#ifndef _WIN32 |
141 | + if (cmd) { | 141 | + if (cmd) { |
142 | + chardev_open_socket_cmd(chr, cmd, errp); | 142 | + chardev_open_socket_cmd(chr, cmd, errp); |
143 | 143 | + | |
144 | + /* everything ready (or failed permanently) before we return */ | 144 | + /* everything ready (or failed permanently) before we return */ |
145 | + *be_opened = true; | 145 | + *be_opened = true; |
146 | + } else | 146 | + } else |
147 | +#endif | 147 | +#endif |
148 | if (s->reconnect_time) { | 148 | /* If reconnect_time is set, will do that in chr_machine_done. */ |
149 | sioc = qio_channel_socket_new(); | 149 | if (!s->reconnect_time) { |
150 | tcp_chr_set_client_ioc_name(chr, sioc); | 150 | if (s->is_listen) { |
151 | @@ -985,10 +1057,26 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend, | 151 | @@ -1065,9 +1138,26 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend, |
152 | const char *host = qemu_opt_get(opts, "host"); | ||
153 | const char *port = qemu_opt_get(opts, "port"); | 152 | const char *port = qemu_opt_get(opts, "port"); |
153 | const char *fd = qemu_opt_get(opts, "fd"); | ||
154 | const char *tls_creds = qemu_opt_get(opts, "tls-creds"); | 154 | const char *tls_creds = qemu_opt_get(opts, "tls-creds"); |
155 | +#ifndef _WIN32 | 155 | +#ifndef _WIN32 |
156 | + const char *cmd = qemu_opt_get(opts, "cmd"); | 156 | + const char *cmd = qemu_opt_get(opts, "cmd"); |
@@ -158,7 +158,6 @@ index 53eda8e..6c63555 100644 | |||
158 | SocketAddressLegacy *addr; | 158 | SocketAddressLegacy *addr; |
159 | ChardevSocket *sock; | 159 | ChardevSocket *sock; |
160 | 160 | ||
161 | backend->type = CHARDEV_BACKEND_KIND_SOCKET; | ||
162 | +#ifndef _WIN32 | 161 | +#ifndef _WIN32 |
163 | + if (cmd) { | 162 | + if (cmd) { |
164 | + /* | 163 | + /* |
@@ -172,17 +171,18 @@ index 53eda8e..6c63555 100644 | |||
172 | + } | 171 | + } |
173 | + } else | 172 | + } else |
174 | +#endif | 173 | +#endif |
175 | if (!path) { | 174 | + |
176 | if (!host) { | 175 | if ((!!path + !!fd + !!host) != 1) { |
177 | error_setg(errp, "chardev: socket: no host given"); | 176 | error_setg(errp, |
178 | @@ -1021,13 +1109,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend, | 177 | "Exactly one of 'path', 'fd' or 'host' required"); |
179 | sock->has_reconnect = true; | 178 | @@ -1112,12 +1202,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend, |
180 | sock->reconnect = reconnect; | 179 | sock->reconnect = reconnect; |
181 | sock->tls_creds = g_strdup(tls_creds); | 180 | sock->tls_creds = g_strdup(tls_creds); |
181 | |||
182 | +#ifndef _WIN32 | 182 | +#ifndef _WIN32 |
183 | + sock->cmd = g_strdup(cmd); | 183 | + sock->cmd = g_strdup(cmd); |
184 | +#endif | 184 | +#endif |
185 | 185 | + | |
186 | addr = g_new0(SocketAddressLegacy, 1); | 186 | addr = g_new0(SocketAddressLegacy, 1); |
187 | +#ifndef _WIN32 | 187 | +#ifndef _WIN32 |
188 | + if (path || cmd) { | 188 | + if (path || cmd) { |
@@ -197,25 +197,25 @@ index 53eda8e..6c63555 100644 | |||
197 | +#else | 197 | +#else |
198 | q_unix->path = g_strdup(path); | 198 | q_unix->path = g_strdup(path); |
199 | +#endif | 199 | +#endif |
200 | } else { | 200 | } else if (host) { |
201 | addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET; | 201 | addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET; |
202 | addr->u.inet.data = g_new(InetSocketAddress, 1); | 202 | addr->u.inet.data = g_new(InetSocketAddress, 1); |
203 | diff --git a/chardev/char.c b/chardev/char.c | 203 | diff --git a/chardev/char.c b/chardev/char.c |
204 | index 2ae4f46..5d52cd5 100644 | 204 | index 76d866e6fe..9747d51d7c 100644 |
205 | --- a/chardev/char.c | 205 | --- a/chardev/char.c |
206 | +++ b/chardev/char.c | 206 | +++ b/chardev/char.c |
207 | @@ -793,6 +793,9 @@ QemuOptsList qemu_chardev_opts = { | 207 | @@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = { |
208 | },{ | ||
208 | .name = "path", | 209 | .name = "path", |
209 | .type = QEMU_OPT_STRING, | 210 | .type = QEMU_OPT_STRING, |
210 | },{ | 211 | + },{ |
211 | + .name = "cmd", | 212 | + .name = "cmd", |
212 | + .type = QEMU_OPT_STRING, | 213 | + .type = QEMU_OPT_STRING, |
213 | + },{ | 214 | },{ |
214 | .name = "host", | 215 | .name = "host", |
215 | .type = QEMU_OPT_STRING, | 216 | .type = QEMU_OPT_STRING, |
216 | },{ | ||
217 | diff --git a/qapi/char.json b/qapi/char.json | 217 | diff --git a/qapi/char.json b/qapi/char.json |
218 | index ae19dcd..6de0f29 100644 | 218 | index ae19dcd1ed..6de0f29bcd 100644 |
219 | --- a/qapi/char.json | 219 | --- a/qapi/char.json |
220 | +++ b/qapi/char.json | 220 | +++ b/qapi/char.json |
221 | @@ -241,6 +241,10 @@ | 221 | @@ -241,6 +241,10 @@ |
diff --git a/meta/recipes-devtools/qemu/qemu/0009-apic-fixup-fallthrough-to-PIC.patch b/meta/recipes-devtools/qemu/qemu/0009-apic-fixup-fallthrough-to-PIC.patch index 915bfdac58..5969d93870 100644 --- a/meta/recipes-devtools/qemu/qemu/0009-apic-fixup-fallthrough-to-PIC.patch +++ b/meta/recipes-devtools/qemu/qemu/0009-apic-fixup-fallthrough-to-PIC.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 945f428016f278fa8e38bc8d153397c3195f85a5 Mon Sep 17 00:00:00 2001 | 1 | From 5046c21efdbc7413cddd5c5dbd9e1d53258d3e8c Mon Sep 17 00:00:00 2001 |
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | 2 | From: Mark Asselstine <mark.asselstine@windriver.com> |
3 | Date: Tue, 26 Feb 2013 11:43:28 -0500 | 3 | Date: Tue, 26 Feb 2013 11:43:28 -0500 |
4 | Subject: [PATCH] apic: fixup fallthrough to PIC | 4 | Subject: [PATCH] apic: fixup fallthrough to PIC |
@@ -29,10 +29,10 @@ Signed-off-by: He Zhe <zhe.he@windriver.com> | |||
29 | 1 file changed, 1 insertion(+), 1 deletion(-) | 29 | 1 file changed, 1 insertion(+), 1 deletion(-) |
30 | 30 | ||
31 | diff --git a/hw/intc/apic.c b/hw/intc/apic.c | 31 | diff --git a/hw/intc/apic.c b/hw/intc/apic.c |
32 | index fe15fb6..8352c39 100644 | 32 | index 6fda52b86c..cd7291962d 100644 |
33 | --- a/hw/intc/apic.c | 33 | --- a/hw/intc/apic.c |
34 | +++ b/hw/intc/apic.c | 34 | +++ b/hw/intc/apic.c |
35 | @@ -591,7 +591,7 @@ int apic_accept_pic_intr(DeviceState *dev) | 35 | @@ -603,7 +603,7 @@ int apic_accept_pic_intr(DeviceState *dev) |
36 | APICCommonState *s = APIC(dev); | 36 | APICCommonState *s = APIC(dev); |
37 | uint32_t lvt0; | 37 | uint32_t lvt0; |
38 | 38 | ||
diff --git a/meta/recipes-devtools/qemu/qemu/0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch b/meta/recipes-devtools/qemu/qemu/0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch index ceb3980fc5..e110f63345 100644 --- a/meta/recipes-devtools/qemu/qemu/0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch +++ b/meta/recipes-devtools/qemu/qemu/0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 4333b2b269d997a719e19f00d044105e17700be2 Mon Sep 17 00:00:00 2001 | 1 | From 3cd92c7a885e4997ef6843313298c1d748d6ca39 Mon Sep 17 00:00:00 2001 |
2 | From: Alistair Francis <alistair.francis@xilinx.com> | 2 | From: Alistair Francis <alistair.francis@xilinx.com> |
3 | Date: Wed, 17 Jan 2018 10:51:49 -0800 | 3 | Date: Wed, 17 Jan 2018 10:51:49 -0800 |
4 | Subject: [PATCH] linux-user: Fix webkitgtk hangs on 32-bit x86 target | 4 | Subject: [PATCH] linux-user: Fix webkitgtk hangs on 32-bit x86 target |
@@ -18,10 +18,10 @@ Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> | |||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | 18 | 1 file changed, 1 insertion(+), 1 deletion(-) |
19 | 19 | ||
20 | diff --git a/linux-user/main.c b/linux-user/main.c | 20 | diff --git a/linux-user/main.c b/linux-user/main.c |
21 | index 146ee3e..1332b5c 100644 | 21 | index 8907a84114..ea42c43610 100644 |
22 | --- a/linux-user/main.c | 22 | --- a/linux-user/main.c |
23 | +++ b/linux-user/main.c | 23 | +++ b/linux-user/main.c |
24 | @@ -78,7 +78,7 @@ do { \ | 24 | @@ -79,7 +79,7 @@ do { \ |
25 | (TARGET_LONG_BITS == 32 || defined(TARGET_ABI32)) | 25 | (TARGET_LONG_BITS == 32 || defined(TARGET_ABI32)) |
26 | /* There are a number of places where we assign reserved_va to a variable | 26 | /* There are a number of places where we assign reserved_va to a variable |
27 | of type abi_ulong and expect it to fit. Avoid the last page. */ | 27 | of type abi_ulong and expect it to fit. Avoid the last page. */ |
diff --git a/meta/recipes-devtools/qemu/qemu/0011-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch b/meta/recipes-devtools/qemu/qemu/0011-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch new file mode 100644 index 0000000000..41626eb87c --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/0011-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch | |||
@@ -0,0 +1,141 @@ | |||
1 | From 3ed26be2091436296933ed2146f7269c791c7bfe Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <martin.jansa@lge.com> | ||
3 | Date: Fri, 1 Jun 2018 08:41:07 +0000 | ||
4 | Subject: [PATCH] Revert "linux-user: fix mmap/munmap/mprotect/mremap/shmat" | ||
5 | |||
6 | Causes qemu-i386 to hang during gobject-introspection in webkitgtk build | ||
7 | when musl is used on qemux86 - the same issue as | ||
8 | 0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch | ||
9 | was fixing in 2.11.0 release, but with this patch the fix no longer worked | ||
10 | as discussed here: | ||
11 | http://lists.openembedded.org/pipermail/openembedded-core/2018-May/150302.html | ||
12 | http://lists.openembedded.org/pipermail/openembedded-core/2018-June/151382.html | ||
13 | |||
14 | This reverts commit ebf9a3630c911d0cfc9c20f7cafe9ba4f88cf583. | ||
15 | |||
16 | Upstream-Status: Pending | ||
17 | --- | ||
18 | include/exec/cpu-all.h | 6 +----- | ||
19 | include/exec/cpu_ldst.h | 16 +++++++++------- | ||
20 | linux-user/mmap.c | 17 ++++------------- | ||
21 | linux-user/syscall.c | 5 +---- | ||
22 | 4 files changed, 15 insertions(+), 29 deletions(-) | ||
23 | |||
24 | diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h | ||
25 | index f4fa94e966..0b141683f0 100644 | ||
26 | --- a/include/exec/cpu-all.h | ||
27 | +++ b/include/exec/cpu-all.h | ||
28 | @@ -159,12 +159,8 @@ extern unsigned long guest_base; | ||
29 | extern int have_guest_base; | ||
30 | extern unsigned long reserved_va; | ||
31 | |||
32 | -#if HOST_LONG_BITS <= TARGET_VIRT_ADDR_SPACE_BITS | ||
33 | -#define GUEST_ADDR_MAX (~0ul) | ||
34 | -#else | ||
35 | -#define GUEST_ADDR_MAX (reserved_va ? reserved_va - 1 : \ | ||
36 | +#define GUEST_ADDR_MAX (reserved_va ? reserved_va : \ | ||
37 | (1ul << TARGET_VIRT_ADDR_SPACE_BITS) - 1) | ||
38 | -#endif | ||
39 | #else | ||
40 | |||
41 | #include "exec/hwaddr.h" | ||
42 | diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h | ||
43 | index 5de8c8a5af..191f2e962a 100644 | ||
44 | --- a/include/exec/cpu_ldst.h | ||
45 | +++ b/include/exec/cpu_ldst.h | ||
46 | @@ -51,13 +51,15 @@ | ||
47 | /* All direct uses of g2h and h2g need to go away for usermode softmmu. */ | ||
48 | #define g2h(x) ((void *)((unsigned long)(target_ulong)(x) + guest_base)) | ||
49 | |||
50 | -#define guest_addr_valid(x) ((x) <= GUEST_ADDR_MAX) | ||
51 | -#define h2g_valid(x) guest_addr_valid((unsigned long)(x) - guest_base) | ||
52 | - | ||
53 | -static inline int guest_range_valid(unsigned long start, unsigned long len) | ||
54 | -{ | ||
55 | - return len - 1 <= GUEST_ADDR_MAX && start <= GUEST_ADDR_MAX - len + 1; | ||
56 | -} | ||
57 | +#if HOST_LONG_BITS <= TARGET_VIRT_ADDR_SPACE_BITS | ||
58 | +#define h2g_valid(x) 1 | ||
59 | +#else | ||
60 | +#define h2g_valid(x) ({ \ | ||
61 | + unsigned long __guest = (unsigned long)(x) - guest_base; \ | ||
62 | + (__guest < (1ul << TARGET_VIRT_ADDR_SPACE_BITS)) && \ | ||
63 | + (!reserved_va || (__guest < reserved_va)); \ | ||
64 | +}) | ||
65 | +#endif | ||
66 | |||
67 | #define h2g_nocheck(x) ({ \ | ||
68 | unsigned long __ret = (unsigned long)(x) - guest_base; \ | ||
69 | diff --git a/linux-user/mmap.c b/linux-user/mmap.c | ||
70 | index 9168a2051c..de85669aab 100644 | ||
71 | --- a/linux-user/mmap.c | ||
72 | +++ b/linux-user/mmap.c | ||
73 | @@ -80,7 +80,7 @@ int target_mprotect(abi_ulong start, abi_ulong len, int prot) | ||
74 | return -TARGET_EINVAL; | ||
75 | len = TARGET_PAGE_ALIGN(len); | ||
76 | end = start + len; | ||
77 | - if (!guest_range_valid(start, len)) { | ||
78 | + if (end < start) { | ||
79 | return -TARGET_ENOMEM; | ||
80 | } | ||
81 | prot &= PROT_READ | PROT_WRITE | PROT_EXEC; | ||
82 | @@ -482,8 +482,8 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot, | ||
83 | * It can fail only on 64-bit host with 32-bit target. | ||
84 | * On any other target/host host mmap() handles this error correctly. | ||
85 | */ | ||
86 | - if (!guest_range_valid(start, len)) { | ||
87 | - errno = ENOMEM; | ||
88 | + if ((unsigned long)start + len - 1 > (abi_ulong) -1) { | ||
89 | + errno = EINVAL; | ||
90 | goto fail; | ||
91 | } | ||
92 | |||
93 | @@ -623,10 +623,8 @@ int target_munmap(abi_ulong start, abi_ulong len) | ||
94 | if (start & ~TARGET_PAGE_MASK) | ||
95 | return -TARGET_EINVAL; | ||
96 | len = TARGET_PAGE_ALIGN(len); | ||
97 | - if (len == 0 || !guest_range_valid(start, len)) { | ||
98 | + if (len == 0) | ||
99 | return -TARGET_EINVAL; | ||
100 | - } | ||
101 | - | ||
102 | mmap_lock(); | ||
103 | end = start + len; | ||
104 | real_start = start & qemu_host_page_mask; | ||
105 | @@ -681,13 +679,6 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size, | ||
106 | int prot; | ||
107 | void *host_addr; | ||
108 | |||
109 | - if (!guest_range_valid(old_addr, old_size) || | ||
110 | - ((flags & MREMAP_FIXED) && | ||
111 | - !guest_range_valid(new_addr, new_size))) { | ||
112 | - errno = ENOMEM; | ||
113 | - return -1; | ||
114 | - } | ||
115 | - | ||
116 | mmap_lock(); | ||
117 | |||
118 | if (flags & MREMAP_FIXED) { | ||
119 | diff --git a/linux-user/syscall.c b/linux-user/syscall.c | ||
120 | index 643b8833de..271f215147 100644 | ||
121 | --- a/linux-user/syscall.c | ||
122 | +++ b/linux-user/syscall.c | ||
123 | @@ -4919,9 +4919,6 @@ static inline abi_ulong do_shmat(CPUArchState *cpu_env, | ||
124 | return -TARGET_EINVAL; | ||
125 | } | ||
126 | } | ||
127 | - if (!guest_range_valid(shmaddr, shm_info.shm_segsz)) { | ||
128 | - return -TARGET_EINVAL; | ||
129 | - } | ||
130 | |||
131 | mmap_lock(); | ||
132 | |||
133 | @@ -7497,7 +7494,7 @@ static int open_self_maps(void *cpu_env, int fd) | ||
134 | } | ||
135 | if (h2g_valid(min)) { | ||
136 | int flags = page_get_flags(h2g(min)); | ||
137 | - max = h2g_valid(max - 1) ? max : (uintptr_t)g2h(GUEST_ADDR_MAX) + 1; | ||
138 | + max = h2g_valid(max - 1) ? max : (uintptr_t)g2h(GUEST_ADDR_MAX); | ||
139 | if (page_check_range(h2g(min), max - min, flags) == -1) { | ||
140 | continue; | ||
141 | } | ||
diff --git a/meta/recipes-devtools/qemu/qemu/0011-memfd-fix-configure-test.patch b/meta/recipes-devtools/qemu/qemu/0011-memfd-fix-configure-test.patch deleted file mode 100644 index 880cb980a0..0000000000 --- a/meta/recipes-devtools/qemu/qemu/0011-memfd-fix-configure-test.patch +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | From 0c8af3f651a125d636a71d93bafd35ff5240431a Mon Sep 17 00:00:00 2001 | ||
2 | From: Paolo Bonzini <pbonzini@redhat.com> | ||
3 | Date: Tue, 28 Nov 2017 11:51:27 +0100 | ||
4 | Subject: [PATCH] memfd: fix configure test | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Recent glibc added memfd_create in sys/mman.h. This conflicts with | ||
10 | the definition in util/memfd.c: | ||
11 | |||
12 | /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error: static declaration of memfd_create follows non-static declaration | ||
13 | |||
14 | Fix the configure test, and remove the sys/memfd.h inclusion since the | ||
15 | file actually does not exist---it is a typo in the memfd_create(2) man | ||
16 | page. | ||
17 | |||
18 | Cc: Marc-André Lureau <marcandre.lureau@redhat.com> | ||
19 | Upstream-Status: Backport | ||
20 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
21 | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | ||
22 | --- | ||
23 | configure | 2 +- | ||
24 | util/memfd.c | 4 +--- | ||
25 | 2 files changed, 2 insertions(+), 4 deletions(-) | ||
26 | |||
27 | diff --git a/configure b/configure | ||
28 | index b5312f4..ec12f36 100755 | ||
29 | --- a/configure | ||
30 | +++ b/configure | ||
31 | @@ -3920,7 +3920,7 @@ fi | ||
32 | # check if memfd is supported | ||
33 | memfd=no | ||
34 | cat > $TMPC << EOF | ||
35 | -#include <sys/memfd.h> | ||
36 | +#include <sys/mman.h> | ||
37 | |||
38 | int main(void) | ||
39 | { | ||
40 | diff --git a/util/memfd.c b/util/memfd.c | ||
41 | index 4571d1a..412e94a 100644 | ||
42 | --- a/util/memfd.c | ||
43 | +++ b/util/memfd.c | ||
44 | @@ -31,9 +31,7 @@ | ||
45 | |||
46 | #include "qemu/memfd.h" | ||
47 | |||
48 | -#ifdef CONFIG_MEMFD | ||
49 | -#include <sys/memfd.h> | ||
50 | -#elif defined CONFIG_LINUX | ||
51 | +#if defined CONFIG_LINUX && !defined CONFIG_MEMFD | ||
52 | #include <sys/syscall.h> | ||
53 | #include <asm/unistd.h> | ||
54 | |||
diff --git a/meta/recipes-devtools/qemu/qemu/0012-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch b/meta/recipes-devtools/qemu/qemu/0012-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch deleted file mode 100644 index be92502095..0000000000 --- a/meta/recipes-devtools/qemu/qemu/0012-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | From 7354b9b24c36ee712bb6e881d39504bf1b6a4c8b Mon Sep 17 00:00:00 2001 | ||
2 | From: Victor Kamensky <kamensky@cisco.com> | ||
3 | Date: Fri, 23 Mar 2018 18:26:45 +0000 | ||
4 | Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of | ||
5 | DISAS_EXIT | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | In OE project 4.15 linux kernel boot hang was observed under | ||
11 | single cpu aarch64 qemu. Kernel code was in a loop waiting for | ||
12 | vtimer arrival, spinning in TC generated blocks, while interrupt | ||
13 | was pending unprocessed. This happened because when qemu tried to | ||
14 | handle vtimer interrupt target had interrupts disabled, as | ||
15 | result flag indicating TCG exit, cpu->icount_decr.u16.high, | ||
16 | was cleared but arm_cpu_exec_interrupt function did not call | ||
17 | arm_cpu_do_interrupt to process interrupt. Later when target | ||
18 | reenabled interrupts, it happened without exit into main loop, so | ||
19 | following code that waited for result of interrupt execution | ||
20 | run in infinite loop. | ||
21 | |||
22 | To solve the problem instructions that operate on CPU sys state | ||
23 | (i.e enable/disable interrupt), and marked as DISAS_UPDATE, | ||
24 | should be considered as DISAS_EXIT variant, and should be | ||
25 | forced to exit back to main loop so qemu will have a chance | ||
26 | processing pending CPU state updates, including pending | ||
27 | interrupts. | ||
28 | |||
29 | This change brings consistency with how DISAS_UPDATE is treated | ||
30 | in aarch32 case. | ||
31 | |||
32 | CC: Peter Maydell <peter.maydell@linaro.org> | ||
33 | CC: Alex Bennée <alex.bennee@linaro.org> | ||
34 | CC: qemu-stable@nongnu.org | ||
35 | Suggested-by: Peter Maydell <peter.maydell@linaro.org> | ||
36 | Signed-off-by: Victor Kamensky <kamensky@cisco.com> | ||
37 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | ||
38 | Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com | ||
39 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
40 | Upstream-Status: Backport | ||
41 | --- | ||
42 | target/arm/translate-a64.c | 6 +++--- | ||
43 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
44 | |||
45 | diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c | ||
46 | index 625ef2d..c381091 100644 | ||
47 | --- a/target/arm/translate-a64.c | ||
48 | +++ b/target/arm/translate-a64.c | ||
49 | @@ -11384,12 +11384,12 @@ static void aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu) | ||
50 | case DISAS_UPDATE: | ||
51 | gen_a64_set_pc_im(dc->pc); | ||
52 | /* fall through */ | ||
53 | - case DISAS_JUMP: | ||
54 | - tcg_gen_lookup_and_goto_ptr(); | ||
55 | - break; | ||
56 | case DISAS_EXIT: | ||
57 | tcg_gen_exit_tb(0); | ||
58 | break; | ||
59 | + case DISAS_JUMP: | ||
60 | + tcg_gen_lookup_and_goto_ptr(); | ||
61 | + break; | ||
62 | case DISAS_NORETURN: | ||
63 | case DISAS_SWI: | ||
64 | break; | ||
diff --git a/meta/recipes-devtools/qemu/qemu/0014-fix-libcap-header-issue-on-some-distro.patch b/meta/recipes-devtools/qemu/qemu/0012-fix-libcap-header-issue-on-some-distro.patch index b662a41508..aa24f7294e 100644 --- a/meta/recipes-devtools/qemu/qemu/0014-fix-libcap-header-issue-on-some-distro.patch +++ b/meta/recipes-devtools/qemu/qemu/0012-fix-libcap-header-issue-on-some-distro.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 47fdb0b6e2e393194a8c81544c647fdd997aec7f Mon Sep 17 00:00:00 2001 | 1 | From bb9e48e331eee06d7bac1dce809c70191d1a3b4d Mon Sep 17 00:00:00 2001 |
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
3 | Date: Tue, 12 Mar 2013 09:54:06 +0800 | 3 | Date: Tue, 12 Mar 2013 09:54:06 +0800 |
4 | Subject: [PATCH] fix libcap header issue on some distro | 4 | Subject: [PATCH] fix libcap header issue on some distro |
@@ -59,7 +59,7 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | |||
59 | 1 file changed, 5 insertions(+), 2 deletions(-) | 59 | 1 file changed, 5 insertions(+), 2 deletions(-) |
60 | 60 | ||
61 | diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c | 61 | diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c |
62 | index 8e48500..6490030 100644 | 62 | index 6f132c5ff1..8329950c26 100644 |
63 | --- a/fsdev/virtfs-proxy-helper.c | 63 | --- a/fsdev/virtfs-proxy-helper.c |
64 | +++ b/fsdev/virtfs-proxy-helper.c | 64 | +++ b/fsdev/virtfs-proxy-helper.c |
65 | @@ -13,7 +13,6 @@ | 65 | @@ -13,7 +13,6 @@ |
diff --git a/meta/recipes-devtools/qemu/qemu/0015-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch b/meta/recipes-devtools/qemu/qemu/0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch index a5621caa95..8a9141acde 100644 --- a/meta/recipes-devtools/qemu/qemu/0015-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch +++ b/meta/recipes-devtools/qemu/qemu/0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From db914e0f93a32b6731a636517002ecadc207718b Mon Sep 17 00:00:00 2001 | 1 | From edc8dba74c7a4a2121d76c982be0074183bf080a Mon Sep 17 00:00:00 2001 |
2 | From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com> | 2 | From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com> |
3 | Date: Wed, 12 Aug 2015 15:11:30 -0500 | 3 | Date: Wed, 12 Aug 2015 15:11:30 -0500 |
4 | Subject: [PATCH] cpus.c: Add error messages when qemi_cpu_kick_thread fails. | 4 | Subject: [PATCH] cpus.c: Add error messages when qemi_cpu_kick_thread fails. |
@@ -19,10 +19,10 @@ Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> | |||
19 | create mode 100644 custom_debug.h | 19 | create mode 100644 custom_debug.h |
20 | 20 | ||
21 | diff --git a/cpus.c b/cpus.c | 21 | diff --git a/cpus.c b/cpus.c |
22 | index 114c29b..c3dd2e0 100644 | 22 | index 38eba8bff3..b84a60a4f3 100644 |
23 | --- a/cpus.c | 23 | --- a/cpus.c |
24 | +++ b/cpus.c | 24 | +++ b/cpus.c |
25 | @@ -1510,6 +1510,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg) | 25 | @@ -1690,6 +1690,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg) |
26 | return NULL; | 26 | return NULL; |
27 | } | 27 | } |
28 | 28 | ||
@@ -31,7 +31,7 @@ index 114c29b..c3dd2e0 100644 | |||
31 | static void qemu_cpu_kick_thread(CPUState *cpu) | 31 | static void qemu_cpu_kick_thread(CPUState *cpu) |
32 | { | 32 | { |
33 | #ifndef _WIN32 | 33 | #ifndef _WIN32 |
34 | @@ -1522,6 +1524,9 @@ static void qemu_cpu_kick_thread(CPUState *cpu) | 34 | @@ -1702,6 +1704,9 @@ static void qemu_cpu_kick_thread(CPUState *cpu) |
35 | err = pthread_kill(cpu->thread->thread, SIG_IPI); | 35 | err = pthread_kill(cpu->thread->thread, SIG_IPI); |
36 | if (err) { | 36 | if (err) { |
37 | fprintf(stderr, "qemu:%s: %s", __func__, strerror(err)); | 37 | fprintf(stderr, "qemu:%s: %s", __func__, strerror(err)); |
@@ -43,7 +43,7 @@ index 114c29b..c3dd2e0 100644 | |||
43 | #else /* _WIN32 */ | 43 | #else /* _WIN32 */ |
44 | diff --git a/custom_debug.h b/custom_debug.h | 44 | diff --git a/custom_debug.h b/custom_debug.h |
45 | new file mode 100644 | 45 | new file mode 100644 |
46 | index 0000000..f029e45 | 46 | index 0000000000..f029e45547 |
47 | --- /dev/null | 47 | --- /dev/null |
48 | +++ b/custom_debug.h | 48 | +++ b/custom_debug.h |
49 | @@ -0,0 +1,24 @@ | 49 | @@ -0,0 +1,24 @@ |
diff --git a/meta/recipes-devtools/qemu/qemu/0013-ps2-check-PS2Queue-pointers-in-post_load-routine.patch b/meta/recipes-devtools/qemu/qemu/0013-ps2-check-PS2Queue-pointers-in-post_load-routine.patch deleted file mode 100644 index d2bdf6b017..0000000000 --- a/meta/recipes-devtools/qemu/qemu/0013-ps2-check-PS2Queue-pointers-in-post_load-routine.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | From 065061dca34fa5b91be6dce9a87a8755d8826c78 Mon Sep 17 00:00:00 2001 | ||
2 | From: Prasad J Pandit <pjp@fedoraproject.org> | ||
3 | Date: Thu, 16 Nov 2017 13:21:55 +0530 | ||
4 | Subject: [PATCH] ps2: check PS2Queue pointers in post_load routine | ||
5 | |||
6 | During Qemu guest migration, a destination process invokes ps2 | ||
7 | post_load function. In that, if 'rptr' and 'count' values were | ||
8 | invalid, it could lead to OOB access or infinite loop issue. | ||
9 | Add check to avoid it. | ||
10 | |||
11 | Reported-by: Cyrille Chatras <cyrille.chatras@orange.com> | ||
12 | Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> | ||
13 | Message-id: 20171116075155.22378-1-ppandit@redhat.com | ||
14 | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> | ||
15 | |||
16 | CVE: CVE-2017-16845 | ||
17 | Upstream-Status: Backport | ||
18 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
19 | --- | ||
20 | hw/input/ps2.c | 21 +++++++++------------ | ||
21 | 1 file changed, 9 insertions(+), 12 deletions(-) | ||
22 | |||
23 | diff --git a/hw/input/ps2.c b/hw/input/ps2.c | ||
24 | index f388a23..de171a2 100644 | ||
25 | --- a/hw/input/ps2.c | ||
26 | +++ b/hw/input/ps2.c | ||
27 | @@ -1225,24 +1225,21 @@ static void ps2_common_reset(PS2State *s) | ||
28 | static void ps2_common_post_load(PS2State *s) | ||
29 | { | ||
30 | PS2Queue *q = &s->queue; | ||
31 | - int size; | ||
32 | - int i; | ||
33 | - int tmp_data[PS2_QUEUE_SIZE]; | ||
34 | + uint8_t i, size; | ||
35 | + uint8_t tmp_data[PS2_QUEUE_SIZE]; | ||
36 | |||
37 | /* set the useful data buffer queue size, < PS2_QUEUE_SIZE */ | ||
38 | - size = q->count > PS2_QUEUE_SIZE ? 0 : q->count; | ||
39 | + size = (q->count < 0 || q->count > PS2_QUEUE_SIZE) ? 0 : q->count; | ||
40 | |||
41 | /* move the queue elements to the start of data array */ | ||
42 | - if (size > 0) { | ||
43 | - for (i = 0; i < size; i++) { | ||
44 | - /* move the queue elements to the temporary buffer */ | ||
45 | - tmp_data[i] = q->data[q->rptr]; | ||
46 | - if (++q->rptr == 256) { | ||
47 | - q->rptr = 0; | ||
48 | - } | ||
49 | + for (i = 0; i < size; i++) { | ||
50 | + if (q->rptr < 0 || q->rptr >= sizeof(q->data)) { | ||
51 | + q->rptr = 0; | ||
52 | } | ||
53 | - memcpy(q->data, tmp_data, size); | ||
54 | + tmp_data[i] = q->data[q->rptr++]; | ||
55 | } | ||
56 | + memcpy(q->data, tmp_data, size); | ||
57 | + | ||
58 | /* reset rptr/wptr/count */ | ||
59 | q->rptr = 0; | ||
60 | q->wptr = size; | ||
diff --git a/meta/recipes-devtools/qemu/qemu_2.11.1.bb b/meta/recipes-devtools/qemu/qemu_2.12.0.bb index 2314262d7a..21796df9d7 100644 --- a/meta/recipes-devtools/qemu/qemu_2.11.1.bb +++ b/meta/recipes-devtools/qemu/qemu_2.12.0.bb | |||
@@ -20,19 +20,17 @@ SRC_URI = "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \ | |||
20 | file://0008-chardev-connect-socket-to-a-spawned-command.patch \ | 20 | file://0008-chardev-connect-socket-to-a-spawned-command.patch \ |
21 | file://0009-apic-fixup-fallthrough-to-PIC.patch \ | 21 | file://0009-apic-fixup-fallthrough-to-PIC.patch \ |
22 | file://0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \ | 22 | file://0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \ |
23 | file://0011-memfd-fix-configure-test.patch \ | 23 | file://0011-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch \ |
24 | file://0012-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \ | ||
25 | file://0013-ps2-check-PS2Queue-pointers-in-post_load-routine.patch \ | ||
26 | " | 24 | " |
27 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar" | 25 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar" |
28 | 26 | ||
29 | SRC_URI_append_class-native = " \ | 27 | SRC_URI_append_class-native = " \ |
30 | file://0014-fix-libcap-header-issue-on-some-distro.patch \ | 28 | file://0012-fix-libcap-header-issue-on-some-distro.patch \ |
31 | file://0015-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch \ | 29 | file://0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch \ |
32 | " | 30 | " |
33 | 31 | ||
34 | SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27" | 32 | SRC_URI[md5sum] = "122fd7cdf241ff7eb1e42c0b503b5d1b" |
35 | SRC_URI[sha256sum] = "d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb" | 33 | SRC_URI[sha256sum] = "c9f4a147bc915d24df9784affc611a115f42d24720a89210b479f1ba7a3f679c" |
36 | 34 | ||
37 | COMPATIBLE_HOST_mipsarchn32 = "null" | 35 | COMPATIBLE_HOST_mipsarchn32 = "null" |
38 | COMPATIBLE_HOST_mipsarchn64 = "null" | 36 | COMPATIBLE_HOST_mipsarchn64 = "null" |