summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2020-02-10 13:25:15 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-02-14 13:07:23 +0000
commit1e97c962f29815971cac8c22b111c95709c8ad2b (patch)
treeda75bfeb82b2c4f154c457d9135098562a3e0ef9 /meta/recipes-devtools
parent69e3b6c80ea7cab7f8687ee223dfd29dcc2c0d75 (diff)
downloadpoky-1e97c962f29815971cac8c22b111c95709c8ad2b.tar.gz
qemu: Upgrade to 4.2.0
While we are upgrading let's refresh patches and remove the outdated patches. (From OE-Core rev: ca276b77904429a1ff3188d2373535a462afe266) Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/qemu/qemu-native.inc4
-rw-r--r--meta/recipes-devtools/qemu/qemu-native_4.2.0.bb (renamed from meta/recipes-devtools/qemu/qemu-native_4.1.0.bb)0
-rw-r--r--meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb (renamed from meta/recipes-devtools/qemu/qemu-system-native_4.1.0.bb)0
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc7
-rw-r--r--meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch4
-rw-r--r--meta/recipes-devtools/qemu/qemu/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch6
-rw-r--r--meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch16
-rw-r--r--meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch6
-rw-r--r--meta/recipes-devtools/qemu/qemu/0005-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch6
-rw-r--r--meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch14
-rw-r--r--meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch4
-rw-r--r--meta/recipes-devtools/qemu/qemu/0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch12
-rw-r--r--meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch18
-rw-r--r--meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch14
-rw-r--r--meta/recipes-devtools/qemu/qemu/0011-hw-i386-pc-fix-regression-in-parsing-vga-cmdline-par.patch54
-rw-r--r--meta/recipes-devtools/qemu/qemu/0011-linux-user-remove-host-stime-syscall.patch61
-rw-r--r--meta/recipes-devtools/qemu/qemu/0012-fix-libcap-header-issue-on-some-distro.patch (renamed from meta/recipes-devtools/qemu/qemu/0010-fix-libcap-header-issue-on-some-distro.patch)0
-rw-r--r--meta/recipes-devtools/qemu/qemu/0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch (renamed from meta/recipes-devtools/qemu/qemu/0011-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch)0
-rw-r--r--meta/recipes-devtools/qemu/qemu/CVE-2019-12068.patch108
-rw-r--r--meta/recipes-devtools/qemu/qemu_4.2.0.bb (renamed from meta/recipes-devtools/qemu/qemu_4.1.0.bb)0
20 files changed, 107 insertions, 227 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-native.inc b/meta/recipes-devtools/qemu/qemu-native.inc
index 69c2c43e6b..28cfd2cca3 100644
--- a/meta/recipes-devtools/qemu/qemu-native.inc
+++ b/meta/recipes-devtools/qemu/qemu-native.inc
@@ -3,8 +3,8 @@ inherit native
3require qemu.inc 3require qemu.inc
4 4
5SRC_URI_append = " \ 5SRC_URI_append = " \
6 file://0010-fix-libcap-header-issue-on-some-distro.patch \ 6 file://0012-fix-libcap-header-issue-on-some-distro.patch \
7 file://0011-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch \ 7 file://0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch \
8 " 8 "
9 9
10EXTRA_OEMAKE_append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'" 10EXTRA_OEMAKE_append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
diff --git a/meta/recipes-devtools/qemu/qemu-native_4.1.0.bb b/meta/recipes-devtools/qemu/qemu-native_4.2.0.bb
index c8acff8e19..c8acff8e19 100644
--- a/meta/recipes-devtools/qemu/qemu-native_4.1.0.bb
+++ b/meta/recipes-devtools/qemu/qemu-native_4.2.0.bb
diff --git a/meta/recipes-devtools/qemu/qemu-system-native_4.1.0.bb b/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb
index d83ee59375..d83ee59375 100644
--- a/meta/recipes-devtools/qemu/qemu-system-native_4.1.0.bb
+++ b/meta/recipes-devtools/qemu/qemu-system-native_4.2.0.bb
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index eb9f060997..a557e74e97 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -27,14 +27,13 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
27 file://0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \ 27 file://0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
28 file://0009-Fix-webkitgtk-builds.patch \ 28 file://0009-Fix-webkitgtk-builds.patch \
29 file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch \ 29 file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch \
30 file://0011-linux-user-remove-host-stime-syscall.patch \ 30 file://0011-hw-i386-pc-fix-regression-in-parsing-vga-cmdline-par.patch \
31 file://CVE-2019-15890.patch \ 31 file://CVE-2019-15890.patch \
32 file://CVE-2019-12068.patch \
33 " 32 "
34UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" 33UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
35 34
36SRC_URI[md5sum] = "cdf2b5ca52b9abac9bacb5842fa420f8" 35SRC_URI[md5sum] = "278eeb294e4b497e79af7a57e660cb9a"
37SRC_URI[sha256sum] = "656e60218689bdeec69903087fd7582d5d3e72238d02f4481d8dc6d79fd909c6" 36SRC_URI[sha256sum] = "d3481d4108ce211a053ef15be69af1bdd9dde1510fda80d92be0f6c3e98768f0"
38 37
39COMPATIBLE_HOST_mipsarchn32 = "null" 38COMPATIBLE_HOST_mipsarchn32 = "null"
40COMPATIBLE_HOST_mipsarchn64 = "null" 39COMPATIBLE_HOST_mipsarchn64 = "null"
diff --git a/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch b/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch
index 9478102ae5..66ff996508 100644
--- a/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch
+++ b/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-missing-wacom-HID-descriptor.patch
@@ -1,4 +1,4 @@
1From 4655dc18074e0be9d239f51dac32b61435da8549 Mon Sep 17 00:00:00 2001 1From 526cb7e26f6dd96c9ee2ffa05ce0a358d3bfbfb3 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org> 2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Thu, 27 Nov 2014 14:04:29 +0000 3Date: Thu, 27 Nov 2014 14:04:29 +0000
4Subject: [PATCH] qemu: Add missing wacom HID descriptor 4Subject: [PATCH] qemu: Add missing wacom HID descriptor
@@ -19,7 +19,7 @@ Upstream-Status: Submitted
19 1 file changed, 93 insertions(+), 1 deletion(-) 19 1 file changed, 93 insertions(+), 1 deletion(-)
20 20
21diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c 21diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c
22index 8c43db93..3ff8ca28 100644 22index 8ed57b3b..1502928b 100644
23--- a/hw/usb/dev-wacom.c 23--- a/hw/usb/dev-wacom.c
24+++ b/hw/usb/dev-wacom.c 24+++ b/hw/usb/dev-wacom.c
25@@ -74,6 +74,89 @@ static const USBDescStrings desc_strings = { 25@@ -74,6 +74,89 @@ static const USBDescStrings desc_strings = {
diff --git a/meta/recipes-devtools/qemu/qemu/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch b/meta/recipes-devtools/qemu/qemu/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch
index 2ccddd53cf..7f7da51006 100644
--- a/meta/recipes-devtools/qemu/qemu/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch
+++ b/meta/recipes-devtools/qemu/qemu/0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch
@@ -1,4 +1,4 @@
1From 67751f3a23e3db3012f391b3b3b73a4484488ce9 Mon Sep 17 00:00:00 2001 1From 8ee6281516bd9210e75e91d705da8916bab3bf51 Mon Sep 17 00:00:00 2001
2From: Juro Bystricky <juro.bystricky@intel.com> 2From: Juro Bystricky <juro.bystricky@intel.com>
3Date: Thu, 31 Aug 2017 11:06:56 -0700 3Date: Thu, 31 Aug 2017 11:06:56 -0700
4Subject: [PATCH] Add subpackage -ptest which runs all unit test cases for 4Subject: [PATCH] Add subpackage -ptest which runs all unit test cases for
@@ -15,10 +15,10 @@ Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
15 1 file changed, 8 insertions(+) 15 1 file changed, 8 insertions(+)
16 16
17diff --git a/tests/Makefile.include b/tests/Makefile.include 17diff --git a/tests/Makefile.include b/tests/Makefile.include
18index fd7fdb86..83b7f409 100644 18index 8566f5f1..52d0320b 100644
19--- a/tests/Makefile.include 19--- a/tests/Makefile.include
20+++ b/tests/Makefile.include 20+++ b/tests/Makefile.include
21@@ -1183,4 +1183,12 @@ all: $(QEMU_IOTESTS_HELPERS-y) 21@@ -1210,4 +1210,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
22 -include $(wildcard tests/*.d) 22 -include $(wildcard tests/*.d)
23 -include $(wildcard tests/libqos/*.d) 23 -include $(wildcard tests/libqos/*.d)
24 24
diff --git a/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch
index 5c42d68030..012d60d8f0 100644
--- a/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch
+++ b/meta/recipes-devtools/qemu/qemu/0003-qemu-Add-addition-environment-space-to-boot-loader-q.patch
@@ -1,4 +1,4 @@
1From 235b94f1188597873c8776b019fed49947983392 Mon Sep 17 00:00:00 2001 1From ce1eceab2350d27960ec254650717085f6a11c9a Mon Sep 17 00:00:00 2001
2From: Jason Wessel <jason.wessel@windriver.com> 2From: Jason Wessel <jason.wessel@windriver.com>
3Date: Fri, 28 Mar 2014 17:42:43 +0800 3Date: Fri, 28 Mar 2014 17:42:43 +0800
4Subject: [PATCH] qemu: Add addition environment space to boot loader 4Subject: [PATCH] qemu: Add addition environment space to boot loader
@@ -19,15 +19,15 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com>
19 1 file changed, 1 insertion(+), 1 deletion(-) 19 1 file changed, 1 insertion(+), 1 deletion(-)
20 20
21diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c 21diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
22index 20e019bf..d150b01c 100644 22index 92e9ca5b..3a7f3954 100644
23--- a/hw/mips/mips_malta.c 23--- a/hw/mips/mips_malta.c
24+++ b/hw/mips/mips_malta.c 24+++ b/hw/mips/mips_malta.c
25@@ -60,7 +60,7 @@ 25@@ -59,7 +59,7 @@
26 26
27 #define ENVP_ADDR 0x80002000l 27 #define ENVP_ADDR 0x80002000l
28 #define ENVP_NB_ENTRIES 16 28 #define ENVP_NB_ENTRIES 16
29-#define ENVP_ENTRY_SIZE 256 29-#define ENVP_ENTRY_SIZE 256
30+#define ENVP_ENTRY_SIZE 1024 30+#define ENVP_ENTRY_SIZE 1024
31 31
32 /* Hardware addresses */ 32 /* Hardware addresses */
33 #define FLASH_ADDRESS 0x1e000000ULL 33 #define FLASH_ADDRESS 0x1e000000ULL
diff --git a/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch b/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch
index 0ac4ab40b1..bc30397e8c 100644
--- a/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch
+++ b/meta/recipes-devtools/qemu/qemu/0004-qemu-disable-Valgrind.patch
@@ -1,4 +1,4 @@
1From 3ad7a375015d47fdf5016e03e11fa93440d6d8bd Mon Sep 17 00:00:00 2001 1From 4127296bb1046cdf73994ba69dc913d8c02fd74f Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@intel.com> 2From: Ross Burton <ross.burton@intel.com>
3Date: Tue, 20 Oct 2015 22:19:08 +0100 3Date: Tue, 20 Oct 2015 22:19:08 +0100
4Subject: [PATCH] qemu: disable Valgrind 4Subject: [PATCH] qemu: disable Valgrind
@@ -13,10 +13,10 @@ Signed-off-by: Ross Burton <ross.burton@intel.com>
13 1 file changed, 9 deletions(-) 13 1 file changed, 9 deletions(-)
14 14
15diff --git a/configure b/configure 15diff --git a/configure b/configure
16index 714e7fb6..dad4fc59 100755 16index 6099be1d..a766017b 100755
17--- a/configure 17--- a/configure
18+++ b/configure 18+++ b/configure
19@@ -5335,15 +5335,6 @@ fi 19@@ -5390,15 +5390,6 @@ fi
20 # check if we have valgrind/valgrind.h 20 # check if we have valgrind/valgrind.h
21 21
22 valgrind_h=no 22 valgrind_h=no
diff --git a/meta/recipes-devtools/qemu/qemu/0005-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch b/meta/recipes-devtools/qemu/qemu/0005-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch
index a73681510e..ec303371b0 100644
--- a/meta/recipes-devtools/qemu/qemu/0005-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch
+++ b/meta/recipes-devtools/qemu/qemu/0005-qemu-native-set-ld.bfd-fix-cflags-and-set-some-envir.patch
@@ -1,4 +1,4 @@
1From 80e6070bcdfe636b103a13598e6c38ad0d0e7624 Mon Sep 17 00:00:00 2001 1From 6cdf82af2eba312b9b8da86dda28b98d3d51f4d4 Mon Sep 17 00:00:00 2001
2From: Stephen Arnold <sarnold@vctlabs.com> 2From: Stephen Arnold <sarnold@vctlabs.com>
3Date: Sun, 12 Jun 2016 18:09:56 -0700 3Date: Sun, 12 Jun 2016 18:09:56 -0700
4Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some environment 4Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some environment
@@ -10,10 +10,10 @@ Upstream-Status: Pending
10 1 file changed, 4 deletions(-) 10 1 file changed, 4 deletions(-)
11 11
12diff --git a/configure b/configure 12diff --git a/configure b/configure
13index dad4fc59..685bbe5e 100755 13index a766017b..72f11aca 100755
14--- a/configure 14--- a/configure
15+++ b/configure 15+++ b/configure
16@@ -5971,10 +5971,6 @@ write_c_skeleton 16@@ -6085,10 +6085,6 @@ write_c_skeleton
17 if test "$gcov" = "yes" ; then 17 if test "$gcov" = "yes" ; then
18 CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS" 18 CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
19 LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS" 19 LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
diff --git a/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch b/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch
index a42385530f..0810ae84c0 100644
--- a/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch
+++ b/meta/recipes-devtools/qemu/qemu/0006-chardev-connect-socket-to-a-spawned-command.patch
@@ -1,4 +1,4 @@
1From ad853601e75f6d0dd09672bcca05fbe4fac766a4 Mon Sep 17 00:00:00 2001 1From bcc63f775e265df69963a4ad7805b8678ace68f0 Mon Sep 17 00:00:00 2001
2From: Alistair Francis <alistair.francis@xilinx.com> 2From: Alistair Francis <alistair.francis@xilinx.com>
3Date: Thu, 21 Dec 2017 11:35:16 -0800 3Date: Thu, 21 Dec 2017 11:35:16 -0800
4Subject: [PATCH] chardev: connect socket to a spawned command 4Subject: [PATCH] chardev: connect socket to a spawned command
@@ -52,10 +52,10 @@ Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
52 3 files changed, 109 insertions(+) 52 3 files changed, 109 insertions(+)
53 53
54diff --git a/chardev/char-socket.c b/chardev/char-socket.c 54diff --git a/chardev/char-socket.c b/chardev/char-socket.c
55index 7ca5d97a..207fae4a 100644 55index 185fe38d..54fa4234 100644
56--- a/chardev/char-socket.c 56--- a/chardev/char-socket.c
57+++ b/chardev/char-socket.c 57+++ b/chardev/char-socket.c
58@@ -1278,6 +1278,67 @@ static bool qmp_chardev_validate_socket(ChardevSocket *sock, 58@@ -1288,6 +1288,67 @@ static bool qmp_chardev_validate_socket(ChardevSocket *sock,
59 return true; 59 return true;
60 } 60 }
61 61
@@ -123,7 +123,7 @@ index 7ca5d97a..207fae4a 100644
123 123
124 static void qmp_chardev_open_socket(Chardev *chr, 124 static void qmp_chardev_open_socket(Chardev *chr,
125 ChardevBackend *backend, 125 ChardevBackend *backend,
126@@ -1286,6 +1347,9 @@ static void qmp_chardev_open_socket(Chardev *chr, 126@@ -1296,6 +1357,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,7 +133,7 @@ index 7ca5d97a..207fae4a 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@@ -1351,6 +1415,14 @@ static void qmp_chardev_open_socket(Chardev *chr, 136@@ -1361,6 +1425,14 @@ static void qmp_chardev_open_socket(Chardev *chr,
137 137
138 update_disconnected_filename(s); 138 update_disconnected_filename(s);
139 139
@@ -148,7 +148,7 @@ index 7ca5d97a..207fae4a 100644
148 if (s->is_listen) { 148 if (s->is_listen) {
149 if (qmp_chardev_open_socket_server(chr, is_telnet || is_tn3270, 149 if (qmp_chardev_open_socket_server(chr, is_telnet || is_tn3270,
150 is_waitconnect, errp) < 0) { 150 is_waitconnect, errp) < 0) {
151@@ -1370,9 +1442,26 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend, 151@@ -1380,9 +1452,26 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
152 const char *host = qemu_opt_get(opts, "host"); 152 const char *host = qemu_opt_get(opts, "host");
153 const char *port = qemu_opt_get(opts, "port"); 153 const char *port = qemu_opt_get(opts, "port");
154 const char *fd = qemu_opt_get(opts, "fd"); 154 const char *fd = qemu_opt_get(opts, "fd");
@@ -175,7 +175,7 @@ index 7ca5d97a..207fae4a 100644
175 if ((!!path + !!fd + !!host) != 1) { 175 if ((!!path + !!fd + !!host) != 1) {
176 error_setg(errp, 176 error_setg(errp,
177 "Exactly one of 'path', 'fd' or 'host' required"); 177 "Exactly one of 'path', 'fd' or 'host' required");
178@@ -1415,12 +1504,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend, 178@@ -1425,12 +1514,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
179 sock->has_tls_authz = qemu_opt_get(opts, "tls-authz"); 179 sock->has_tls_authz = qemu_opt_get(opts, "tls-authz");
180 sock->tls_authz = g_strdup(qemu_opt_get(opts, "tls-authz")); 180 sock->tls_authz = g_strdup(qemu_opt_get(opts, "tls-authz"));
181 181
diff --git a/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch b/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch
index b50e8c2545..89baad9b7f 100644
--- a/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch
+++ b/meta/recipes-devtools/qemu/qemu/0007-apic-fixup-fallthrough-to-PIC.patch
@@ -1,4 +1,4 @@
1From f51e49e7d7d87b7254242b7360f99c2df94a5a2d Mon Sep 17 00:00:00 2001 1From a59a98d100123030a4145e7efe3b8a001920a9f1 Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com> 2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Tue, 26 Feb 2013 11:43:28 -0500 3Date: Tue, 26 Feb 2013 11:43:28 -0500
4Subject: [PATCH] apic: fixup fallthrough to PIC 4Subject: [PATCH] apic: fixup fallthrough to PIC
@@ -30,7 +30,7 @@ Signed-off-by: He Zhe <zhe.he@windriver.com>
30 1 file changed, 1 insertion(+), 1 deletion(-) 30 1 file changed, 1 insertion(+), 1 deletion(-)
31 31
32diff --git a/hw/intc/apic.c b/hw/intc/apic.c 32diff --git a/hw/intc/apic.c b/hw/intc/apic.c
33index bce89911..df4b582e 100644 33index 2a74f7b4..4d5da365 100644
34--- a/hw/intc/apic.c 34--- a/hw/intc/apic.c
35+++ b/hw/intc/apic.c 35+++ b/hw/intc/apic.c
36@@ -603,7 +603,7 @@ int apic_accept_pic_intr(DeviceState *dev) 36@@ -603,7 +603,7 @@ int apic_accept_pic_intr(DeviceState *dev)
diff --git a/meta/recipes-devtools/qemu/qemu/0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch b/meta/recipes-devtools/qemu/qemu/0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
index e562f25bec..30bb4ddf26 100644
--- a/meta/recipes-devtools/qemu/qemu/0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
+++ b/meta/recipes-devtools/qemu/qemu/0008-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
@@ -1,4 +1,4 @@
1From 25a064f91f73630e5dff2a6aeb23d953c469cea6 Mon Sep 17 00:00:00 2001 1From cf8c9aac5243f506a1a3e8e284414f311cde04f5 Mon Sep 17 00:00:00 2001
2From: Alistair Francis <alistair.francis@xilinx.com> 2From: Alistair Francis <alistair.francis@xilinx.com>
3Date: Wed, 17 Jan 2018 10:51:49 -0800 3Date: Wed, 17 Jan 2018 10:51:49 -0800
4Subject: [PATCH] linux-user: Fix webkitgtk hangs on 32-bit x86 target 4Subject: [PATCH] linux-user: Fix webkitgtk hangs on 32-bit x86 target
@@ -19,15 +19,15 @@ Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
19 1 file changed, 1 insertion(+), 1 deletion(-) 19 1 file changed, 1 insertion(+), 1 deletion(-)
20 20
21diff --git a/linux-user/main.c b/linux-user/main.c 21diff --git a/linux-user/main.c b/linux-user/main.c
22index 8ffc5251..4067e739 100644 22index 6ff7851e..ebff0485 100644
23--- a/linux-user/main.c 23--- a/linux-user/main.c
24+++ b/linux-user/main.c 24+++ b/linux-user/main.c
25@@ -77,7 +77,7 @@ int have_guest_base; 25@@ -78,7 +78,7 @@ int have_guest_base;
26 (TARGET_LONG_BITS == 32 || defined(TARGET_ABI32)) 26 (TARGET_LONG_BITS == 32 || defined(TARGET_ABI32))
27 /* There are a number of places where we assign reserved_va to a variable 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. */ 28 of type abi_ulong and expect it to fit. Avoid the last page. */
29-# define MAX_RESERVED_VA (0xfffffffful & TARGET_PAGE_MASK) 29-# define MAX_RESERVED_VA(CPU) (0xfffffffful & TARGET_PAGE_MASK)
30+# define MAX_RESERVED_VA (0x7ffffffful & TARGET_PAGE_MASK) 30+# define MAX_RESERVED_VA(CPU) (0x7ffffffful & TARGET_PAGE_MASK)
31 # else 31 # else
32 # define MAX_RESERVED_VA (1ul << TARGET_VIRT_ADDR_SPACE_BITS) 32 # define MAX_RESERVED_VA(CPU) (1ul << TARGET_VIRT_ADDR_SPACE_BITS)
33 # endif 33 # endif
diff --git a/meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch b/meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch
index 4072d9455f..7e273eeced 100644
--- a/meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch
+++ b/meta/recipes-devtools/qemu/qemu/0009-Fix-webkitgtk-builds.patch
@@ -1,4 +1,4 @@
1From b633b9a1813fcd715dce44659a89293f1c64ae8c Mon Sep 17 00:00:00 2001 1From 613166007e3b852c99caf2cd34a972e2c8460737 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <martin.jansa@lge.com> 2From: Martin Jansa <martin.jansa@lge.com>
3Date: Fri, 1 Jun 2018 08:41:07 +0000 3Date: Fri, 1 Jun 2018 08:41:07 +0000
4Subject: [PATCH] Fix webkitgtk builds 4Subject: [PATCH] Fix webkitgtk builds
@@ -18,6 +18,7 @@ This reverts commit ebf9a3630c911d0cfc9c20f7cafe9ba4f88cf583.
18 18
19Upstream-Status: Pending 19Upstream-Status: Pending
20Signed-off-by: Alistair Francis <alistair.francis@wdc.com> 20Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
21
21--- 22---
22 include/exec/cpu-all.h | 6 +----- 23 include/exec/cpu-all.h | 6 +-----
23 include/exec/cpu_ldst.h | 5 ++++- 24 include/exec/cpu_ldst.h | 5 ++++-
@@ -26,7 +27,7 @@ Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
26 4 files changed, 10 insertions(+), 23 deletions(-) 27 4 files changed, 10 insertions(+), 23 deletions(-)
27 28
28diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h 29diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
29index 536ea58f81..4c63a6a2e4 100644 30index e96781a4..a369f81a 100644
30--- a/include/exec/cpu-all.h 31--- a/include/exec/cpu-all.h
31+++ b/include/exec/cpu-all.h 32+++ b/include/exec/cpu-all.h
32@@ -162,12 +162,8 @@ extern unsigned long guest_base; 33@@ -162,12 +162,8 @@ extern unsigned long guest_base;
@@ -44,7 +45,7 @@ index 536ea58f81..4c63a6a2e4 100644
44 45
45 #include "exec/hwaddr.h" 46 #include "exec/hwaddr.h"
46diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h 47diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h
47index 9151fdb042..cb2b8f329f 100644 48index fd499f7e..30575f60 100644
48--- a/include/exec/cpu_ldst.h 49--- a/include/exec/cpu_ldst.h
49+++ b/include/exec/cpu_ldst.h 50+++ b/include/exec/cpu_ldst.h
50@@ -65,7 +65,10 @@ typedef uint64_t abi_ptr; 51@@ -65,7 +65,10 @@ typedef uint64_t abi_ptr;
@@ -60,7 +61,7 @@ index 9151fdb042..cb2b8f329f 100644
60 #define h2g_valid(x) guest_addr_valid((unsigned long)(x) - guest_base) 61 #define h2g_valid(x) guest_addr_valid((unsigned long)(x) - guest_base)
61 62
62diff --git a/linux-user/mmap.c b/linux-user/mmap.c 63diff --git a/linux-user/mmap.c b/linux-user/mmap.c
63index 46a6e3a761..7735465462 100644 64index 46a6e3a7..77354654 100644
64--- a/linux-user/mmap.c 65--- a/linux-user/mmap.c
65+++ b/linux-user/mmap.c 66+++ b/linux-user/mmap.c
66@@ -78,7 +78,7 @@ int target_mprotect(abi_ulong start, abi_ulong len, int prot) 67@@ -78,7 +78,7 @@ int target_mprotect(abi_ulong start, abi_ulong len, int prot)
@@ -110,10 +111,10 @@ index 46a6e3a761..7735465462 100644
110 111
111 if (flags & MREMAP_FIXED) { 112 if (flags & MREMAP_FIXED) {
112diff --git a/linux-user/syscall.c b/linux-user/syscall.c 113diff --git a/linux-user/syscall.c b/linux-user/syscall.c
113index 8b41a03901..bc5d85de02 100644 114index 171c0cae..fc18f244 100644
114--- a/linux-user/syscall.c 115--- a/linux-user/syscall.c
115+++ b/linux-user/syscall.c 116+++ b/linux-user/syscall.c
116@@ -4031,9 +4031,6 @@ static inline abi_ulong do_shmat(CPUArchState *cpu_env, 117@@ -4138,9 +4138,6 @@ static inline abi_ulong do_shmat(CPUArchState *cpu_env,
117 return -TARGET_EINVAL; 118 return -TARGET_EINVAL;
118 } 119 }
119 } 120 }
@@ -123,7 +124,7 @@ index 8b41a03901..bc5d85de02 100644
123 124
124 mmap_lock(); 125 mmap_lock();
125 126
126@@ -6881,7 +6878,7 @@ static int open_self_maps(void *cpu_env, int fd) 127@@ -6990,7 +6987,7 @@ static int open_self_maps(void *cpu_env, int fd)
127 } 128 }
128 if (h2g_valid(min)) { 129 if (h2g_valid(min)) {
129 int flags = page_get_flags(h2g(min)); 130 int flags = page_get_flags(h2g(min));
@@ -132,6 +133,3 @@ index 8b41a03901..bc5d85de02 100644
132 if (page_check_range(h2g(min), max - min, flags) == -1) { 133 if (page_check_range(h2g(min), max - min, flags) == -1) {
133 continue; 134 continue;
134 } 135 }
135--
1362.22.0
137
diff --git a/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch b/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
index a8ab7daa42..34df78b7fe 100644
--- a/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
+++ b/meta/recipes-devtools/qemu/qemu/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch
@@ -1,7 +1,7 @@
1From 5214dd4461f2090ef0965b4d2518f49927d61cbc Mon Sep 17 00:00:00 2001 1From c207607cdf3996ad9783c3bffbcd3d65e74c0158 Mon Sep 17 00:00:00 2001
2From: He Zhe <zhe.he@windriver.com> 2From: He Zhe <zhe.he@windriver.com>
3Date: Wed, 28 Aug 2019 19:56:28 +0800 3Date: Wed, 28 Aug 2019 19:56:28 +0800
4Subject: [Qemu-devel] [PATCH] configure: Add pkg-config handling for libgcrypt 4Subject: [PATCH] configure: Add pkg-config handling for libgcrypt
5 5
6libgcrypt may also be controlled by pkg-config, this patch adds pkg-config 6libgcrypt may also be controlled by pkg-config, this patch adds pkg-config
7handling for libgcrypt. 7handling for libgcrypt.
@@ -9,12 +9,13 @@ handling for libgcrypt.
9Upstream-Status: Denied [https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg06333.html] 9Upstream-Status: Denied [https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg06333.html]
10 10
11Signed-off-by: He Zhe <zhe.he@windriver.com> 11Signed-off-by: He Zhe <zhe.he@windriver.com>
12
12--- 13---
13 configure | 48 ++++++++++++++++++++++++++++++++++++++++-------- 14 configure | 48 ++++++++++++++++++++++++++++++++++++++++--------
14 1 file changed, 40 insertions(+), 8 deletions(-) 15 1 file changed, 40 insertions(+), 8 deletions(-)
15 16
16diff --git a/configure b/configure 17diff --git a/configure b/configure
17index e44e454..0f362a7 100755 18index 72f11aca..cac271ce 100755
18--- a/configure 19--- a/configure
19+++ b/configure 20+++ b/configure
20@@ -2875,6 +2875,30 @@ has_libgcrypt() { 21@@ -2875,6 +2875,30 @@ has_libgcrypt() {
@@ -48,7 +49,7 @@ index e44e454..0f362a7 100755
48 49
49 if test "$nettle" != "no"; then 50 if test "$nettle" != "no"; then
50 pass="no" 51 pass="no"
51@@ -2902,7 +2926,14 @@ fi 52@@ -2915,7 +2939,14 @@ fi
52 53
53 if test "$gcrypt" != "no"; then 54 if test "$gcrypt" != "no"; then
54 pass="no" 55 pass="no"
@@ -64,7 +65,7 @@ index e44e454..0f362a7 100755
64 gcrypt_cflags=$(libgcrypt-config --cflags) 65 gcrypt_cflags=$(libgcrypt-config --cflags)
65 gcrypt_libs=$(libgcrypt-config --libs) 66 gcrypt_libs=$(libgcrypt-config --libs)
66 # Debian has removed -lgpg-error from libgcrypt-config 67 # Debian has removed -lgpg-error from libgcrypt-config
67@@ -2912,15 +2943,16 @@ if test "$gcrypt" != "no"; then 68@@ -2925,15 +2956,16 @@ if test "$gcrypt" != "no"; then
68 then 69 then
69 gcrypt_libs="$gcrypt_libs -lgpg-error" 70 gcrypt_libs="$gcrypt_libs -lgpg-error"
70 fi 71 fi
@@ -88,6 +89,3 @@ index e44e454..0f362a7 100755
88 if test "$pass" = "yes"; then 89 if test "$pass" = "yes"; then
89 gcrypt="yes" 90 gcrypt="yes"
90 cat > $TMPC << EOF 91 cat > $TMPC << EOF
91--
922.7.4
93
diff --git a/meta/recipes-devtools/qemu/qemu/0011-hw-i386-pc-fix-regression-in-parsing-vga-cmdline-par.patch b/meta/recipes-devtools/qemu/qemu/0011-hw-i386-pc-fix-regression-in-parsing-vga-cmdline-par.patch
new file mode 100644
index 0000000000..2fe0850a33
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0011-hw-i386-pc-fix-regression-in-parsing-vga-cmdline-par.patch
@@ -0,0 +1,54 @@
1From a88c40f02ace88f09b2a85a64831b277b2ebc88c Mon Sep 17 00:00:00 2001
2From: Peter Wu <peter@lekensteyn.nl>
3Date: Sat, 21 Dec 2019 17:21:24 +0100
4Subject: [PATCH] hw/i386/pc: fix regression in parsing vga cmdline parameter
5
6When the 'vga=' parameter is succeeded by another parameter, QEMU 4.2.0
7would refuse to start with a rather cryptic message:
8
9 $ qemu-system-x86_64 -kernel /boot/vmlinuz-linux -append 'vga=792 quiet'
10 qemu: can't parse 'vga' parameter: Invalid argument
11
12It was not clear whether this applied to the '-vga std' parameter or the
13'-append' one. Fix the parsing regression and clarify the error.
14
15Fixes: 133ef074bd ("hw/i386/pc: replace use of strtol with qemu_strtoui in x86_load_linux()")
16Cc: Sergio Lopez <slp@redhat.com>
17Signed-off-by: Peter Wu <peter@lekensteyn.nl>
18Message-Id: <20191221162124.1159291-1-peter@lekensteyn.nl>
19Cc: qemu-stable@nongnu.org
20Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
21Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commitdiff;h=a88c40f02ace88f09b2a85a64831b277b2ebc88c]
22---
23 hw/i386/x86.c | 8 ++++----
24 1 file changed, 4 insertions(+), 4 deletions(-)
25
26diff --git a/hw/i386/x86.c b/hw/i386/x86.c
27index d8bb5c2a96..9b9a4d5837 100644
28--- a/hw/i386/x86.c
29+++ b/hw/i386/x86.c
30@@ -612,6 +612,7 @@ void x86_load_linux(X86MachineState *x86ms,
31 vmode = strstr(kernel_cmdline, "vga=");
32 if (vmode) {
33 unsigned int video_mode;
34+ const char *end;
35 int ret;
36 /* skip "vga=" */
37 vmode += 4;
38@@ -622,10 +623,9 @@ void x86_load_linux(X86MachineState *x86ms,
39 } else if (!strncmp(vmode, "ask", 3)) {
40 video_mode = 0xfffd;
41 } else {
42- ret = qemu_strtoui(vmode, NULL, 0, &video_mode);
43- if (ret != 0) {
44- fprintf(stderr, "qemu: can't parse 'vga' parameter: %s\n",
45- strerror(-ret));
46+ ret = qemu_strtoui(vmode, &end, 0, &video_mode);
47+ if (ret != 0 || (*end && *end != ' ')) {
48+ fprintf(stderr, "qemu: invalid 'vga=' kernel parameter.\n");
49 exit(1);
50 }
51 }
52--
532.25.0
54
diff --git a/meta/recipes-devtools/qemu/qemu/0011-linux-user-remove-host-stime-syscall.patch b/meta/recipes-devtools/qemu/qemu/0011-linux-user-remove-host-stime-syscall.patch
deleted file mode 100644
index 659e6be45d..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0011-linux-user-remove-host-stime-syscall.patch
+++ /dev/null
@@ -1,61 +0,0 @@
1From 0f1f2d4596aee037d3ccbcf10592466daa54107f Mon Sep 17 00:00:00 2001
2From: Laurent Vivier <laurent@vivier.eu>
3Date: Tue, 12 Nov 2019 15:25:56 +0100
4Subject: [PATCH] linux-user: remove host stime() syscall
5
6stime() has been withdrawn from glibc
7(12cbde1dae6f "Use clock_settime to implement stime; withdraw stime.")
8
9Implement the target stime() syscall using host
10clock_settime(CLOCK_REALTIME, ...) as it is done internally in glibc.
11
12Tested qemu-ppc/x86_64 with:
13
14 #include <time.h>
15 #include <stdio.h>
16
17 int main(void)
18 {
19 time_t t;
20 int ret;
21
22 /* date -u -d"2019-11-12T15:11:00" "+%s" */
23 t = 1573571460;
24 ret = stime(&t);
25 printf("ret %d\n", ret);
26 return 0;
27 }
28
29 # date; ./stime; date
30 Tue Nov 12 14:18:32 UTC 2019
31 ret 0
32 Tue Nov 12 15:11:00 UTC 2019
33
34Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=0f1f2d4596aee037d3ccbcf10592466daa54107f]
35Buglink: https://bugs.launchpad.net/qemu/+bug/1852115
36Reported-by: Cole Robinson <crobinso@redhat.com>
37Signed-off-by: Laurent Vivier <laurent@vivier.eu>
38Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
39Message-Id: <20191112142556.6335-1-laurent@vivier.eu>
40---
41 linux-user/syscall.c | 8 +++++---
42 1 file changed, 5 insertions(+), 3 deletions(-)
43
44--- a/linux-user/syscall.c
45+++ b/linux-user/syscall.c
46@@ -7651,10 +7651,12 @@ static abi_long do_syscall1(void *cpu_en
47 #ifdef TARGET_NR_stime /* not on alpha */
48 case TARGET_NR_stime:
49 {
50- time_t host_time;
51- if (get_user_sal(host_time, arg1))
52+ struct timespec ts;
53+ ts.tv_nsec = 0;
54+ if (get_user_sal(ts.tv_sec, arg1)) {
55 return -TARGET_EFAULT;
56- return get_errno(stime(&host_time));
57+ }
58+ return get_errno(clock_settime(CLOCK_REALTIME, &ts));
59 }
60 #endif
61 #ifdef TARGET_NR_alarm /* not on alpha */
diff --git a/meta/recipes-devtools/qemu/qemu/0010-fix-libcap-header-issue-on-some-distro.patch b/meta/recipes-devtools/qemu/qemu/0012-fix-libcap-header-issue-on-some-distro.patch
index 3a7d7bbd33..3a7d7bbd33 100644
--- a/meta/recipes-devtools/qemu/qemu/0010-fix-libcap-header-issue-on-some-distro.patch
+++ b/meta/recipes-devtools/qemu/qemu/0012-fix-libcap-header-issue-on-some-distro.patch
diff --git a/meta/recipes-devtools/qemu/qemu/0011-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 e5ebfc1267..e5ebfc1267 100644
--- a/meta/recipes-devtools/qemu/qemu/0011-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
diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2019-12068.patch b/meta/recipes-devtools/qemu/qemu/CVE-2019-12068.patch
deleted file mode 100644
index f1655e407f..0000000000
--- a/meta/recipes-devtools/qemu/qemu/CVE-2019-12068.patch
+++ /dev/null
@@ -1,108 +0,0 @@
1From de594e47659029316bbf9391efb79da0a1a08e08 Mon Sep 17 00:00:00 2001
2From: Paolo Bonzini <pbonzini@redhat.com>
3Date: Wed, 14 Aug 2019 17:35:21 +0530
4Subject: [PATCH] scsi: lsi: exit infinite loop while executing script
5 (CVE-2019-12068)
6
7When executing script in lsi_execute_script(), the LSI scsi adapter
8emulator advances 's->dsp' index to read next opcode. This can lead
9to an infinite loop if the next opcode is empty. Move the existing
10loop exit after 10k iterations so that it covers no-op opcodes as
11well.
12
13Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=de594e47659029316bbf9391efb79da0a1a08e08]
14CVE: CVE-2019-12068
15
16Reported-by: Bugs SysSec <bugs-syssec@rub.de>
17Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
18Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
19Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
20
21Signed-off-by: Changqing Li <changqing.li@windriver.com>
22---
23 hw/scsi/lsi53c895a.c | 41 +++++++++++++++++++++++++++--------------
24 1 file changed, 27 insertions(+), 14 deletions(-)
25
26diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c
27index 222a286..ec53b14 100644
28--- a/hw/scsi/lsi53c895a.c
29+++ b/hw/scsi/lsi53c895a.c
30@@ -186,6 +186,9 @@ static const char *names[] = {
31 /* Flag set if this is a tagged command. */
32 #define LSI_TAG_VALID (1 << 16)
33
34+/* Maximum instructions to process. */
35+#define LSI_MAX_INSN 10000
36+
37 typedef struct lsi_request {
38 SCSIRequest *req;
39 uint32_t tag;
40@@ -1133,7 +1136,21 @@ static void lsi_execute_script(LSIState *s)
41
42 s->istat1 |= LSI_ISTAT1_SRUN;
43 again:
44- insn_processed++;
45+ if (++insn_processed > LSI_MAX_INSN) {
46+ /* Some windows drivers make the device spin waiting for a memory
47+ location to change. If we have been executed a lot of code then
48+ assume this is the case and force an unexpected device disconnect.
49+ This is apparently sufficient to beat the drivers into submission.
50+ */
51+ if (!(s->sien0 & LSI_SIST0_UDC)) {
52+ qemu_log_mask(LOG_GUEST_ERROR,
53+ "lsi_scsi: inf. loop with UDC masked");
54+ }
55+ lsi_script_scsi_interrupt(s, LSI_SIST0_UDC, 0);
56+ lsi_disconnect(s);
57+ trace_lsi_execute_script_stop();
58+ return;
59+ }
60 insn = read_dword(s, s->dsp);
61 if (!insn) {
62 /* If we receive an empty opcode increment the DSP by 4 bytes
63@@ -1570,19 +1587,7 @@ again:
64 }
65 }
66 }
67- if (insn_processed > 10000 && s->waiting == LSI_NOWAIT) {
68- /* Some windows drivers make the device spin waiting for a memory
69- location to change. If we have been executed a lot of code then
70- assume this is the case and force an unexpected device disconnect.
71- This is apparently sufficient to beat the drivers into submission.
72- */
73- if (!(s->sien0 & LSI_SIST0_UDC)) {
74- qemu_log_mask(LOG_GUEST_ERROR,
75- "lsi_scsi: inf. loop with UDC masked");
76- }
77- lsi_script_scsi_interrupt(s, LSI_SIST0_UDC, 0);
78- lsi_disconnect(s);
79- } else if (s->istat1 & LSI_ISTAT1_SRUN && s->waiting == LSI_NOWAIT) {
80+ if (s->istat1 & LSI_ISTAT1_SRUN && s->waiting == LSI_NOWAIT) {
81 if (s->dcntl & LSI_DCNTL_SSM) {
82 lsi_script_dma_interrupt(s, LSI_DSTAT_SSI);
83 } else {
84@@ -1970,6 +1975,10 @@ static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val)
85 case 0x2f: /* DSP[24:31] */
86 s->dsp &= 0x00ffffff;
87 s->dsp |= val << 24;
88+ /*
89+ * FIXME: if s->waiting != LSI_NOWAIT, this will only execute one
90+ * instruction. Is this correct?
91+ */
92 if ((s->dmode & LSI_DMODE_MAN) == 0
93 && (s->istat1 & LSI_ISTAT1_SRUN) == 0)
94 lsi_execute_script(s);
95@@ -1988,6 +1997,10 @@ static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val)
96 break;
97 case 0x3b: /* DCNTL */
98 s->dcntl = val & ~(LSI_DCNTL_PFF | LSI_DCNTL_STD);
99+ /*
100+ * FIXME: if s->waiting != LSI_NOWAIT, this will only execute one
101+ * instruction. Is this correct?
102+ */
103 if ((val & LSI_DCNTL_STD) && (s->istat1 & LSI_ISTAT1_SRUN) == 0)
104 lsi_execute_script(s);
105 break;
106--
1072.7.4
108
diff --git a/meta/recipes-devtools/qemu/qemu_4.1.0.bb b/meta/recipes-devtools/qemu/qemu_4.2.0.bb
index f0c1daabe1..f0c1daabe1 100644
--- a/meta/recipes-devtools/qemu/qemu_4.1.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_4.2.0.bb