All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] json-c: upgrade to 0.13.1
@ 2018-05-02 14:37 Martin Jansa
  2018-05-02 14:37 ` [PATCH 2/3] qemu: upgrade to 2.12.0 Martin Jansa
  2018-05-02 14:37 ` [PATCH 3/3] qemu: refresh patches with devtool Martin Jansa
  0 siblings, 2 replies; 29+ messages in thread
From: Martin Jansa @ 2018-05-02 14:37 UTC (permalink / raw)
  To: openembedded-core

* from https://github.com/json-c/json-c/commit/861c1a82868831bf82222f974f05c2af5a975d12

* Bump the major version of the .so library generated up to 4.0 to avoid
  conflicts because some downstream packagers of json-c had already done
  their own bump to ".so.3" for a much older 0.12 release.
* Add const size_t json_c_object_sizeof()
* Avoid invalid free (and thus a segfault) when ref_count gets < 0
* PR#394: fix handling of custom double formats that include a ".0"
* Avoid uninitialized variable warnings in json_object_object_foreach
* Issue #396: fix build for certain uClibc based systems.
* Add a top level fuzz directory for fuzzers run by OSS-Fuzz

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 .../json-c/{json-c_0.13.bb => json-c_0.13.1.bb}     | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
 rename meta/recipes-devtools/json-c/{json-c_0.13.bb => json-c_0.13.1.bb} (78%)

diff --git a/meta/recipes-devtools/json-c/json-c_0.13.bb b/meta/recipes-devtools/json-c/json-c_0.13.1.bb
similarity index 78%
rename from meta/recipes-devtools/json-c/json-c_0.13.bb
rename to meta/recipes-devtools/json-c/json-c_0.13.1.bb
index 06319de323..5b10e68297 100644
--- a/meta/recipes-devtools/json-c/json-c_0.13.bb
+++ b/meta/recipes-devtools/json-c/json-c_0.13.1.bb
@@ -4,18 +4,17 @@ HOMEPAGE = "https://github.com/json-c/json-c/wiki"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
 
-SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
-           "
-SRC_URI[md5sum] = "11fc5d90c77375e5fc8401e8b9efbf21"
-SRC_URI[sha256sum] = "0316780be9ad16c42d7c26b015a784fd5df4b0909fef0aba51cfb13e492ac24d"
+SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz"
+SRC_URI[md5sum] = "04969ad59cc37bddd83741a08b98f350"
+SRC_URI[sha256sum] = "b87e608d4d3f7bfdd36ef78d56d53c74e66ab278d318b71e6002a369d36f4873"
 
 UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+).tar"
 # json-c releases page is fetching the list of releases in some weird XML format
 # from https://s3.amazonaws.com/json-c_releases and processes it with javascript :-/
 #UPSTREAM_CHECK_URI = "https://s3.amazonaws.com/json-c_releases/releases/index.html"
-RECIPE_UPSTREAM_VERSION = "0.13"
-RECIPE_UPSTREAM_DATE = "Dec 07, 2017"
-CHECK_DATE = "Jan 31, 2018"
+RECIPE_UPSTREAM_VERSION = "0.13.1"
+RECIPE_UPSTREAM_DATE = "Mar 04, 2018"
+CHECK_DATE = "May 02, 2018"
 
 RPROVIDES_${PN} = "libjson"
 
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 2/3] qemu: upgrade to 2.12.0
  2018-05-02 14:37 [PATCH 1/3] json-c: upgrade to 0.13.1 Martin Jansa
@ 2018-05-02 14:37 ` Martin Jansa
  2018-05-02 20:44   ` Alistair Francis
                     ` (2 more replies)
  2018-05-02 14:37 ` [PATCH 3/3] qemu: refresh patches with devtool Martin Jansa
  1 sibling, 3 replies; 29+ messages in thread
From: Martin Jansa @ 2018-05-02 14:37 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/conf/distro/include/tcmode-default.inc   |  2 +-
 ...4-treat-DISAS_UPDATE-as-variant-of-D.patch | 67 -------------------
 ...-connect-socket-to-a-spawned-command.patch | 52 +++++++-------
 .../qemu/qemu/disable-grabs.patch             | 43 ++++++------
 meta/recipes-devtools/qemu/qemu/memfd.patch   | 57 ----------------
 .../qemu/qemu/qemu-2.5.0-cflags.patch         | 15 ++++-
 .../qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}   |  6 +-
 7 files changed, 65 insertions(+), 177 deletions(-)
 delete mode 100644 meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu/memfd.patch
 rename meta/recipes-devtools/qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb} (87%)

diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc
index 00399ae820..8b5214ed96 100644
--- a/meta/conf/distro/include/tcmode-default.inc
+++ b/meta/conf/distro/include/tcmode-default.inc
@@ -28,7 +28,7 @@ BINUVERSION ?= "2.30%"
 GDBVERSION ?= "8.0%"
 GLIBCVERSION ?= "2.27%"
 LINUXLIBCVERSION ?= "4.15%"
-QEMUVERSION ?= "2.11%"
+QEMUVERSION ?= "2.12%"
 
 PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
 PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
diff --git a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch b/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
deleted file mode 100644
index f90cae694c..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00 2001
-From: Victor Kamensky <kamensky@cisco.com>
-Date: Fri, 23 Mar 2018 18:26:45 +0000
-Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of
- DISAS_EXIT
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-In OE project 4.15 linux kernel boot hang was observed under
-single cpu aarch64 qemu. Kernel code was in a loop waiting for
-vtimer arrival, spinning in TC generated blocks, while interrupt
-was pending unprocessed. This happened because when qemu tried to
-handle vtimer interrupt target had interrupts disabled, as
-result flag indicating TCG exit, cpu->icount_decr.u16.high,
-was cleared but arm_cpu_exec_interrupt function did not call
-arm_cpu_do_interrupt to process interrupt. Later when target
-reenabled interrupts, it happened without exit into main loop, so
-following code that waited for result of interrupt execution
-run in infinite loop.
-
-To solve the problem instructions that operate on CPU sys state
-(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
-should be considered as DISAS_EXIT variant, and should be
-forced to exit back to main loop so qemu will have a chance
-processing pending CPU state updates, including pending
-interrupts.
-
-This change brings consistency with how DISAS_UPDATE is treated
-in aarch32 case.
-
-CC: Peter Maydell <peter.maydell@linaro.org>
-CC: Alex Bennée <alex.bennee@linaro.org>
-CC: qemu-stable@nongnu.org
-Suggested-by: Peter Maydell <peter.maydell@linaro.org>
-Signed-off-by: Victor Kamensky <kamensky@cisco.com>
-Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
-Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
-Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-Upstream-Status: Backport
----
- target/arm/translate-a64.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
-index 31ff047..327513e 100644
---- a/target/arm/translate-a64.c
-+++ b/target/arm/translate-a64.c
-@@ -13378,12 +13378,12 @@ static void aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
-         case DISAS_UPDATE:
-             gen_a64_set_pc_im(dc->pc);
-             /* fall through */
--        case DISAS_JUMP:
--            tcg_gen_lookup_and_goto_ptr();
--            break;
-         case DISAS_EXIT:
-             tcg_gen_exit_tb(0);
-             break;
-+        case DISAS_JUMP:
-+            tcg_gen_lookup_and_goto_ptr();
-+            break;
-         case DISAS_NORETURN:
-         case DISAS_SWI:
-             break;
--- 
-2.7.4
-
diff --git a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
index 6e6bf95c18..f1cf53a8c5 100644
--- a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
+++ b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
@@ -1,4 +1,4 @@
-From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00 2001
+From a7690b02df70e0d3957e6eaa1e1cf92595839fbb Mon Sep 17 00:00:00 2001
 From: Alistair Francis <alistair.francis@xilinx.com>
 Date: Thu, 21 Dec 2017 11:35:16 -0800
 Subject: [PATCH] chardev: connect socket to a spawned command
@@ -45,16 +45,16 @@ Upstream-Status: Inappropriate [embedded specific]
 
 Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
 ---
- chardev/char-socket.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++---
- chardev/char.c        |  3 ++
- qapi/char.json        |  5 +++
- 3 files changed, 90 insertions(+), 4 deletions(-)
+ chardev/char-socket.c | 102 ++++++++++++++++++++++++++++++++++++++++++
+ chardev/char.c        |   3 ++
+ qapi/char.json        |   5 +++
+ 3 files changed, 110 insertions(+)
 
 diff --git a/chardev/char-socket.c b/chardev/char-socket.c
-index 53eda8ef00..f566107c35 100644
+index 159e69c3b1..84778cf31a 100644
 --- a/chardev/char-socket.c
 +++ b/chardev/char-socket.c
-@@ -852,6 +852,68 @@ static gboolean socket_reconnect_timeout(gpointer opaque)
+@@ -934,6 +934,68 @@ static gboolean socket_reconnect_timeout(gpointer opaque)
      return false;
  }
  
@@ -123,7 +123,7 @@ index 53eda8ef00..f566107c35 100644
  static void qmp_chardev_open_socket(Chardev *chr,
                                      ChardevBackend *backend,
                                      bool *be_opened,
-@@ -859,6 +921,9 @@
+@@ -941,6 +1003,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
  {
      SocketChardev *s = SOCKET_CHARDEV(chr);
      ChardevSocket *sock = backend->u.socket.data;
@@ -133,11 +133,10 @@ index 53eda8ef00..f566107c35 100644
      bool do_nodelay     = sock->has_nodelay ? sock->nodelay : false;
      bool is_listen      = sock->has_server  ? sock->server  : true;
      bool is_telnet      = sock->has_telnet  ? sock->telnet  : false;
-@@ -925,7 +990,14 @@
-     } else if (reconnect > 0) {
+@@ -1008,6 +1073,14 @@ static void qmp_chardev_open_socket(Chardev *chr,
          s->reconnect_time = reconnect;
      }
--
+ 
 +#ifndef _WIN32
 +    if (cmd) {
 +        chardev_open_socket_cmd(chr, cmd, errp);
@@ -146,12 +145,12 @@ index 53eda8ef00..f566107c35 100644
 +        *be_opened = true;
 +    } else
 +#endif
-     if (s->reconnect_time) {
-         sioc = qio_channel_socket_new();
-         tcp_chr_set_client_ioc_name(chr, sioc);
-@@ -985,10 +1057,26 @@
-     const char *host = qemu_opt_get(opts, "host");
+     /* If reconnect_time is set, will do that in chr_machine_done. */
+     if (!s->reconnect_time) {
+         if (s->is_listen) {
+@@ -1065,9 +1138,26 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
      const char *port = qemu_opt_get(opts, "port");
+     const char *fd = qemu_opt_get(opts, "fd");
      const char *tls_creds = qemu_opt_get(opts, "tls-creds");
 +#ifndef _WIN32
 +    const char *cmd = qemu_opt_get(opts, "cmd");
@@ -159,7 +158,6 @@ index 53eda8ef00..f566107c35 100644
      SocketAddressLegacy *addr;
      ChardevSocket *sock;
  
-     backend->type = CHARDEV_BACKEND_KIND_SOCKET;
 +#ifndef _WIN32
 +    if (cmd) {
 +        /*
@@ -173,17 +171,18 @@ index 53eda8ef00..f566107c35 100644
 +        }
 +    } else
 +#endif
-     if (!path) {
-         if (!host) {
-             error_setg(errp, "chardev: socket: no host given");
-@@ -1021,13 +1109,24 @@
-     sock->has_reconnect = true;
++
+     if ((!!path + !!fd + !!host) != 1) {
+         error_setg(errp,
+                    "Exactly one of 'path', 'fd' or 'host' required");
+@@ -1112,12 +1202,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
      sock->reconnect = reconnect;
      sock->tls_creds = g_strdup(tls_creds);
+ 
 +#ifndef _WIN32
 +    sock->cmd = g_strdup(cmd);
 +#endif
- 
++ 
      addr = g_new0(SocketAddressLegacy, 1);
 +#ifndef _WIN32
 +    if (path || cmd) {
@@ -198,11 +197,11 @@ index 53eda8ef00..f566107c35 100644
 +#else
          q_unix->path = g_strdup(path);
 +#endif
-     } else {
+     } else if (host) {
          addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
          addr->u.inet.data = g_new(InetSocketAddress, 1);
 diff --git a/chardev/char.c b/chardev/char.c
-index 2ae4f465ec..5d52cd5de5 100644
+index 76d866e6fe..9747d51d7c 100644
 --- a/chardev/char.c
 +++ b/chardev/char.c
 @@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
@@ -239,4 +238,5 @@ index ae19dcd1ed..6de0f29bcd 100644
                                       '*server'    : 'bool',
                                       '*wait'      : 'bool',
 -- 
-2.14.1
+2.17.0
+
diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
index 77117890f4..e29c011a6f 100644
--- a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
+++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
@@ -1,3 +1,11 @@
+From a31c5c695cb716310257f1fc60a06b821e74fe7f Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Wed, 18 Sep 2013 14:04:54 +0100
+Subject: [PATCH] sdl.c: allow user to disable pointer grabs
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
 When the pointer enters the Qemu window it calls SDL_WM_GrabInput, which calls
 XGrabPointer in a busyloop until it returns GrabSuccess. However if there's already
 a pointer grab (screen is locked, a menu is open) then qemu will hang until the
@@ -11,35 +19,30 @@ them in a conditional that can be set by the autobuilder environment, preserving
 the current grabbing behaviour for everyone else.
 
 Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Wed, 18 Sep 2013 14:04:54 +0100
-Subject: [PATCH] sdl.c: allow user to disable pointer grabs
-
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 Signed-off-by: Eric Bénard <eric@eukrea.com>
+
 ---
- ui/sdl.c | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
+ ui/sdl.c | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
 
-Index: qemu-2.11.1/ui/sdl.c
-===================================================================
---- qemu-2.11.1.orig/ui/sdl.c
-+++ qemu-2.11.1/ui/sdl.c
-@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
- static int scaling_active = 0;
- static Notifier mouse_mode_notifier;
- static int idle_counter;
+diff --git a/ui/sdl.c b/ui/sdl.c
+index a5fd503..ab8d1b1 100644
+--- a/ui/sdl.c
++++ b/ui/sdl.c
+@@ -68,6 +68,11 @@ static int idle_counter;
+ static const guint16 *keycode_map;
+ static size_t keycode_maplen;
+ 
 +#ifndef True
 +#define True 1
 +#endif
 +static doing_grabs = True;
- 
++
  #define SDL_REFRESH_INTERVAL_BUSY 10
  #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
-@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
+                             / SDL_REFRESH_INTERVAL_BUSY + 1)
+@@ -398,14 +403,16 @@ static void sdl_grab_start(void)
          }
      } else
          sdl_hide_cursor();
@@ -58,7 +61,7 @@ Index: qemu-2.11.1/ui/sdl.c
      gui_grab = 0;
      sdl_show_cursor();
      sdl_update_caption();
-@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
+@@ -945,6 +952,8 @@ static void sdl1_display_init(DisplayState *ds, DisplayOptions *o)
       * This requires SDL >= 1.2.14. */
      setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
  
diff --git a/meta/recipes-devtools/qemu/qemu/memfd.patch b/meta/recipes-devtools/qemu/qemu/memfd.patch
deleted file mode 100644
index 62e8d3800b..0000000000
--- a/meta/recipes-devtools/qemu/qemu/memfd.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001
-From: Paolo Bonzini <pbonzini@redhat.com>
-Date: Tue, 28 Nov 2017 11:51:27 +0100
-Subject: [PATCH] memfd: fix configure test
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Recent glibc added memfd_create in sys/mman.h.  This conflicts with
-the definition in util/memfd.c:
-
-    /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error: static declaration of memfd_create follows non-static declaration
-
-Fix the configure test, and remove the sys/memfd.h inclusion since the
-file actually does not exist---it is a typo in the memfd_create(2) man
-page.
-
-Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
-Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
----
- configure    | 2 +-
- util/memfd.c | 4 +---
- 2 files changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/configure b/configure
-index 9c8aa5a98b..99ccc1725a 100755
---- a/configure
-+++ b/configure
-@@ -3923,7 +3923,7 @@ fi
- # check if memfd is supported
- memfd=no
- cat > $TMPC << EOF
--#include <sys/memfd.h>
-+#include <sys/mman.h>
- 
- int main(void)
- {
-diff --git a/util/memfd.c b/util/memfd.c
-index 4571d1aba8..412e94a405 100644
---- a/util/memfd.c
-+++ b/util/memfd.c
-@@ -31,9 +31,7 @@
- 
- #include "qemu/memfd.h"
- 
--#ifdef CONFIG_MEMFD
--#include <sys/memfd.h>
--#elif defined CONFIG_LINUX
-+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
- #include <sys/syscall.h>
- #include <asm/unistd.h>
- 
--- 
-2.11.0
diff --git a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
index eb99d14639..360519f1a1 100644
--- a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
+++ b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
@@ -1,8 +1,19 @@
+From 6702ec74a7ba90b99efedde260c9f08b75d5516d Mon Sep 17 00:00:00 2001
+From: Stephen Arnold <sarnold@vctlabs.com>
+Date: Sun, 12 Jun 2016 18:09:56 -0700
+Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some environment
+
 Upstream-Status: Pending
 
+---
+ configure | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/configure b/configure
+index 69e05fb..12fc3d8 100755
 --- a/configure
 +++ b/configure
-@@ -4468,10 +4468,6 @@ fi
+@@ -5413,10 +5413,6 @@ write_c_skeleton
  if test "$gcov" = "yes" ; then
    CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
    LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
@@ -12,4 +23,4 @@ Upstream-Status: Pending
 -  CFLAGS="-O2 $CFLAGS"
  fi
  
- ##########################################
+ if test "$have_asan" = "yes"; then
diff --git a/meta/recipes-devtools/qemu/qemu_2.11.1.bb b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
similarity index 87%
rename from meta/recipes-devtools/qemu/qemu_2.11.1.bb
rename to meta/recipes-devtools/qemu/qemu_2.12.0.bb
index f4b7d69fca..63590fc9eb 100644
--- a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
@@ -20,8 +20,6 @@ SRC_URI = "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
            file://chardev-connect-socket-to-a-spawned-command.patch \
            file://apic-fixup-fallthrough-to-PIC.patch \
            file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
-           file://memfd.patch \
-           file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
 
@@ -31,8 +29,8 @@ SRC_URI_append_class-native = " \
             file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
             "
 
-SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
-SRC_URI[sha256sum] = "d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb"
+SRC_URI[md5sum] = "122fd7cdf241ff7eb1e42c0b503b5d1b"
+SRC_URI[sha256sum] = "c9f4a147bc915d24df9784affc611a115f42d24720a89210b479f1ba7a3f679c"
 
 COMPATIBLE_HOST_mipsarchn32 = "null"
 COMPATIBLE_HOST_mipsarchn64 = "null"
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 3/3] qemu: refresh patches with devtool
  2018-05-02 14:37 [PATCH 1/3] json-c: upgrade to 0.13.1 Martin Jansa
  2018-05-02 14:37 ` [PATCH 2/3] qemu: upgrade to 2.12.0 Martin Jansa
@ 2018-05-02 14:37 ` Martin Jansa
  2018-05-02 20:45   ` Alistair Francis
  1 sibling, 1 reply; 29+ messages in thread
From: Martin Jansa @ 2018-05-02 14:37 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 .../qemu/qemu/add-ptest-in-makefile-v10.patch | 13 ++++---
 .../qemu/apic-fixup-fallthrough-to-PIC.patch  | 15 ++++----
 ...pus.c-qemu_cpu_kick_thread_debugging.patch | 12 +++----
 ...x-libcap-header-issue-on-some-distro.patch | 16 +++++----
 ...webkitgtk-hangs-on-32-bit-x86-target.patch | 10 +++---
 .../qemu/qemu/no-valgrind.patch               | 19 ++++++++--
 .../qemu/qemu/pathlimit.patch                 | 35 ++++++++++++-------
 .../qemu/qemu-enlarge-env-entry-size.patch    | 18 +++++-----
 meta/recipes-devtools/qemu/qemu/wacom.patch   | 24 ++++++++-----
 9 files changed, 100 insertions(+), 62 deletions(-)

diff --git a/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch
index e9639820be..3337d1c7ba 100644
--- a/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch
+++ b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch
@@ -1,7 +1,8 @@
-From 4201a5791fc4798a45a9b9f881602d7bacb74ed1 Mon Sep 17 00:00:00 2001
+From 6c01c969def7adae70d7d59a40b5640454b97bdb Mon Sep 17 00:00:00 2001
 From: Juro Bystricky <juro.bystricky@intel.com>
 Date: Thu, 31 Aug 2017 11:06:56 -0700
-Subject: Add subpackage -ptest which runs all unit test cases for qemu.
+Subject: [PATCH] Add subpackage -ptest which runs all unit test cases for
+ qemu.
 
 Upstream-Status: Pending
 
@@ -9,11 +10,15 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
 
 Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
 
+---
+ tests/Makefile.include | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
 diff --git a/tests/Makefile.include b/tests/Makefile.include
-index f08b741..3d1b3e9 100644
+index 3b9a5e3..dfbcd72 100644
 --- a/tests/Makefile.include
 +++ b/tests/Makefile.include
-@@ -924,4 +924,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
+@@ -972,4 +972,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
  -include $(wildcard tests/*.d)
  -include $(wildcard tests/libqos/*.d)
  
diff --git a/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch b/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
index d6a3522eda..8ba507c9ff 100644
--- a/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
+++ b/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
@@ -1,7 +1,7 @@
-From bef93bb81588b5323a52d2e1886f2a77b64a976b Mon Sep 17 00:00:00 2001
+From ca247c6e7ab7a0bd7b94658a726940f10a6b0559 Mon Sep 17 00:00:00 2001
 From: Mark Asselstine <mark.asselstine@windriver.com>
 Date: Tue, 26 Feb 2013 11:43:28 -0500
-Subject: [PATCH 03/18] apic: fixup fallthrough to PIC
+Subject: [PATCH] apic: fixup fallthrough to PIC
 
 Commit 0e21e12bb311c4c1095d0269dc2ef81196ccb60a [Don't route PIC
 interrupts through the local APIC if the local APIC config says so.]
@@ -24,15 +24,16 @@ serviced, is -1.
 Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
 Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html]
 Signed-off-by: He Zhe <zhe.he@windriver.com>
+
 ---
  hw/intc/apic.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-Index: qemu-2.11.1/hw/intc/apic.c
-===================================================================
---- qemu-2.11.1.orig/hw/intc/apic.c
-+++ qemu-2.11.1/hw/intc/apic.c
-@@ -591,7 +591,7 @@ int apic_accept_pic_intr(DeviceState *de
+diff --git a/hw/intc/apic.c b/hw/intc/apic.c
+index 6fda52b..cd72919 100644
+--- a/hw/intc/apic.c
++++ b/hw/intc/apic.c
+@@ -603,7 +603,7 @@ int apic_accept_pic_intr(DeviceState *dev)
      APICCommonState *s = APIC(dev);
      uint32_t lvt0;
  
diff --git a/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch b/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch
index 6822132541..46c82a4aea 100644
--- a/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch
+++ b/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch
@@ -1,4 +1,4 @@
-From 697a834c35d19447b7dcdb9e1d9434bc6ce17c21 Mon Sep 17 00:00:00 2001
+From a2e3ad8e3bbdea20a4c53404674dd8ae46bd2528 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
 Date: Wed, 12 Aug 2015 15:11:30 -0500
 Subject: [PATCH] cpus.c: Add error messages when qemi_cpu_kick_thread fails.
@@ -12,6 +12,7 @@ current cpu information.
 
 Upstream-Status: Inappropriate
 Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+
 ---
  cpus.c         |  5 +++++
  custom_debug.h | 24 ++++++++++++++++++++++++
@@ -19,10 +20,10 @@ Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
  create mode 100644 custom_debug.h
 
 diff --git a/cpus.c b/cpus.c
-index a822ce3..7e4786e 100644
+index 38eba8b..b84a60a 100644
 --- a/cpus.c
 +++ b/cpus.c
-@@ -1080,6 +1080,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
+@@ -1690,6 +1690,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
      return NULL;
  }
  
@@ -31,7 +32,7 @@ index a822ce3..7e4786e 100644
  static void qemu_cpu_kick_thread(CPUState *cpu)
  {
  #ifndef _WIN32
-@@ -1088,6 +1090,9 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
+@@ -1702,6 +1704,9 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
      err = pthread_kill(cpu->thread->thread, SIG_IPI);
      if (err) {
          fprintf(stderr, "qemu:%s: %s", __func__, strerror(err));
@@ -71,6 +72,3 @@ index 0000000..f029e45
 +
 +	free(symbols);
 +}
--- 
-1.9.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch b/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
index cee6a676ab..a5ab6c5849 100644
--- a/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
+++ b/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
@@ -1,4 +1,7 @@
-fix libcap header issue on some distro
+From ebcb35fc87ca201ce7e5d01e82d677498bd96aea Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 12 Mar 2013 09:54:06 +0800
+Subject: [PATCH] fix libcap header issue on some distro
 
 1, When build qemu-native on SLED 11.2, there is an error:
 ...
@@ -51,14 +54,16 @@ http://patchwork.linuxtv.org/patch/12748/
 
 Upstream-Status: Pending
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
 ---
- fsdev/virtfs-proxy-helper.c |    7 +++++--
+ fsdev/virtfs-proxy-helper.c | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
+index 6f132c5..8329950 100644
 --- a/fsdev/virtfs-proxy-helper.c
 +++ b/fsdev/virtfs-proxy-helper.c
-@@ -12,7 +12,6 @@
+@@ -13,7 +13,6 @@
  #include <sys/resource.h>
  #include <getopt.h>
  #include <syslog.h>
@@ -66,7 +71,7 @@ diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
  #include <sys/fsuid.h>
  #include <sys/vfs.h>
  #include <sys/ioctl.h>
-@@ -26,7 +25,11 @@
+@@ -27,7 +26,11 @@
  #include "9p-iov-marshal.h"
  #include "hw/9pfs/9p-proxy.h"
  #include "fsdev/9p-iov-marshal.h"
@@ -79,6 +84,3 @@ diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
  #define PROGNAME "virtfs-proxy-helper"
  
  #ifndef XFS_SUPER_MAGIC
--- 
-1.7.10.4
-
diff --git a/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch b/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
index d2c52252f6..5dfd735268 100644
--- a/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
+++ b/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
@@ -1,4 +1,4 @@
-From 4fa4aae4176ef6d8f4d4b8323d061e2433918a26 Mon Sep 17 00:00:00 2001
+From a49987d386084515610fd40f0416a9b2f216842c Mon Sep 17 00:00:00 2001
 From: Alistair Francis <alistair.francis@xilinx.com>
 Date: Wed, 17 Jan 2018 10:51:49 -0800
 Subject: [PATCH] linux-user: Fix webkitgtk hangs on 32-bit x86 target
@@ -13,15 +13,16 @@ to what it was before the problematic commit.
 
 Upstream-Status: Submitted http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg04185.html
 Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
+
 ---
  linux-user/main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/linux-user/main.c b/linux-user/main.c
-index 450eb3ce65..c7cc0a184e 100644
+index 8907a84..ea42c43 100644
 --- a/linux-user/main.c
 +++ b/linux-user/main.c
-@@ -77,7 +77,7 @@ do {                                                                    \
+@@ -79,7 +79,7 @@ do {                                                                    \
        (TARGET_LONG_BITS == 32 || defined(TARGET_ABI32))
  /* There are a number of places where we assign reserved_va to a variable
     of type abi_ulong and expect it to fit.  Avoid the last page.  */
@@ -30,6 +31,3 @@ index 450eb3ce65..c7cc0a184e 100644
  #  else
  #   define MAX_RESERVED_VA  (1ul << TARGET_VIRT_ADDR_SPACE_BITS)
  #  endif
--- 
-2.14.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/no-valgrind.patch b/meta/recipes-devtools/qemu/qemu/no-valgrind.patch
index 91f728042d..80f9ed11a6 100644
--- a/meta/recipes-devtools/qemu/qemu/no-valgrind.patch
+++ b/meta/recipes-devtools/qemu/qemu/no-valgrind.patch
@@ -1,13 +1,25 @@
+From 4210013809605e1f3d2f4655a7f686cf103cea12 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Tue, 20 Oct 2015 22:19:08 +0100
+Subject: [PATCH] qemu: disable Valgrind
+
 There isn't an option to enable or disable valgrind support, so disable it to avoid non-deterministic builds.
 
 Upstream-Status: Inappropriate
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 
+---
+ configure | 9 ---------
+ 1 file changed, 9 deletions(-)
+
 diff --git a/configure b/configure
-index b3c4f51..4d3929e 100755
+index 0a19b03..69e05fb 100755
 --- a/configure
 +++ b/configure
-@@ -4193,9 +4192,0 @@ valgrind_h=no
+@@ -4895,15 +4895,6 @@ fi
+ # check if we have valgrind/valgrind.h
+ 
+ valgrind_h=no
 -cat > $TMPC << EOF
 -#include <valgrind/valgrind.h>
 -int main(void) {
@@ -17,3 +29,6 @@ index b3c4f51..4d3929e 100755
 -if compile_prog "" "" ; then
 -    valgrind_h=yes
 -fi
+ 
+ ########################################
+ # check if environ is declared
diff --git a/meta/recipes-devtools/qemu/qemu/pathlimit.patch b/meta/recipes-devtools/qemu/qemu/pathlimit.patch
index 57ab981c61..09e98f77b4 100644
--- a/meta/recipes-devtools/qemu/qemu/pathlimit.patch
+++ b/meta/recipes-devtools/qemu/qemu/pathlimit.patch
@@ -1,3 +1,8 @@
+From a99658f1bb4bc858f67bf7032e8fe9ddd46abe66 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Wed, 9 Mar 2016 22:49:02 +0000
+Subject: [PATCH] qemu: Limit paths searched during user mode emulation
+
 By default qemu builds a complete list of directories within the user
 emulation sysroot (-L option). The OE sysroot directory is large and
 this is confusing, for example it indexes all pkgdata. In particular this
@@ -8,18 +13,22 @@ things if/as/when it needs to. This drastically reduces the files it
 reads and reduces memory usage and cleans up strace.
 
 It would also avoid the infinite directory traversal bug in [YOCTO #6996]
-although the code could still be vulnerable if it parsed those specific 
+although the code could still be vulnerable if it parsed those specific
 paths.
 
 RP
 2016/3/9
 Upstream-Status: Pending
 
-Index: qemu-2.5.0/util/path.c
-===================================================================
---- qemu-2.5.0.orig/util/path.c
-+++ qemu-2.5.0/util/path.c
-@@ -19,6 +19,7 @@ struct pathelem
+---
+ util/path.c | 44 ++++++++++++++++++++++----------------------
+ 1 file changed, 22 insertions(+), 22 deletions(-)
+
+diff --git a/util/path.c b/util/path.c
+index 7f9fc27..a416cd4 100644
+--- a/util/path.c
++++ b/util/path.c
+@@ -15,6 +15,7 @@ struct pathelem
      char *name;
      /* Full path name, eg. /usr/gnemul/x86-linux/lib. */
      char *pathname;
@@ -27,7 +36,7 @@ Index: qemu-2.5.0/util/path.c
      struct pathelem *parent;
      /* Children */
      unsigned int num_entries;
-@@ -49,6 +50,7 @@ static struct pathelem *new_entry(const
+@@ -45,6 +46,7 @@ static struct pathelem *new_entry(const char *root,
      new->name = g_strdup(name);
      new->pathname = g_strdup_printf("%s/%s", root, name);
      new->num_entries = 0;
@@ -35,7 +44,7 @@ Index: qemu-2.5.0/util/path.c
      return new;
  }
  
-@@ -57,15 +59,16 @@ static struct pathelem *new_entry(const
+@@ -53,15 +55,16 @@ static struct pathelem *new_entry(const char *root,
  /* Not all systems provide this feature */
  #if defined(DT_DIR) && defined(DT_UNKNOWN) && defined(DT_LNK)
  # define dirent_type(dirent) ((dirent)->d_type)
@@ -55,7 +64,7 @@ Index: qemu-2.5.0/util/path.c
      DIR *dir;
  
      if ((dir = opendir(path->pathname)) != NULL) {
-@@ -78,6 +81,11 @@ static struct pathelem *add_dir_maybe(st
+@@ -74,6 +77,11 @@ static struct pathelem *add_dir_maybe(struct pathelem *path)
          }
          closedir(dir);
      }
@@ -67,7 +76,7 @@ Index: qemu-2.5.0/util/path.c
      return path;
  }
  
-@@ -93,26 +101,16 @@ static struct pathelem *add_entry(struct
+@@ -89,26 +97,16 @@ static struct pathelem *add_entry(struct pathelem *root, const char *name,
      e = &root->entries[root->num_entries-1];
  
      *e = new_entry(root->pathname, root, name);
@@ -97,7 +106,7 @@ Index: qemu-2.5.0/util/path.c
  {
      unsigned int i, namelen;
  
-@@ -123,14 +121,18 @@ follow_path(const struct pathelem *curso
+@@ -119,14 +117,18 @@ follow_path(const struct pathelem *cursor, const char *name)
          return cursor->pathname;
  
      if (strneq(name, namelen, ".."))
@@ -119,7 +128,7 @@ Index: qemu-2.5.0/util/path.c
  
      /* Not found */
      return NULL;
-@@ -164,8 +166,6 @@ void init_paths(const char *prefix)
+@@ -160,8 +162,6 @@ void init_paths(const char *prefix)
          g_free(base->name);
          g_free(base);
          base = NULL;
@@ -128,7 +137,7 @@ Index: qemu-2.5.0/util/path.c
      }
  }
  
-@@ -177,5 +177,5 @@ const char *path(const char *name)
+@@ -173,5 +173,5 @@ const char *path(const char *name)
      if (!base || !name || name[0] != '/')
          return name;
  
diff --git a/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch b/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch
index c7425ab8d4..dbe28c4c7f 100644
--- a/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch
+++ b/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch
@@ -1,4 +1,8 @@
-qemu: Add addition environment space to boot loader qemu-system-mips 
+From 3c1badb861c79f673503dd08c71b3c9c9ac2a8c0 Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Fri, 28 Mar 2014 17:42:43 +0800
+Subject: [PATCH] qemu: Add addition environment space to boot loader
+ qemu-system-mips
 
 Upstream-Status: Inappropriate - OE uses deep paths
 
@@ -9,15 +13,16 @@ to only 256 bytes. This patch expands the limit.
 
 Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
 Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
 ---
- hw/mips/mips_malta.c    |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ hw/mips/mips_malta.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
-index 9d521cc..17c0391 100644
+index f6513a4..d5efafb 100644
 --- a/hw/mips/mips_malta.c
 +++ b/hw/mips/mips_malta.c
-@@ -53,7 +53,7 @@
+@@ -62,7 +62,7 @@
  
  #define ENVP_ADDR		0x80002000l
  #define ENVP_NB_ENTRIES	 	16
@@ -26,6 +31,3 @@ index 9d521cc..17c0391 100644
  
  /* Hardware addresses */
  #define FLASH_ADDRESS 0x1e000000ULL
--- 
-1.7.10.4
-
diff --git a/meta/recipes-devtools/qemu/qemu/wacom.patch b/meta/recipes-devtools/qemu/qemu/wacom.patch
index cd06aa4ac6..90e4b800b5 100644
--- a/meta/recipes-devtools/qemu/qemu/wacom.patch
+++ b/meta/recipes-devtools/qemu/qemu/wacom.patch
@@ -1,19 +1,27 @@
+From 41603f745caaecdc7c9d760fb7d2df01ccc60128 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Thu, 27 Nov 2014 14:04:29 +0000
+Subject: [PATCH] qemu: Add missing wacom HID descriptor
+
 The USB wacom device is missing a HID descriptor which causes it
 to fail to operate with recent kernels (e.g. 3.17).
 
-This patch adds a HID desriptor to the device, based upon one from 
+This patch adds a HID desriptor to the device, based upon one from
 real wcom device.
 
 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
 
 Upstream-Status: Submitted
 2014/11/27
+---
+ hw/usb/dev-wacom.c | 94 +++++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 93 insertions(+), 1 deletion(-)
 
-Index: qemu-2.1.0/hw/usb/dev-wacom.c
-===================================================================
---- qemu-2.1.0.orig/hw/usb/dev-wacom.c	2014-08-01 15:12:17.000000000 +0100
-+++ qemu-2.1.0/hw/usb/dev-wacom.c	2014-10-12 12:13:30.540306042 +0100
-@@ -68,6 +68,89 @@
+diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c
+index bf70013059..2f6e129732 100644
+--- a/hw/usb/dev-wacom.c
++++ b/hw/usb/dev-wacom.c
+@@ -72,6 +72,89 @@ static const USBDescStrings desc_strings = {
      [STR_SERIALNUMBER]     = "1",
  };
  
@@ -103,7 +111,7 @@ Index: qemu-2.1.0/hw/usb/dev-wacom.c
  static const USBDescIface desc_iface_wacom = {
      .bInterfaceNumber              = 0,
      .bNumEndpoints                 = 1,
-@@ -85,7 +168,7 @@
+@@ -89,7 +172,7 @@ static const USBDescIface desc_iface_wacom = {
                  0x00,          /*  u8  country_code */
                  0x01,          /*  u8  num_descriptors */
                  0x22,          /*  u8  type: Report */
@@ -112,7 +120,7 @@ Index: qemu-2.1.0/hw/usb/dev-wacom.c
              },
          },
      },
-@@ -265,6 +350,15 @@
+@@ -269,6 +352,15 @@ static void usb_wacom_handle_control(USBDevice *dev, USBPacket *p,
      }
  
      switch (request) {
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* Re: [PATCH 2/3] qemu: upgrade to 2.12.0
  2018-05-02 14:37 ` [PATCH 2/3] qemu: upgrade to 2.12.0 Martin Jansa
@ 2018-05-02 20:44   ` Alistair Francis
  2018-05-09 15:38   ` Burton, Ross
  2018-05-18 21:58   ` [PATCH 2/3] qemu: upgrade to 2.12.0 Burton, Ross
  2 siblings, 0 replies; 29+ messages in thread
From: Alistair Francis @ 2018-05-02 20:44 UTC (permalink / raw)
  To: martin.jansa; +Cc: OE-core

On Wed, May 2, 2018 at 7:37 AM Martin Jansa <martin.jansa@gmail.com> wrote:

> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>

Looks good

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>   meta/conf/distro/include/tcmode-default.inc   |  2 +-
>   ...4-treat-DISAS_UPDATE-as-variant-of-D.patch | 67 -------------------
>   ...-connect-socket-to-a-spawned-command.patch | 52 +++++++-------
>   .../qemu/qemu/disable-grabs.patch             | 43 ++++++------
>   meta/recipes-devtools/qemu/qemu/memfd.patch   | 57 ----------------
>   .../qemu/qemu/qemu-2.5.0-cflags.patch         | 15 ++++-
>   .../qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}   |  6 +-
>   7 files changed, 65 insertions(+), 177 deletions(-)
>   delete mode 100644
meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>   delete mode 100644 meta/recipes-devtools/qemu/qemu/memfd.patch
>   rename meta/recipes-devtools/qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}
(87%)

> diff --git a/meta/conf/distro/include/tcmode-default.inc
b/meta/conf/distro/include/tcmode-default.inc
> index 00399ae820..8b5214ed96 100644
> --- a/meta/conf/distro/include/tcmode-default.inc
> +++ b/meta/conf/distro/include/tcmode-default.inc
> @@ -28,7 +28,7 @@ BINUVERSION ?= "2.30%"
>   GDBVERSION ?= "8.0%"
>   GLIBCVERSION ?= "2.27%"
>   LINUXLIBCVERSION ?= "4.15%"
> -QEMUVERSION ?= "2.11%"
> +QEMUVERSION ?= "2.12%"

>   PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
>   PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
> diff --git
a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
b/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
> deleted file mode 100644
> index f90cae694c..0000000000
> ---
a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
> +++ /dev/null
> @@ -1,67 +0,0 @@
> -From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00 2001
> -From: Victor Kamensky <kamensky@cisco.com>
> -Date: Fri, 23 Mar 2018 18:26:45 +0000
> -Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of
> - DISAS_EXIT
> -MIME-Version: 1.0
> -Content-Type: text/plain; charset=UTF-8
> -Content-Transfer-Encoding: 8bit
> -
> -In OE project 4.15 linux kernel boot hang was observed under
> -single cpu aarch64 qemu. Kernel code was in a loop waiting for
> -vtimer arrival, spinning in TC generated blocks, while interrupt
> -was pending unprocessed. This happened because when qemu tried to
> -handle vtimer interrupt target had interrupts disabled, as
> -result flag indicating TCG exit, cpu->icount_decr.u16.high,
> -was cleared but arm_cpu_exec_interrupt function did not call
> -arm_cpu_do_interrupt to process interrupt. Later when target
> -reenabled interrupts, it happened without exit into main loop, so
> -following code that waited for result of interrupt execution
> -run in infinite loop.
> -
> -To solve the problem instructions that operate on CPU sys state
> -(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
> -should be considered as DISAS_EXIT variant, and should be
> -forced to exit back to main loop so qemu will have a chance
> -processing pending CPU state updates, including pending
> -interrupts.
> -
> -This change brings consistency with how DISAS_UPDATE is treated
> -in aarch32 case.
> -
> -CC: Peter Maydell <peter.maydell@linaro.org>
> -CC: Alex Bennée <alex.bennee@linaro.org>
> -CC: qemu-stable@nongnu.org
> -Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> -Signed-off-by: Victor Kamensky <kamensky@cisco.com>
> -Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> -Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
> -Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> -Upstream-Status: Backport
> ----
> - target/arm/translate-a64.c | 6 +++---
> - 1 file changed, 3 insertions(+), 3 deletions(-)
> -
> -diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
> -index 31ff047..327513e 100644
> ---- a/target/arm/translate-a64.c
> -+++ b/target/arm/translate-a64.c
> -@@ -13378,12 +13378,12 @@ static void
aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
> -         case DISAS_UPDATE:
> -             gen_a64_set_pc_im(dc->pc);
> -             /* fall through */
> --        case DISAS_JUMP:
> --            tcg_gen_lookup_and_goto_ptr();
> --            break;
> -         case DISAS_EXIT:
> -             tcg_gen_exit_tb(0);
> -             break;
> -+        case DISAS_JUMP:
> -+            tcg_gen_lookup_and_goto_ptr();
> -+            break;
> -         case DISAS_NORETURN:
> -         case DISAS_SWI:
> -             break;
> ---
> -2.7.4
> -
> diff --git
a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> index 6e6bf95c18..f1cf53a8c5 100644
> ---
a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> +++
b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> @@ -1,4 +1,4 @@
> -From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00 2001
> +From a7690b02df70e0d3957e6eaa1e1cf92595839fbb Mon Sep 17 00:00:00 2001
>   From: Alistair Francis <alistair.francis@xilinx.com>
>   Date: Thu, 21 Dec 2017 11:35:16 -0800
>   Subject: [PATCH] chardev: connect socket to a spawned command
> @@ -45,16 +45,16 @@ Upstream-Status: Inappropriate [embedded specific]

>   Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
>   ---
> - chardev/char-socket.c | 86
++++++++++++++++++++++++++++++++++++++++++++++++---
> - chardev/char.c        |  3 ++
> - qapi/char.json        |  5 +++
> - 3 files changed, 90 insertions(+), 4 deletions(-)
> + chardev/char-socket.c | 102 ++++++++++++++++++++++++++++++++++++++++++
> + chardev/char.c        |   3 ++
> + qapi/char.json        |   5 +++
> + 3 files changed, 110 insertions(+)

>   diff --git a/chardev/char-socket.c b/chardev/char-socket.c
> -index 53eda8ef00..f566107c35 100644
> +index 159e69c3b1..84778cf31a 100644
>   --- a/chardev/char-socket.c
>   +++ b/chardev/char-socket.c
> -@@ -852,6 +852,68 @@ static gboolean socket_reconnect_timeout(gpointer
opaque)
> +@@ -934,6 +934,68 @@ static gboolean socket_reconnect_timeout(gpointer
opaque)
>        return false;
>    }

> @@ -123,7 +123,7 @@ index 53eda8ef00..f566107c35 100644
>    static void qmp_chardev_open_socket(Chardev *chr,
>                                        ChardevBackend *backend,
>                                        bool *be_opened,
> -@@ -859,6 +921,9 @@
> +@@ -941,6 +1003,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
>    {
>        SocketChardev *s = SOCKET_CHARDEV(chr);
>        ChardevSocket *sock = backend->u.socket.data;
> @@ -133,11 +133,10 @@ index 53eda8ef00..f566107c35 100644
>        bool do_nodelay     = sock->has_nodelay ? sock->nodelay : false;
>        bool is_listen      = sock->has_server  ? sock->server  : true;
>        bool is_telnet      = sock->has_telnet  ? sock->telnet  : false;
> -@@ -925,7 +990,14 @@
> -     } else if (reconnect > 0) {
> +@@ -1008,6 +1073,14 @@ static void qmp_chardev_open_socket(Chardev *chr,
>            s->reconnect_time = reconnect;
>        }
> --
> +
>   +#ifndef _WIN32
>   +    if (cmd) {
>   +        chardev_open_socket_cmd(chr, cmd, errp);
> @@ -146,12 +145,12 @@ index 53eda8ef00..f566107c35 100644
>   +        *be_opened = true;
>   +    } else
>   +#endif
> -     if (s->reconnect_time) {
> -         sioc = qio_channel_socket_new();
> -         tcp_chr_set_client_ioc_name(chr, sioc);
> -@@ -985,10 +1057,26 @@
> -     const char *host = qemu_opt_get(opts, "host");
> +     /* If reconnect_time is set, will do that in chr_machine_done. */
> +     if (!s->reconnect_time) {
> +         if (s->is_listen) {
> +@@ -1065,9 +1138,26 @@ static void qemu_chr_parse_socket(QemuOpts *opts,
ChardevBackend *backend,
>        const char *port = qemu_opt_get(opts, "port");
> +     const char *fd = qemu_opt_get(opts, "fd");
>        const char *tls_creds = qemu_opt_get(opts, "tls-creds");
>   +#ifndef _WIN32
>   +    const char *cmd = qemu_opt_get(opts, "cmd");
> @@ -159,7 +158,6 @@ index 53eda8ef00..f566107c35 100644
>        SocketAddressLegacy *addr;
>        ChardevSocket *sock;

> -     backend->type = CHARDEV_BACKEND_KIND_SOCKET;
>   +#ifndef _WIN32
>   +    if (cmd) {
>   +        /*
> @@ -173,17 +171,18 @@ index 53eda8ef00..f566107c35 100644
>   +        }
>   +    } else
>   +#endif
> -     if (!path) {
> -         if (!host) {
> -             error_setg(errp, "chardev: socket: no host given");
> -@@ -1021,13 +1109,24 @@
> -     sock->has_reconnect = true;
> ++
> +     if ((!!path + !!fd + !!host) != 1) {
> +         error_setg(errp,
> +                    "Exactly one of 'path', 'fd' or 'host' required");
> +@@ -1112,12 +1202,24 @@ static void qemu_chr_parse_socket(QemuOpts
*opts, ChardevBackend *backend,
>        sock->reconnect = reconnect;
>        sock->tls_creds = g_strdup(tls_creds);
> +
>   +#ifndef _WIN32
>   +    sock->cmd = g_strdup(cmd);
>   +#endif
> -
> ++
>        addr = g_new0(SocketAddressLegacy, 1);
>   +#ifndef _WIN32
>   +    if (path || cmd) {
> @@ -198,11 +197,11 @@ index 53eda8ef00..f566107c35 100644
>   +#else
>            q_unix->path = g_strdup(path);
>   +#endif
> -     } else {
> +     } else if (host) {
>            addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
>            addr->u.inet.data = g_new(InetSocketAddress, 1);
>   diff --git a/chardev/char.c b/chardev/char.c
> -index 2ae4f465ec..5d52cd5de5 100644
> +index 76d866e6fe..9747d51d7c 100644
>   --- a/chardev/char.c
>   +++ b/chardev/char.c
>   @@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
> @@ -239,4 +238,5 @@ index ae19dcd1ed..6de0f29bcd 100644
>                                         '*server'    : 'bool',
>                                         '*wait'      : 'bool',
>   --
> -2.14.1
> +2.17.0
> +
> diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> index 77117890f4..e29c011a6f 100644
> --- a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> +++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> @@ -1,3 +1,11 @@
> +From a31c5c695cb716310257f1fc60a06b821e74fe7f Mon Sep 17 00:00:00 2001
> +From: Ross Burton <ross.burton@intel.com>
> +Date: Wed, 18 Sep 2013 14:04:54 +0100
> +Subject: [PATCH] sdl.c: allow user to disable pointer grabs
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
>   When the pointer enters the Qemu window it calls SDL_WM_GrabInput, which
calls
>   XGrabPointer in a busyloop until it returns GrabSuccess. However if
there's already
>   a pointer grab (screen is locked, a menu is open) then qemu will hang
until the
> @@ -11,35 +19,30 @@ them in a conditional that can be set by the
autobuilder environment, preserving
>   the current grabbing behaviour for everyone else.

>   Upstream-Status: Pending
> -Signed-off-by: Ross Burton <ross.burton@intel.com>
> -
> -From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00 2001
> -From: Ross Burton <ross.burton@intel.com>
> -Date: Wed, 18 Sep 2013 14:04:54 +0100
> -Subject: [PATCH] sdl.c: allow user to disable pointer grabs
> -
>   Signed-off-by: Ross Burton <ross.burton@intel.com>
>   Signed-off-by: Eric Bénard <eric@eukrea.com>
> +
>   ---
> - ui/sdl.c | 12 ++++++++++--
> - 1 file changed, 10 insertions(+), 2 deletions(-)
> + ui/sdl.c | 13 +++++++++++--
> + 1 file changed, 11 insertions(+), 2 deletions(-)

> -Index: qemu-2.11.1/ui/sdl.c
> -===================================================================
> ---- qemu-2.11.1.orig/ui/sdl.c
> -+++ qemu-2.11.1/ui/sdl.c
> -@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
> - static int scaling_active = 0;
> - static Notifier mouse_mode_notifier;
> - static int idle_counter;
> +diff --git a/ui/sdl.c b/ui/sdl.c
> +index a5fd503..ab8d1b1 100644
> +--- a/ui/sdl.c
> ++++ b/ui/sdl.c
> +@@ -68,6 +68,11 @@ static int idle_counter;
> + static const guint16 *keycode_map;
> + static size_t keycode_maplen;
> +
>   +#ifndef True
>   +#define True 1
>   +#endif
>   +static doing_grabs = True;
> -
> ++
>    #define SDL_REFRESH_INTERVAL_BUSY 10
>    #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
> -@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
> +                             / SDL_REFRESH_INTERVAL_BUSY + 1)
> +@@ -398,14 +403,16 @@ static void sdl_grab_start(void)
>            }
>        } else
>            sdl_hide_cursor();
> @@ -58,7 +61,7 @@ Index: qemu-2.11.1/ui/sdl.c
>        gui_grab = 0;
>        sdl_show_cursor();
>        sdl_update_caption();
> -@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
> +@@ -945,6 +952,8 @@ static void sdl1_display_init(DisplayState *ds,
DisplayOptions *o)
>         * This requires SDL >= 1.2.14. */
>        setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);

> diff --git a/meta/recipes-devtools/qemu/qemu/memfd.patch
b/meta/recipes-devtools/qemu/qemu/memfd.patch
> deleted file mode 100644
> index 62e8d3800b..0000000000
> --- a/meta/recipes-devtools/qemu/qemu/memfd.patch
> +++ /dev/null
> @@ -1,57 +0,0 @@
> -Upstream-Status: Backport
> -Signed-off-by: Ross Burton <ross.burton@intel.com>
> -
> -From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001
> -From: Paolo Bonzini <pbonzini@redhat.com>
> -Date: Tue, 28 Nov 2017 11:51:27 +0100
> -Subject: [PATCH] memfd: fix configure test
> -MIME-Version: 1.0
> -Content-Type: text/plain; charset=UTF-8
> -Content-Transfer-Encoding: 8bit
> -
> -Recent glibc added memfd_create in sys/mman.h.  This conflicts with
> -the definition in util/memfd.c:
> -
> -    /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error:
static declaration of memfd_create follows non-static declaration
> -
> -Fix the configure test, and remove the sys/memfd.h inclusion since the
> -file actually does not exist---it is a typo in the memfd_create(2) man
> -page.
> -
> -Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> -Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ----
> - configure    | 2 +-
> - util/memfd.c | 4 +---
> - 2 files changed, 2 insertions(+), 4 deletions(-)
> -
> -diff --git a/configure b/configure
> -index 9c8aa5a98b..99ccc1725a 100755
> ---- a/configure
> -+++ b/configure
> -@@ -3923,7 +3923,7 @@ fi
> - # check if memfd is supported
> - memfd=no
> - cat > $TMPC << EOF
> --#include <sys/memfd.h>
> -+#include <sys/mman.h>
> -
> - int main(void)
> - {
> -diff --git a/util/memfd.c b/util/memfd.c
> -index 4571d1aba8..412e94a405 100644
> ---- a/util/memfd.c
> -+++ b/util/memfd.c
> -@@ -31,9 +31,7 @@
> -
> - #include "qemu/memfd.h"
> -
> --#ifdef CONFIG_MEMFD
> --#include <sys/memfd.h>
> --#elif defined CONFIG_LINUX
> -+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
> - #include <sys/syscall.h>
> - #include <asm/unistd.h>
> -
> ---
> -2.11.0
> diff --git a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> index eb99d14639..360519f1a1 100644
> --- a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> +++ b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> @@ -1,8 +1,19 @@
> +From 6702ec74a7ba90b99efedde260c9f08b75d5516d Mon Sep 17 00:00:00 2001
> +From: Stephen Arnold <sarnold@vctlabs.com>
> +Date: Sun, 12 Jun 2016 18:09:56 -0700
> +Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some
environment
> +
>   Upstream-Status: Pending

> +---
> + configure | 4 ----
> + 1 file changed, 4 deletions(-)
> +
> +diff --git a/configure b/configure
> +index 69e05fb..12fc3d8 100755
>   --- a/configure
>   +++ b/configure
> -@@ -4468,10 +4468,6 @@ fi
> +@@ -5413,10 +5413,6 @@ write_c_skeleton
>    if test "$gcov" = "yes" ; then
>      CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
>      LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
> @@ -12,4 +23,4 @@ Upstream-Status: Pending
>   -  CFLAGS="-O2 $CFLAGS"
>    fi

> - ##########################################
> + if test "$have_asan" = "yes"; then
> diff --git a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
> similarity index 87%
> rename from meta/recipes-devtools/qemu/qemu_2.11.1.bb
> rename to meta/recipes-devtools/qemu/qemu_2.12.0.bb
> index f4b7d69fca..63590fc9eb 100644
> --- a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
> +++ b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
> @@ -20,8 +20,6 @@ SRC_URI = "
http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
>              file://chardev-connect-socket-to-a-spawned-command.patch \
>              file://apic-fixup-fallthrough-to-PIC.patch \

file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
> -           file://memfd.patch \
> -
file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
>              "
>   UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"

> @@ -31,8 +29,8 @@ SRC_URI_append_class-native = " \
>               file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
>               "

> -SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
> -SRC_URI[sha256sum] =
"d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb"
> +SRC_URI[md5sum] = "122fd7cdf241ff7eb1e42c0b503b5d1b"
> +SRC_URI[sha256sum] =
"c9f4a147bc915d24df9784affc611a115f42d24720a89210b479f1ba7a3f679c"

>   COMPATIBLE_HOST_mipsarchn32 = "null"
>   COMPATIBLE_HOST_mipsarchn64 = "null"
> --
> 2.17.0

> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 3/3] qemu: refresh patches with devtool
  2018-05-02 14:37 ` [PATCH 3/3] qemu: refresh patches with devtool Martin Jansa
@ 2018-05-02 20:45   ` Alistair Francis
  0 siblings, 0 replies; 29+ messages in thread
From: Alistair Francis @ 2018-05-02 20:45 UTC (permalink / raw)
  To: martin.jansa; +Cc: OE-core

On Wed, May 2, 2018 at 7:38 AM Martin Jansa <martin.jansa@gmail.com> wrote:

> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>

Acked-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>   .../qemu/qemu/add-ptest-in-makefile-v10.patch | 13 ++++---
>   .../qemu/apic-fixup-fallthrough-to-PIC.patch  | 15 ++++----
>   ...pus.c-qemu_cpu_kick_thread_debugging.patch | 12 +++----
>   ...x-libcap-header-issue-on-some-distro.patch | 16 +++++----
>   ...webkitgtk-hangs-on-32-bit-x86-target.patch | 10 +++---
>   .../qemu/qemu/no-valgrind.patch               | 19 ++++++++--
>   .../qemu/qemu/pathlimit.patch                 | 35 ++++++++++++-------
>   .../qemu/qemu-enlarge-env-entry-size.patch    | 18 +++++-----
>   meta/recipes-devtools/qemu/qemu/wacom.patch   | 24 ++++++++-----
>   9 files changed, 100 insertions(+), 62 deletions(-)

> diff --git
a/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch
b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch
> index e9639820be..3337d1c7ba 100644
> --- a/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch
> +++ b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch
> @@ -1,7 +1,8 @@
> -From 4201a5791fc4798a45a9b9f881602d7bacb74ed1 Mon Sep 17 00:00:00 2001
> +From 6c01c969def7adae70d7d59a40b5640454b97bdb Mon Sep 17 00:00:00 2001
>   From: Juro Bystricky <juro.bystricky@intel.com>
>   Date: Thu, 31 Aug 2017 11:06:56 -0700
> -Subject: Add subpackage -ptest which runs all unit test cases for qemu.
> +Subject: [PATCH] Add subpackage -ptest which runs all unit test cases for
> + qemu.

>   Upstream-Status: Pending

> @@ -9,11 +10,15 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>

>   Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>

> +---
> + tests/Makefile.include | 8 ++++++++
> + 1 file changed, 8 insertions(+)
> +
>   diff --git a/tests/Makefile.include b/tests/Makefile.include
> -index f08b741..3d1b3e9 100644
> +index 3b9a5e3..dfbcd72 100644
>   --- a/tests/Makefile.include
>   +++ b/tests/Makefile.include
> -@@ -924,4 +924,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
> +@@ -972,4 +972,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
>    -include $(wildcard tests/*.d)
>    -include $(wildcard tests/libqos/*.d)

> diff --git
a/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
b/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
> index d6a3522eda..8ba507c9ff 100644
> --- a/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
> +++ b/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
> @@ -1,7 +1,7 @@
> -From bef93bb81588b5323a52d2e1886f2a77b64a976b Mon Sep 17 00:00:00 2001
> +From ca247c6e7ab7a0bd7b94658a726940f10a6b0559 Mon Sep 17 00:00:00 2001
>   From: Mark Asselstine <mark.asselstine@windriver.com>
>   Date: Tue, 26 Feb 2013 11:43:28 -0500
> -Subject: [PATCH 03/18] apic: fixup fallthrough to PIC
> +Subject: [PATCH] apic: fixup fallthrough to PIC

>   Commit 0e21e12bb311c4c1095d0269dc2ef81196ccb60a [Don't route PIC
>   interrupts through the local APIC if the local APIC config says so.]
> @@ -24,15 +24,16 @@ serviced, is -1.
>   Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
>   Upstream-Status: Submitted [
https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html]
>   Signed-off-by: He Zhe <zhe.he@windriver.com>
> +
>   ---
>    hw/intc/apic.c | 2 +-
>    1 file changed, 1 insertion(+), 1 deletion(-)

> -Index: qemu-2.11.1/hw/intc/apic.c
> -===================================================================
> ---- qemu-2.11.1.orig/hw/intc/apic.c
> -+++ qemu-2.11.1/hw/intc/apic.c
> -@@ -591,7 +591,7 @@ int apic_accept_pic_intr(DeviceState *de
> +diff --git a/hw/intc/apic.c b/hw/intc/apic.c
> +index 6fda52b..cd72919 100644
> +--- a/hw/intc/apic.c
> ++++ b/hw/intc/apic.c
> +@@ -603,7 +603,7 @@ int apic_accept_pic_intr(DeviceState *dev)
>        APICCommonState *s = APIC(dev);
>        uint32_t lvt0;

> diff --git
a/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch
b/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch
> index 6822132541..46c82a4aea 100644
> ---
a/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch
> +++
b/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch
> @@ -1,4 +1,4 @@
> -From 697a834c35d19447b7dcdb9e1d9434bc6ce17c21 Mon Sep 17 00:00:00 2001
> +From a2e3ad8e3bbdea20a4c53404674dd8ae46bd2528 Mon Sep 17 00:00:00 2001
>   From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
>   Date: Wed, 12 Aug 2015 15:11:30 -0500
>   Subject: [PATCH] cpus.c: Add error messages when qemi_cpu_kick_thread
fails.
> @@ -12,6 +12,7 @@ current cpu information.

>   Upstream-Status: Inappropriate
>   Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
> +
>   ---
>    cpus.c         |  5 +++++
>    custom_debug.h | 24 ++++++++++++++++++++++++
> @@ -19,10 +20,10 @@ Signed-off-by: Aníbal Limón <
anibal.limon@linux.intel.com>
>    create mode 100644 custom_debug.h

>   diff --git a/cpus.c b/cpus.c
> -index a822ce3..7e4786e 100644
> +index 38eba8b..b84a60a 100644
>   --- a/cpus.c
>   +++ b/cpus.c
> -@@ -1080,6 +1080,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
> +@@ -1690,6 +1690,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
>        return NULL;
>    }

> @@ -31,7 +32,7 @@ index a822ce3..7e4786e 100644
>    static void qemu_cpu_kick_thread(CPUState *cpu)
>    {
>    #ifndef _WIN32
> -@@ -1088,6 +1090,9 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
> +@@ -1702,6 +1704,9 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
>        err = pthread_kill(cpu->thread->thread, SIG_IPI);
>        if (err) {
>            fprintf(stderr, "qemu:%s: %s", __func__, strerror(err));
> @@ -71,6 +72,3 @@ index 0000000..f029e45
>   +
>   +      free(symbols);
>   +}
> ---
> -1.9.1
> -
> diff --git
a/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
b/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
> index cee6a676ab..a5ab6c5849 100644
> ---
a/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
> +++
b/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
> @@ -1,4 +1,7 @@
> -fix libcap header issue on some distro
> +From ebcb35fc87ca201ce7e5d01e82d677498bd96aea Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Tue, 12 Mar 2013 09:54:06 +0800
> +Subject: [PATCH] fix libcap header issue on some distro

>   1, When build qemu-native on SLED 11.2, there is an error:
>   ...
> @@ -51,14 +54,16 @@ http://patchwork.linuxtv.org/patch/12748/

>   Upstream-Status: Pending
>   Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +
>   ---
> - fsdev/virtfs-proxy-helper.c |    7 +++++--
> + fsdev/virtfs-proxy-helper.c | 7 +++++--
>    1 file changed, 5 insertions(+), 2 deletions(-)

>   diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
> +index 6f132c5..8329950 100644
>   --- a/fsdev/virtfs-proxy-helper.c
>   +++ b/fsdev/virtfs-proxy-helper.c
> -@@ -12,7 +12,6 @@
> +@@ -13,7 +13,6 @@
>    #include <sys/resource.h>
>    #include <getopt.h>
>    #include <syslog.h>
> @@ -66,7 +71,7 @@ diff --git a/fsdev/virtfs-proxy-helper.c
b/fsdev/virtfs-proxy-helper.c
>    #include <sys/fsuid.h>
>    #include <sys/vfs.h>
>    #include <sys/ioctl.h>
> -@@ -26,7 +25,11 @@
> +@@ -27,7 +26,11 @@
>    #include "9p-iov-marshal.h"
>    #include "hw/9pfs/9p-proxy.h"
>    #include "fsdev/9p-iov-marshal.h"
> @@ -79,6 +84,3 @@ diff --git a/fsdev/virtfs-proxy-helper.c
b/fsdev/virtfs-proxy-helper.c
>    #define PROGNAME "virtfs-proxy-helper"

>    #ifndef XFS_SUPER_MAGIC
> ---
> -1.7.10.4
> -
> diff --git
a/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
b/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
> index d2c52252f6..5dfd735268 100644
> ---
a/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
> +++
b/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
> @@ -1,4 +1,4 @@
> -From 4fa4aae4176ef6d8f4d4b8323d061e2433918a26 Mon Sep 17 00:00:00 2001
> +From a49987d386084515610fd40f0416a9b2f216842c Mon Sep 17 00:00:00 2001
>   From: Alistair Francis <alistair.francis@xilinx.com>
>   Date: Wed, 17 Jan 2018 10:51:49 -0800
>   Subject: [PATCH] linux-user: Fix webkitgtk hangs on 32-bit x86 target
> @@ -13,15 +13,16 @@ to what it was before the problematic commit.

>   Upstream-Status: Submitted
http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg04185.html
>   Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> +
>   ---
>    linux-user/main.c | 2 +-
>    1 file changed, 1 insertion(+), 1 deletion(-)

>   diff --git a/linux-user/main.c b/linux-user/main.c
> -index 450eb3ce65..c7cc0a184e 100644
> +index 8907a84..ea42c43 100644
>   --- a/linux-user/main.c
>   +++ b/linux-user/main.c
> -@@ -77,7 +77,7 @@ do {
                  \
> +@@ -79,7 +79,7 @@ do {
                  \
>          (TARGET_LONG_BITS == 32 || defined(TARGET_ABI32))
>    /* There are a number of places where we assign reserved_va to a
variable
>       of type abi_ulong and expect it to fit.  Avoid the last page.  */
> @@ -30,6 +31,3 @@ index 450eb3ce65..c7cc0a184e 100644
>    #  else
>    #   define MAX_RESERVED_VA  (1ul << TARGET_VIRT_ADDR_SPACE_BITS)
>    #  endif
> ---
> -2.14.1
> -
> diff --git a/meta/recipes-devtools/qemu/qemu/no-valgrind.patch
b/meta/recipes-devtools/qemu/qemu/no-valgrind.patch
> index 91f728042d..80f9ed11a6 100644
> --- a/meta/recipes-devtools/qemu/qemu/no-valgrind.patch
> +++ b/meta/recipes-devtools/qemu/qemu/no-valgrind.patch
> @@ -1,13 +1,25 @@
> +From 4210013809605e1f3d2f4655a7f686cf103cea12 Mon Sep 17 00:00:00 2001
> +From: Ross Burton <ross.burton@intel.com>
> +Date: Tue, 20 Oct 2015 22:19:08 +0100
> +Subject: [PATCH] qemu: disable Valgrind
> +
>   There isn't an option to enable or disable valgrind support, so disable
it to avoid non-deterministic builds.

>   Upstream-Status: Inappropriate
>   Signed-off-by: Ross Burton <ross.burton@intel.com>

> +---
> + configure | 9 ---------
> + 1 file changed, 9 deletions(-)
> +
>   diff --git a/configure b/configure
> -index b3c4f51..4d3929e 100755
> +index 0a19b03..69e05fb 100755
>   --- a/configure
>   +++ b/configure
> -@@ -4193,9 +4192,0 @@ valgrind_h=no
> +@@ -4895,15 +4895,6 @@ fi
> + # check if we have valgrind/valgrind.h
> +
> + valgrind_h=no
>   -cat > $TMPC << EOF
>   -#include <valgrind/valgrind.h>
>   -int main(void) {
> @@ -17,3 +29,6 @@ index b3c4f51..4d3929e 100755
>   -if compile_prog "" "" ; then
>   -    valgrind_h=yes
>   -fi
> +
> + ########################################
> + # check if environ is declared
> diff --git a/meta/recipes-devtools/qemu/qemu/pathlimit.patch
b/meta/recipes-devtools/qemu/qemu/pathlimit.patch
> index 57ab981c61..09e98f77b4 100644
> --- a/meta/recipes-devtools/qemu/qemu/pathlimit.patch
> +++ b/meta/recipes-devtools/qemu/qemu/pathlimit.patch
> @@ -1,3 +1,8 @@
> +From a99658f1bb4bc858f67bf7032e8fe9ddd46abe66 Mon Sep 17 00:00:00 2001
> +From: Richard Purdie <richard.purdie@linuxfoundation.org>
> +Date: Wed, 9 Mar 2016 22:49:02 +0000
> +Subject: [PATCH] qemu: Limit paths searched during user mode emulation
> +
>   By default qemu builds a complete list of directories within the user
>   emulation sysroot (-L option). The OE sysroot directory is large and
>   this is confusing, for example it indexes all pkgdata. In particular this
> @@ -8,18 +13,22 @@ things if/as/when it needs to. This drastically
reduces the files it
>   reads and reduces memory usage and cleans up strace.

>   It would also avoid the infinite directory traversal bug in [YOCTO #6996]
> -although the code could still be vulnerable if it parsed those specific
> +although the code could still be vulnerable if it parsed those specific
>   paths.

>   RP
>   2016/3/9
>   Upstream-Status: Pending

> -Index: qemu-2.5.0/util/path.c
> -===================================================================
> ---- qemu-2.5.0.orig/util/path.c
> -+++ qemu-2.5.0/util/path.c
> -@@ -19,6 +19,7 @@ struct pathelem
> +---
> + util/path.c | 44 ++++++++++++++++++++++----------------------
> + 1 file changed, 22 insertions(+), 22 deletions(-)
> +
> +diff --git a/util/path.c b/util/path.c
> +index 7f9fc27..a416cd4 100644
> +--- a/util/path.c
> ++++ b/util/path.c
> +@@ -15,6 +15,7 @@ struct pathelem
>        char *name;
>        /* Full path name, eg. /usr/gnemul/x86-linux/lib. */
>        char *pathname;
> @@ -27,7 +36,7 @@ Index: qemu-2.5.0/util/path.c
>        struct pathelem *parent;
>        /* Children */
>        unsigned int num_entries;
> -@@ -49,6 +50,7 @@ static struct pathelem *new_entry(const
> +@@ -45,6 +46,7 @@ static struct pathelem *new_entry(const char *root,
>        new->name = g_strdup(name);
>        new->pathname = g_strdup_printf("%s/%s", root, name);
>        new->num_entries = 0;
> @@ -35,7 +44,7 @@ Index: qemu-2.5.0/util/path.c
>        return new;
>    }

> -@@ -57,15 +59,16 @@ static struct pathelem *new_entry(const
> +@@ -53,15 +55,16 @@ static struct pathelem *new_entry(const char *root,
>    /* Not all systems provide this feature */
>    #if defined(DT_DIR) && defined(DT_UNKNOWN) && defined(DT_LNK)
>    # define dirent_type(dirent) ((dirent)->d_type)
> @@ -55,7 +64,7 @@ Index: qemu-2.5.0/util/path.c
>        DIR *dir;

>        if ((dir = opendir(path->pathname)) != NULL) {
> -@@ -78,6 +81,11 @@ static struct pathelem *add_dir_maybe(st
> +@@ -74,6 +77,11 @@ static struct pathelem *add_dir_maybe(struct pathelem
*path)
>            }
>            closedir(dir);
>        }
> @@ -67,7 +76,7 @@ Index: qemu-2.5.0/util/path.c
>        return path;
>    }

> -@@ -93,26 +101,16 @@ static struct pathelem *add_entry(struct
> +@@ -89,26 +97,16 @@ static struct pathelem *add_entry(struct pathelem
*root, const char *name,
>        e = &root->entries[root->num_entries-1];

>        *e = new_entry(root->pathname, root, name);
> @@ -97,7 +106,7 @@ Index: qemu-2.5.0/util/path.c
>    {
>        unsigned int i, namelen;

> -@@ -123,14 +121,18 @@ follow_path(const struct pathelem *curso
> +@@ -119,14 +117,18 @@ follow_path(const struct pathelem *cursor, const
char *name)
>            return cursor->pathname;

>        if (strneq(name, namelen, ".."))
> @@ -119,7 +128,7 @@ Index: qemu-2.5.0/util/path.c

>        /* Not found */
>        return NULL;
> -@@ -164,8 +166,6 @@ void init_paths(const char *prefix)
> +@@ -160,8 +162,6 @@ void init_paths(const char *prefix)
>            g_free(base->name);
>            g_free(base);
>            base = NULL;
> @@ -128,7 +137,7 @@ Index: qemu-2.5.0/util/path.c
>        }
>    }

> -@@ -177,5 +177,5 @@ const char *path(const char *name)
> +@@ -173,5 +173,5 @@ const char *path(const char *name)
>        if (!base || !name || name[0] != '/')
>            return name;

> diff --git
a/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch
b/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch
> index c7425ab8d4..dbe28c4c7f 100644
> --- a/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch
> +++ b/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch
> @@ -1,4 +1,8 @@
> -qemu: Add addition environment space to boot loader qemu-system-mips
> +From 3c1badb861c79f673503dd08c71b3c9c9ac2a8c0 Mon Sep 17 00:00:00 2001
> +From: Jason Wessel <jason.wessel@windriver.com>
> +Date: Fri, 28 Mar 2014 17:42:43 +0800
> +Subject: [PATCH] qemu: Add addition environment space to boot loader
> + qemu-system-mips

>   Upstream-Status: Inappropriate - OE uses deep paths

> @@ -9,15 +13,16 @@ to only 256 bytes. This patch expands the limit.

>   Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
>   Signed-off-by: Roy Li <rongqing.li@windriver.com>
> +
>   ---
> - hw/mips/mips_malta.c    |    2 +-
> - 1 files changed, 1 insertions(+), 1 deletions(-)
> + hw/mips/mips_malta.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)

>   diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
> -index 9d521cc..17c0391 100644
> +index f6513a4..d5efafb 100644
>   --- a/hw/mips/mips_malta.c
>   +++ b/hw/mips/mips_malta.c
> -@@ -53,7 +53,7 @@
> +@@ -62,7 +62,7 @@

>    #define ENVP_ADDR             0x80002000l
>    #define ENVP_NB_ENTRIES               16
> @@ -26,6 +31,3 @@ index 9d521cc..17c0391 100644

>    /* Hardware addresses */
>    #define FLASH_ADDRESS 0x1e000000ULL
> ---
> -1.7.10.4
> -
> diff --git a/meta/recipes-devtools/qemu/qemu/wacom.patch
b/meta/recipes-devtools/qemu/qemu/wacom.patch
> index cd06aa4ac6..90e4b800b5 100644
> --- a/meta/recipes-devtools/qemu/qemu/wacom.patch
> +++ b/meta/recipes-devtools/qemu/qemu/wacom.patch
> @@ -1,19 +1,27 @@
> +From 41603f745caaecdc7c9d760fb7d2df01ccc60128 Mon Sep 17 00:00:00 2001
> +From: Richard Purdie <richard.purdie@linuxfoundation.org>
> +Date: Thu, 27 Nov 2014 14:04:29 +0000
> +Subject: [PATCH] qemu: Add missing wacom HID descriptor
> +
>   The USB wacom device is missing a HID descriptor which causes it
>   to fail to operate with recent kernels (e.g. 3.17).

> -This patch adds a HID desriptor to the device, based upon one from
> +This patch adds a HID desriptor to the device, based upon one from
>   real wcom device.

>   Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

>   Upstream-Status: Submitted
>   2014/11/27
> +---
> + hw/usb/dev-wacom.c | 94 +++++++++++++++++++++++++++++++++++++++++++++-
> + 1 file changed, 93 insertions(+), 1 deletion(-)

> -Index: qemu-2.1.0/hw/usb/dev-wacom.c
> -===================================================================
> ---- qemu-2.1.0.orig/hw/usb/dev-wacom.c 2014-08-01 15:12:17.000000000
+0100
> -+++ qemu-2.1.0/hw/usb/dev-wacom.c      2014-10-12 12:13:30.540306042
+0100
> -@@ -68,6 +68,89 @@
> +diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c
> +index bf70013059..2f6e129732 100644
> +--- a/hw/usb/dev-wacom.c
> ++++ b/hw/usb/dev-wacom.c
> +@@ -72,6 +72,89 @@ static const USBDescStrings desc_strings = {
>        [STR_SERIALNUMBER]     = "1",
>    };

> @@ -103,7 +111,7 @@ Index: qemu-2.1.0/hw/usb/dev-wacom.c
>    static const USBDescIface desc_iface_wacom = {
>        .bInterfaceNumber              = 0,
>        .bNumEndpoints                 = 1,
> -@@ -85,7 +168,7 @@
> +@@ -89,7 +172,7 @@ static const USBDescIface desc_iface_wacom = {
>                    0x00,          /*  u8  country_code */
>                    0x01,          /*  u8  num_descriptors */
>                    0x22,          /*  u8  type: Report */
> @@ -112,7 +120,7 @@ Index: qemu-2.1.0/hw/usb/dev-wacom.c
>                },
>            },
>        },
> -@@ -265,6 +350,15 @@
> +@@ -269,6 +352,15 @@ static void usb_wacom_handle_control(USBDevice
*dev, USBPacket *p,
>        }

>        switch (request) {
> --
> 2.17.0

> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 2/3] qemu: upgrade to 2.12.0
  2018-05-02 14:37 ` [PATCH 2/3] qemu: upgrade to 2.12.0 Martin Jansa
  2018-05-02 20:44   ` Alistair Francis
@ 2018-05-09 15:38   ` Burton, Ross
  2018-05-10 21:32     ` Alistair Francis
  2018-05-11 19:20     ` [PATCHv2 1/5] libsdl2: allow to build native and nativesdk Martin Jansa
  2018-05-18 21:58   ` [PATCH 2/3] qemu: upgrade to 2.12.0 Burton, Ross
  2 siblings, 2 replies; 29+ messages in thread
From: Burton, Ross @ 2018-05-09 15:38 UTC (permalink / raw)
  To: Martin Jansa; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 18493 bytes --]

This fails if x11 isn't in DISTRO_FEATURES but SDL is enabled as ui/sdl.c
-> ui/x_keymap.h -> Xlib.h.  I guess the best solution here would be to
guard sdl in the default PACKAGECONFIG with x11 DISTRO_FEATURE checks, and
explicitly depend on libx11.

As discussed on IRC we should probably also move to libsdl2 as libsdl 1.2
is 'historic' now.

Ross

On 2 May 2018 at 15:37, Martin Jansa <martin.jansa@gmail.com> wrote:

> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta/conf/distro/include/tcmode-default.inc   |  2 +-
>  ...4-treat-DISAS_UPDATE-as-variant-of-D.patch | 67 -------------------
>  ...-connect-socket-to-a-spawned-command.patch | 52 +++++++-------
>  .../qemu/qemu/disable-grabs.patch             | 43 ++++++------
>  meta/recipes-devtools/qemu/qemu/memfd.patch   | 57 ----------------
>  .../qemu/qemu/qemu-2.5.0-cflags.patch         | 15 ++++-
>  .../qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}   |  6 +-
>  7 files changed, 65 insertions(+), 177 deletions(-)
>  delete mode 100644 meta/recipes-devtools/qemu/
> qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>  delete mode 100644 meta/recipes-devtools/qemu/qemu/memfd.patch
>  rename meta/recipes-devtools/qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}
> (87%)
>
> diff --git a/meta/conf/distro/include/tcmode-default.inc
> b/meta/conf/distro/include/tcmode-default.inc
> index 00399ae820..8b5214ed96 100644
> --- a/meta/conf/distro/include/tcmode-default.inc
> +++ b/meta/conf/distro/include/tcmode-default.inc
> @@ -28,7 +28,7 @@ BINUVERSION ?= "2.30%"
>  GDBVERSION ?= "8.0%"
>  GLIBCVERSION ?= "2.27%"
>  LINUXLIBCVERSION ?= "4.15%"
> -QEMUVERSION ?= "2.11%"
> +QEMUVERSION ?= "2.12%"
>
>  PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
>  PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
> diff --git a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-
> treat-DISAS_UPDATE-as-variant-of-D.patch b/meta/recipes-devtools/qemu/
> qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
> deleted file mode 100644
> index f90cae694c..0000000000
> --- a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-
> treat-DISAS_UPDATE-as-variant-of-D.patch
> +++ /dev/null
> @@ -1,67 +0,0 @@
> -From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00 2001
> -From: Victor Kamensky <kamensky@cisco.com>
> -Date: Fri, 23 Mar 2018 18:26:45 +0000
> -Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of
> - DISAS_EXIT
> -MIME-Version: 1.0
> -Content-Type: text/plain; charset=UTF-8
> -Content-Transfer-Encoding: 8bit
> -
> -In OE project 4.15 linux kernel boot hang was observed under
> -single cpu aarch64 qemu. Kernel code was in a loop waiting for
> -vtimer arrival, spinning in TC generated blocks, while interrupt
> -was pending unprocessed. This happened because when qemu tried to
> -handle vtimer interrupt target had interrupts disabled, as
> -result flag indicating TCG exit, cpu->icount_decr.u16.high,
> -was cleared but arm_cpu_exec_interrupt function did not call
> -arm_cpu_do_interrupt to process interrupt. Later when target
> -reenabled interrupts, it happened without exit into main loop, so
> -following code that waited for result of interrupt execution
> -run in infinite loop.
> -
> -To solve the problem instructions that operate on CPU sys state
> -(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
> -should be considered as DISAS_EXIT variant, and should be
> -forced to exit back to main loop so qemu will have a chance
> -processing pending CPU state updates, including pending
> -interrupts.
> -
> -This change brings consistency with how DISAS_UPDATE is treated
> -in aarch32 case.
> -
> -CC: Peter Maydell <peter.maydell@linaro.org>
> -CC: Alex Bennée <alex.bennee@linaro.org>
> -CC: qemu-stable@nongnu.org
> -Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> -Signed-off-by: Victor Kamensky <kamensky@cisco.com>
> -Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> -Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
> -Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> -Upstream-Status: Backport
> ----
> - target/arm/translate-a64.c | 6 +++---
> - 1 file changed, 3 insertions(+), 3 deletions(-)
> -
> -diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
> -index 31ff047..327513e 100644
> ---- a/target/arm/translate-a64.c
> -+++ b/target/arm/translate-a64.c
> -@@ -13378,12 +13378,12 @@ static void aarch64_tr_tb_stop(DisasContextBase
> *dcbase, CPUState *cpu)
> -         case DISAS_UPDATE:
> -             gen_a64_set_pc_im(dc->pc);
> -             /* fall through */
> --        case DISAS_JUMP:
> --            tcg_gen_lookup_and_goto_ptr();
> --            break;
> -         case DISAS_EXIT:
> -             tcg_gen_exit_tb(0);
> -             break;
> -+        case DISAS_JUMP:
> -+            tcg_gen_lookup_and_goto_ptr();
> -+            break;
> -         case DISAS_NORETURN:
> -         case DISAS_SWI:
> -             break;
> ---
> -2.7.4
> -
> diff --git a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-
> to-a-spawned-command.patch
> index 6e6bf95c18..f1cf53a8c5 100644
> --- a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-
> to-a-spawned-command.patch
> +++ b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-
> to-a-spawned-command.patch
> @@ -1,4 +1,4 @@
> -From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00 2001
> +From a7690b02df70e0d3957e6eaa1e1cf92595839fbb Mon Sep 17 00:00:00 2001
>  From: Alistair Francis <alistair.francis@xilinx.com>
>  Date: Thu, 21 Dec 2017 11:35:16 -0800
>  Subject: [PATCH] chardev: connect socket to a spawned command
> @@ -45,16 +45,16 @@ Upstream-Status: Inappropriate [embedded specific]
>
>  Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
>  ---
> - chardev/char-socket.c | 86 ++++++++++++++++++++++++++++++
> ++++++++++++++++++---
> - chardev/char.c        |  3 ++
> - qapi/char.json        |  5 +++
> - 3 files changed, 90 insertions(+), 4 deletions(-)
> + chardev/char-socket.c | 102 ++++++++++++++++++++++++++++++++++++++++++
> + chardev/char.c        |   3 ++
> + qapi/char.json        |   5 +++
> + 3 files changed, 110 insertions(+)
>
>  diff --git a/chardev/char-socket.c b/chardev/char-socket.c
> -index 53eda8ef00..f566107c35 100644
> +index 159e69c3b1..84778cf31a 100644
>  --- a/chardev/char-socket.c
>  +++ b/chardev/char-socket.c
> -@@ -852,6 +852,68 @@ static gboolean socket_reconnect_timeout(gpointer
> opaque)
> +@@ -934,6 +934,68 @@ static gboolean socket_reconnect_timeout(gpointer
> opaque)
>       return false;
>   }
>
> @@ -123,7 +123,7 @@ index 53eda8ef00..f566107c35 100644
>   static void qmp_chardev_open_socket(Chardev *chr,
>                                       ChardevBackend *backend,
>                                       bool *be_opened,
> -@@ -859,6 +921,9 @@
> +@@ -941,6 +1003,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
>   {
>       SocketChardev *s = SOCKET_CHARDEV(chr);
>       ChardevSocket *sock = backend->u.socket.data;
> @@ -133,11 +133,10 @@ index 53eda8ef00..f566107c35 100644
>       bool do_nodelay     = sock->has_nodelay ? sock->nodelay : false;
>       bool is_listen      = sock->has_server  ? sock->server  : true;
>       bool is_telnet      = sock->has_telnet  ? sock->telnet  : false;
> -@@ -925,7 +990,14 @@
> -     } else if (reconnect > 0) {
> +@@ -1008,6 +1073,14 @@ static void qmp_chardev_open_socket(Chardev *chr,
>           s->reconnect_time = reconnect;
>       }
> --
> +
>  +#ifndef _WIN32
>  +    if (cmd) {
>  +        chardev_open_socket_cmd(chr, cmd, errp);
> @@ -146,12 +145,12 @@ index 53eda8ef00..f566107c35 100644
>  +        *be_opened = true;
>  +    } else
>  +#endif
> -     if (s->reconnect_time) {
> -         sioc = qio_channel_socket_new();
> -         tcp_chr_set_client_ioc_name(chr, sioc);
> -@@ -985,10 +1057,26 @@
> -     const char *host = qemu_opt_get(opts, "host");
> +     /* If reconnect_time is set, will do that in chr_machine_done. */
> +     if (!s->reconnect_time) {
> +         if (s->is_listen) {
> +@@ -1065,9 +1138,26 @@ static void qemu_chr_parse_socket(QemuOpts *opts,
> ChardevBackend *backend,
>       const char *port = qemu_opt_get(opts, "port");
> +     const char *fd = qemu_opt_get(opts, "fd");
>       const char *tls_creds = qemu_opt_get(opts, "tls-creds");
>  +#ifndef _WIN32
>  +    const char *cmd = qemu_opt_get(opts, "cmd");
> @@ -159,7 +158,6 @@ index 53eda8ef00..f566107c35 100644
>       SocketAddressLegacy *addr;
>       ChardevSocket *sock;
>
> -     backend->type = CHARDEV_BACKEND_KIND_SOCKET;
>  +#ifndef _WIN32
>  +    if (cmd) {
>  +        /*
> @@ -173,17 +171,18 @@ index 53eda8ef00..f566107c35 100644
>  +        }
>  +    } else
>  +#endif
> -     if (!path) {
> -         if (!host) {
> -             error_setg(errp, "chardev: socket: no host given");
> -@@ -1021,13 +1109,24 @@
> -     sock->has_reconnect = true;
> ++
> +     if ((!!path + !!fd + !!host) != 1) {
> +         error_setg(errp,
> +                    "Exactly one of 'path', 'fd' or 'host' required");
> +@@ -1112,12 +1202,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts,
> ChardevBackend *backend,
>       sock->reconnect = reconnect;
>       sock->tls_creds = g_strdup(tls_creds);
> +
>  +#ifndef _WIN32
>  +    sock->cmd = g_strdup(cmd);
>  +#endif
> -
> ++
>       addr = g_new0(SocketAddressLegacy, 1);
>  +#ifndef _WIN32
>  +    if (path || cmd) {
> @@ -198,11 +197,11 @@ index 53eda8ef00..f566107c35 100644
>  +#else
>           q_unix->path = g_strdup(path);
>  +#endif
> -     } else {
> +     } else if (host) {
>           addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
>           addr->u.inet.data = g_new(InetSocketAddress, 1);
>  diff --git a/chardev/char.c b/chardev/char.c
> -index 2ae4f465ec..5d52cd5de5 100644
> +index 76d866e6fe..9747d51d7c 100644
>  --- a/chardev/char.c
>  +++ b/chardev/char.c
>  @@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
> @@ -239,4 +238,5 @@ index ae19dcd1ed..6de0f29bcd 100644
>                                        '*server'    : 'bool',
>                                        '*wait'      : 'bool',
>  --
> -2.14.1
> +2.17.0
> +
> diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> index 77117890f4..e29c011a6f 100644
> --- a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> +++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> @@ -1,3 +1,11 @@
> +From a31c5c695cb716310257f1fc60a06b821e74fe7f Mon Sep 17 00:00:00 2001
> +From: Ross Burton <ross.burton@intel.com>
> +Date: Wed, 18 Sep 2013 14:04:54 +0100
> +Subject: [PATCH] sdl.c: allow user to disable pointer grabs
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
>  When the pointer enters the Qemu window it calls SDL_WM_GrabInput, which
> calls
>  XGrabPointer in a busyloop until it returns GrabSuccess. However if
> there's already
>  a pointer grab (screen is locked, a menu is open) then qemu will hang
> until the
> @@ -11,35 +19,30 @@ them in a conditional that can be set by the
> autobuilder environment, preserving
>  the current grabbing behaviour for everyone else.
>
>  Upstream-Status: Pending
> -Signed-off-by: Ross Burton <ross.burton@intel.com>
> -
> -From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00 2001
> -From: Ross Burton <ross.burton@intel.com>
> -Date: Wed, 18 Sep 2013 14:04:54 +0100
> -Subject: [PATCH] sdl.c: allow user to disable pointer grabs
> -
>  Signed-off-by: Ross Burton <ross.burton@intel.com>
>  Signed-off-by: Eric Bénard <eric@eukrea.com>
> +
>  ---
> - ui/sdl.c | 12 ++++++++++--
> - 1 file changed, 10 insertions(+), 2 deletions(-)
> + ui/sdl.c | 13 +++++++++++--
> + 1 file changed, 11 insertions(+), 2 deletions(-)
>
> -Index: qemu-2.11.1/ui/sdl.c
> -===================================================================
> ---- qemu-2.11.1.orig/ui/sdl.c
> -+++ qemu-2.11.1/ui/sdl.c
> -@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
> - static int scaling_active = 0;
> - static Notifier mouse_mode_notifier;
> - static int idle_counter;
> +diff --git a/ui/sdl.c b/ui/sdl.c
> +index a5fd503..ab8d1b1 100644
> +--- a/ui/sdl.c
> ++++ b/ui/sdl.c
> +@@ -68,6 +68,11 @@ static int idle_counter;
> + static const guint16 *keycode_map;
> + static size_t keycode_maplen;
> +
>  +#ifndef True
>  +#define True 1
>  +#endif
>  +static doing_grabs = True;
> -
> ++
>   #define SDL_REFRESH_INTERVAL_BUSY 10
>   #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
> -@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
> +                             / SDL_REFRESH_INTERVAL_BUSY + 1)
> +@@ -398,14 +403,16 @@ static void sdl_grab_start(void)
>           }
>       } else
>           sdl_hide_cursor();
> @@ -58,7 +61,7 @@ Index: qemu-2.11.1/ui/sdl.c
>       gui_grab = 0;
>       sdl_show_cursor();
>       sdl_update_caption();
> -@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
> +@@ -945,6 +952,8 @@ static void sdl1_display_init(DisplayState *ds,
> DisplayOptions *o)
>        * This requires SDL >= 1.2.14. */
>       setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
>
> diff --git a/meta/recipes-devtools/qemu/qemu/memfd.patch
> b/meta/recipes-devtools/qemu/qemu/memfd.patch
> deleted file mode 100644
> index 62e8d3800b..0000000000
> --- a/meta/recipes-devtools/qemu/qemu/memfd.patch
> +++ /dev/null
> @@ -1,57 +0,0 @@
> -Upstream-Status: Backport
> -Signed-off-by: Ross Burton <ross.burton@intel.com>
> -
> -From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001
> -From: Paolo Bonzini <pbonzini@redhat.com>
> -Date: Tue, 28 Nov 2017 11:51:27 +0100
> -Subject: [PATCH] memfd: fix configure test
> -MIME-Version: 1.0
> -Content-Type: text/plain; charset=UTF-8
> -Content-Transfer-Encoding: 8bit
> -
> -Recent glibc added memfd_create in sys/mman.h.  This conflicts with
> -the definition in util/memfd.c:
> -
> -    /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error:
> static declaration of memfd_create follows non-static declaration
> -
> -Fix the configure test, and remove the sys/memfd.h inclusion since the
> -file actually does not exist---it is a typo in the memfd_create(2) man
> -page.
> -
> -Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> -Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ----
> - configure    | 2 +-
> - util/memfd.c | 4 +---
> - 2 files changed, 2 insertions(+), 4 deletions(-)
> -
> -diff --git a/configure b/configure
> -index 9c8aa5a98b..99ccc1725a 100755
> ---- a/configure
> -+++ b/configure
> -@@ -3923,7 +3923,7 @@ fi
> - # check if memfd is supported
> - memfd=no
> - cat > $TMPC << EOF
> --#include <sys/memfd.h>
> -+#include <sys/mman.h>
> -
> - int main(void)
> - {
> -diff --git a/util/memfd.c b/util/memfd.c
> -index 4571d1aba8..412e94a405 100644
> ---- a/util/memfd.c
> -+++ b/util/memfd.c
> -@@ -31,9 +31,7 @@
> -
> - #include "qemu/memfd.h"
> -
> --#ifdef CONFIG_MEMFD
> --#include <sys/memfd.h>
> --#elif defined CONFIG_LINUX
> -+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
> - #include <sys/syscall.h>
> - #include <asm/unistd.h>
> -
> ---
> -2.11.0
> diff --git a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> index eb99d14639..360519f1a1 100644
> --- a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> +++ b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> @@ -1,8 +1,19 @@
> +From 6702ec74a7ba90b99efedde260c9f08b75d5516d Mon Sep 17 00:00:00 2001
> +From: Stephen Arnold <sarnold@vctlabs.com>
> +Date: Sun, 12 Jun 2016 18:09:56 -0700
> +Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some
> environment
> +
>  Upstream-Status: Pending
>
> +---
> + configure | 4 ----
> + 1 file changed, 4 deletions(-)
> +
> +diff --git a/configure b/configure
> +index 69e05fb..12fc3d8 100755
>  --- a/configure
>  +++ b/configure
> -@@ -4468,10 +4468,6 @@ fi
> +@@ -5413,10 +5413,6 @@ write_c_skeleton
>   if test "$gcov" = "yes" ; then
>     CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
>     LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
> @@ -12,4 +23,4 @@ Upstream-Status: Pending
>  -  CFLAGS="-O2 $CFLAGS"
>   fi
>
> - ##########################################
> + if test "$have_asan" = "yes"; then
> diff --git a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
> b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
> similarity index 87%
> rename from meta/recipes-devtools/qemu/qemu_2.11.1.bb
> rename to meta/recipes-devtools/qemu/qemu_2.12.0.bb
> index f4b7d69fca..63590fc9eb 100644
> --- a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
> +++ b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
> @@ -20,8 +20,6 @@ SRC_URI = "http://wiki.qemu-project.org/
> download/${BP}.tar.bz2 \
>             file://chardev-connect-socket-to-a-spawned-command.patch \
>             file://apic-fixup-fallthrough-to-PIC.patch \
>             file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
> \
> -           file://memfd.patch \
> -           file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
> \
>             "
>  UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
>
> @@ -31,8 +29,8 @@ SRC_URI_append_class-native = " \
>              file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
>              "
>
> -SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
> -SRC_URI[sha256sum] = "d9df2213ceed32e91dab7bc9dd19c1
> af83f91ba72c7aeef7605dfaaf81732ccb"
> +SRC_URI[md5sum] = "122fd7cdf241ff7eb1e42c0b503b5d1b"
> +SRC_URI[sha256sum] = "c9f4a147bc915d24df9784affc611a
> 115f42d24720a89210b479f1ba7a3f679c"
>
>  COMPATIBLE_HOST_mipsarchn32 = "null"
>  COMPATIBLE_HOST_mipsarchn64 = "null"
> --
> 2.17.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 23337 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 2/3] qemu: upgrade to 2.12.0
  2018-05-09 15:38   ` Burton, Ross
@ 2018-05-10 21:32     ` Alistair Francis
  2018-05-11 19:20     ` [PATCHv2 1/5] libsdl2: allow to build native and nativesdk Martin Jansa
  1 sibling, 0 replies; 29+ messages in thread
From: Alistair Francis @ 2018-05-10 21:32 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On Wed, May 9, 2018 at 8:38 AM, Burton, Ross <ross.burton@intel.com> wrote:
> This fails if x11 isn't in DISTRO_FEATURES but SDL is enabled as ui/sdl.c ->
> ui/x_keymap.h -> Xlib.h.  I guess the best solution here would be to guard
> sdl in the default PACKAGECONFIG with x11 DISTRO_FEATURE checks, and
> explicitly depend on libx11.
>
> As discussed on IRC we should probably also move to libsdl2 as libsdl 1.2 is
> 'historic' now.

I just sent a patch that moves in this direction (at least I think it
does). I'd love to see QEMU 2.12 in as that adds RISC-V support :)

Alistair

>
> Ross
>
> On 2 May 2018 at 15:37, Martin Jansa <martin.jansa@gmail.com> wrote:
>>
>> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
>> ---
>>  meta/conf/distro/include/tcmode-default.inc   |  2 +-
>>  ...4-treat-DISAS_UPDATE-as-variant-of-D.patch | 67 -------------------
>>  ...-connect-socket-to-a-spawned-command.patch | 52 +++++++-------
>>  .../qemu/qemu/disable-grabs.patch             | 43 ++++++------
>>  meta/recipes-devtools/qemu/qemu/memfd.patch   | 57 ----------------
>>  .../qemu/qemu/qemu-2.5.0-cflags.patch         | 15 ++++-
>>  .../qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}   |  6 +-
>>  7 files changed, 65 insertions(+), 177 deletions(-)
>>  delete mode 100644
>> meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>>  delete mode 100644 meta/recipes-devtools/qemu/qemu/memfd.patch
>>  rename meta/recipes-devtools/qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}
>> (87%)
>>
>> diff --git a/meta/conf/distro/include/tcmode-default.inc
>> b/meta/conf/distro/include/tcmode-default.inc
>> index 00399ae820..8b5214ed96 100644
>> --- a/meta/conf/distro/include/tcmode-default.inc
>> +++ b/meta/conf/distro/include/tcmode-default.inc
>> @@ -28,7 +28,7 @@ BINUVERSION ?= "2.30%"
>>  GDBVERSION ?= "8.0%"
>>  GLIBCVERSION ?= "2.27%"
>>  LINUXLIBCVERSION ?= "4.15%"
>> -QEMUVERSION ?= "2.11%"
>> +QEMUVERSION ?= "2.12%"
>>
>>  PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
>>  PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
>> diff --git
>> a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>> b/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>> deleted file mode 100644
>> index f90cae694c..0000000000
>> ---
>> a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>> +++ /dev/null
>> @@ -1,67 +0,0 @@
>> -From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00 2001
>> -From: Victor Kamensky <kamensky@cisco.com>
>> -Date: Fri, 23 Mar 2018 18:26:45 +0000
>> -Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of
>> - DISAS_EXIT
>> -MIME-Version: 1.0
>> -Content-Type: text/plain; charset=UTF-8
>> -Content-Transfer-Encoding: 8bit
>> -
>> -In OE project 4.15 linux kernel boot hang was observed under
>> -single cpu aarch64 qemu. Kernel code was in a loop waiting for
>> -vtimer arrival, spinning in TC generated blocks, while interrupt
>> -was pending unprocessed. This happened because when qemu tried to
>> -handle vtimer interrupt target had interrupts disabled, as
>> -result flag indicating TCG exit, cpu->icount_decr.u16.high,
>> -was cleared but arm_cpu_exec_interrupt function did not call
>> -arm_cpu_do_interrupt to process interrupt. Later when target
>> -reenabled interrupts, it happened without exit into main loop, so
>> -following code that waited for result of interrupt execution
>> -run in infinite loop.
>> -
>> -To solve the problem instructions that operate on CPU sys state
>> -(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
>> -should be considered as DISAS_EXIT variant, and should be
>> -forced to exit back to main loop so qemu will have a chance
>> -processing pending CPU state updates, including pending
>> -interrupts.
>> -
>> -This change brings consistency with how DISAS_UPDATE is treated
>> -in aarch32 case.
>> -
>> -CC: Peter Maydell <peter.maydell@linaro.org>
>> -CC: Alex Bennée <alex.bennee@linaro.org>
>> -CC: qemu-stable@nongnu.org
>> -Suggested-by: Peter Maydell <peter.maydell@linaro.org>
>> -Signed-off-by: Victor Kamensky <kamensky@cisco.com>
>> -Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>> -Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
>> -Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> -Upstream-Status: Backport
>> ----
>> - target/arm/translate-a64.c | 6 +++---
>> - 1 file changed, 3 insertions(+), 3 deletions(-)
>> -
>> -diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
>> -index 31ff047..327513e 100644
>> ---- a/target/arm/translate-a64.c
>> -+++ b/target/arm/translate-a64.c
>> -@@ -13378,12 +13378,12 @@ static void aarch64_tr_tb_stop(DisasContextBase
>> *dcbase, CPUState *cpu)
>> -         case DISAS_UPDATE:
>> -             gen_a64_set_pc_im(dc->pc);
>> -             /* fall through */
>> --        case DISAS_JUMP:
>> --            tcg_gen_lookup_and_goto_ptr();
>> --            break;
>> -         case DISAS_EXIT:
>> -             tcg_gen_exit_tb(0);
>> -             break;
>> -+        case DISAS_JUMP:
>> -+            tcg_gen_lookup_and_goto_ptr();
>> -+            break;
>> -         case DISAS_NORETURN:
>> -         case DISAS_SWI:
>> -             break;
>> ---
>> -2.7.4
>> -
>> diff --git
>> a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>> b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>> index 6e6bf95c18..f1cf53a8c5 100644
>> ---
>> a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>> +++
>> b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>> @@ -1,4 +1,4 @@
>> -From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00 2001
>> +From a7690b02df70e0d3957e6eaa1e1cf92595839fbb Mon Sep 17 00:00:00 2001
>>  From: Alistair Francis <alistair.francis@xilinx.com>
>>  Date: Thu, 21 Dec 2017 11:35:16 -0800
>>  Subject: [PATCH] chardev: connect socket to a spawned command
>> @@ -45,16 +45,16 @@ Upstream-Status: Inappropriate [embedded specific]
>>
>>  Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
>>  ---
>> - chardev/char-socket.c | 86
>> ++++++++++++++++++++++++++++++++++++++++++++++++---
>> - chardev/char.c        |  3 ++
>> - qapi/char.json        |  5 +++
>> - 3 files changed, 90 insertions(+), 4 deletions(-)
>> + chardev/char-socket.c | 102 ++++++++++++++++++++++++++++++++++++++++++
>> + chardev/char.c        |   3 ++
>> + qapi/char.json        |   5 +++
>> + 3 files changed, 110 insertions(+)
>>
>>  diff --git a/chardev/char-socket.c b/chardev/char-socket.c
>> -index 53eda8ef00..f566107c35 100644
>> +index 159e69c3b1..84778cf31a 100644
>>  --- a/chardev/char-socket.c
>>  +++ b/chardev/char-socket.c
>> -@@ -852,6 +852,68 @@ static gboolean socket_reconnect_timeout(gpointer
>> opaque)
>> +@@ -934,6 +934,68 @@ static gboolean socket_reconnect_timeout(gpointer
>> opaque)
>>       return false;
>>   }
>>
>> @@ -123,7 +123,7 @@ index 53eda8ef00..f566107c35 100644
>>   static void qmp_chardev_open_socket(Chardev *chr,
>>                                       ChardevBackend *backend,
>>                                       bool *be_opened,
>> -@@ -859,6 +921,9 @@
>> +@@ -941,6 +1003,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
>>   {
>>       SocketChardev *s = SOCKET_CHARDEV(chr);
>>       ChardevSocket *sock = backend->u.socket.data;
>> @@ -133,11 +133,10 @@ index 53eda8ef00..f566107c35 100644
>>       bool do_nodelay     = sock->has_nodelay ? sock->nodelay : false;
>>       bool is_listen      = sock->has_server  ? sock->server  : true;
>>       bool is_telnet      = sock->has_telnet  ? sock->telnet  : false;
>> -@@ -925,7 +990,14 @@
>> -     } else if (reconnect > 0) {
>> +@@ -1008,6 +1073,14 @@ static void qmp_chardev_open_socket(Chardev *chr,
>>           s->reconnect_time = reconnect;
>>       }
>> --
>> +
>>  +#ifndef _WIN32
>>  +    if (cmd) {
>>  +        chardev_open_socket_cmd(chr, cmd, errp);
>> @@ -146,12 +145,12 @@ index 53eda8ef00..f566107c35 100644
>>  +        *be_opened = true;
>>  +    } else
>>  +#endif
>> -     if (s->reconnect_time) {
>> -         sioc = qio_channel_socket_new();
>> -         tcp_chr_set_client_ioc_name(chr, sioc);
>> -@@ -985,10 +1057,26 @@
>> -     const char *host = qemu_opt_get(opts, "host");
>> +     /* If reconnect_time is set, will do that in chr_machine_done. */
>> +     if (!s->reconnect_time) {
>> +         if (s->is_listen) {
>> +@@ -1065,9 +1138,26 @@ static void qemu_chr_parse_socket(QemuOpts *opts,
>> ChardevBackend *backend,
>>       const char *port = qemu_opt_get(opts, "port");
>> +     const char *fd = qemu_opt_get(opts, "fd");
>>       const char *tls_creds = qemu_opt_get(opts, "tls-creds");
>>  +#ifndef _WIN32
>>  +    const char *cmd = qemu_opt_get(opts, "cmd");
>> @@ -159,7 +158,6 @@ index 53eda8ef00..f566107c35 100644
>>       SocketAddressLegacy *addr;
>>       ChardevSocket *sock;
>>
>> -     backend->type = CHARDEV_BACKEND_KIND_SOCKET;
>>  +#ifndef _WIN32
>>  +    if (cmd) {
>>  +        /*
>> @@ -173,17 +171,18 @@ index 53eda8ef00..f566107c35 100644
>>  +        }
>>  +    } else
>>  +#endif
>> -     if (!path) {
>> -         if (!host) {
>> -             error_setg(errp, "chardev: socket: no host given");
>> -@@ -1021,13 +1109,24 @@
>> -     sock->has_reconnect = true;
>> ++
>> +     if ((!!path + !!fd + !!host) != 1) {
>> +         error_setg(errp,
>> +                    "Exactly one of 'path', 'fd' or 'host' required");
>> +@@ -1112,12 +1202,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts,
>> ChardevBackend *backend,
>>       sock->reconnect = reconnect;
>>       sock->tls_creds = g_strdup(tls_creds);
>> +
>>  +#ifndef _WIN32
>>  +    sock->cmd = g_strdup(cmd);
>>  +#endif
>> -
>> ++
>>       addr = g_new0(SocketAddressLegacy, 1);
>>  +#ifndef _WIN32
>>  +    if (path || cmd) {
>> @@ -198,11 +197,11 @@ index 53eda8ef00..f566107c35 100644
>>  +#else
>>           q_unix->path = g_strdup(path);
>>  +#endif
>> -     } else {
>> +     } else if (host) {
>>           addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
>>           addr->u.inet.data = g_new(InetSocketAddress, 1);
>>  diff --git a/chardev/char.c b/chardev/char.c
>> -index 2ae4f465ec..5d52cd5de5 100644
>> +index 76d866e6fe..9747d51d7c 100644
>>  --- a/chardev/char.c
>>  +++ b/chardev/char.c
>>  @@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
>> @@ -239,4 +238,5 @@ index ae19dcd1ed..6de0f29bcd 100644
>>                                        '*server'    : 'bool',
>>                                        '*wait'      : 'bool',
>>  --
>> -2.14.1
>> +2.17.0
>> +
>> diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>> b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>> index 77117890f4..e29c011a6f 100644
>> --- a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>> +++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>> @@ -1,3 +1,11 @@
>> +From a31c5c695cb716310257f1fc60a06b821e74fe7f Mon Sep 17 00:00:00 2001
>> +From: Ross Burton <ross.burton@intel.com>
>> +Date: Wed, 18 Sep 2013 14:04:54 +0100
>> +Subject: [PATCH] sdl.c: allow user to disable pointer grabs
>> +MIME-Version: 1.0
>> +Content-Type: text/plain; charset=UTF-8
>> +Content-Transfer-Encoding: 8bit
>> +
>>  When the pointer enters the Qemu window it calls SDL_WM_GrabInput, which
>> calls
>>  XGrabPointer in a busyloop until it returns GrabSuccess. However if
>> there's already
>>  a pointer grab (screen is locked, a menu is open) then qemu will hang
>> until the
>> @@ -11,35 +19,30 @@ them in a conditional that can be set by the
>> autobuilder environment, preserving
>>  the current grabbing behaviour for everyone else.
>>
>>  Upstream-Status: Pending
>> -Signed-off-by: Ross Burton <ross.burton@intel.com>
>> -
>> -From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00 2001
>> -From: Ross Burton <ross.burton@intel.com>
>> -Date: Wed, 18 Sep 2013 14:04:54 +0100
>> -Subject: [PATCH] sdl.c: allow user to disable pointer grabs
>> -
>>  Signed-off-by: Ross Burton <ross.burton@intel.com>
>>  Signed-off-by: Eric Bénard <eric@eukrea.com>
>> +
>>  ---
>> - ui/sdl.c | 12 ++++++++++--
>> - 1 file changed, 10 insertions(+), 2 deletions(-)
>> + ui/sdl.c | 13 +++++++++++--
>> + 1 file changed, 11 insertions(+), 2 deletions(-)
>>
>> -Index: qemu-2.11.1/ui/sdl.c
>> -===================================================================
>> ---- qemu-2.11.1.orig/ui/sdl.c
>> -+++ qemu-2.11.1/ui/sdl.c
>> -@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
>> - static int scaling_active = 0;
>> - static Notifier mouse_mode_notifier;
>> - static int idle_counter;
>> +diff --git a/ui/sdl.c b/ui/sdl.c
>> +index a5fd503..ab8d1b1 100644
>> +--- a/ui/sdl.c
>> ++++ b/ui/sdl.c
>> +@@ -68,6 +68,11 @@ static int idle_counter;
>> + static const guint16 *keycode_map;
>> + static size_t keycode_maplen;
>> +
>>  +#ifndef True
>>  +#define True 1
>>  +#endif
>>  +static doing_grabs = True;
>> -
>> ++
>>   #define SDL_REFRESH_INTERVAL_BUSY 10
>>   #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
>> -@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
>> +                             / SDL_REFRESH_INTERVAL_BUSY + 1)
>> +@@ -398,14 +403,16 @@ static void sdl_grab_start(void)
>>           }
>>       } else
>>           sdl_hide_cursor();
>> @@ -58,7 +61,7 @@ Index: qemu-2.11.1/ui/sdl.c
>>       gui_grab = 0;
>>       sdl_show_cursor();
>>       sdl_update_caption();
>> -@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
>> +@@ -945,6 +952,8 @@ static void sdl1_display_init(DisplayState *ds,
>> DisplayOptions *o)
>>        * This requires SDL >= 1.2.14. */
>>       setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
>>
>> diff --git a/meta/recipes-devtools/qemu/qemu/memfd.patch
>> b/meta/recipes-devtools/qemu/qemu/memfd.patch
>> deleted file mode 100644
>> index 62e8d3800b..0000000000
>> --- a/meta/recipes-devtools/qemu/qemu/memfd.patch
>> +++ /dev/null
>> @@ -1,57 +0,0 @@
>> -Upstream-Status: Backport
>> -Signed-off-by: Ross Burton <ross.burton@intel.com>
>> -
>> -From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001
>> -From: Paolo Bonzini <pbonzini@redhat.com>
>> -Date: Tue, 28 Nov 2017 11:51:27 +0100
>> -Subject: [PATCH] memfd: fix configure test
>> -MIME-Version: 1.0
>> -Content-Type: text/plain; charset=UTF-8
>> -Content-Transfer-Encoding: 8bit
>> -
>> -Recent glibc added memfd_create in sys/mman.h.  This conflicts with
>> -the definition in util/memfd.c:
>> -
>> -    /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error:
>> static declaration of memfd_create follows non-static declaration
>> -
>> -Fix the configure test, and remove the sys/memfd.h inclusion since the
>> -file actually does not exist---it is a typo in the memfd_create(2) man
>> -page.
>> -
>> -Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
>> -Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ----
>> - configure    | 2 +-
>> - util/memfd.c | 4 +---
>> - 2 files changed, 2 insertions(+), 4 deletions(-)
>> -
>> -diff --git a/configure b/configure
>> -index 9c8aa5a98b..99ccc1725a 100755
>> ---- a/configure
>> -+++ b/configure
>> -@@ -3923,7 +3923,7 @@ fi
>> - # check if memfd is supported
>> - memfd=no
>> - cat > $TMPC << EOF
>> --#include <sys/memfd.h>
>> -+#include <sys/mman.h>
>> -
>> - int main(void)
>> - {
>> -diff --git a/util/memfd.c b/util/memfd.c
>> -index 4571d1aba8..412e94a405 100644
>> ---- a/util/memfd.c
>> -+++ b/util/memfd.c
>> -@@ -31,9 +31,7 @@
>> -
>> - #include "qemu/memfd.h"
>> -
>> --#ifdef CONFIG_MEMFD
>> --#include <sys/memfd.h>
>> --#elif defined CONFIG_LINUX
>> -+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
>> - #include <sys/syscall.h>
>> - #include <asm/unistd.h>
>> -
>> ---
>> -2.11.0
>> diff --git a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>> b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>> index eb99d14639..360519f1a1 100644
>> --- a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>> +++ b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>> @@ -1,8 +1,19 @@
>> +From 6702ec74a7ba90b99efedde260c9f08b75d5516d Mon Sep 17 00:00:00 2001
>> +From: Stephen Arnold <sarnold@vctlabs.com>
>> +Date: Sun, 12 Jun 2016 18:09:56 -0700
>> +Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some
>> environment
>> +
>>  Upstream-Status: Pending
>>
>> +---
>> + configure | 4 ----
>> + 1 file changed, 4 deletions(-)
>> +
>> +diff --git a/configure b/configure
>> +index 69e05fb..12fc3d8 100755
>>  --- a/configure
>>  +++ b/configure
>> -@@ -4468,10 +4468,6 @@ fi
>> +@@ -5413,10 +5413,6 @@ write_c_skeleton
>>   if test "$gcov" = "yes" ; then
>>     CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
>>     LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
>> @@ -12,4 +23,4 @@ Upstream-Status: Pending
>>  -  CFLAGS="-O2 $CFLAGS"
>>   fi
>>
>> - ##########################################
>> + if test "$have_asan" = "yes"; then
>> diff --git a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
>> b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
>> similarity index 87%
>> rename from meta/recipes-devtools/qemu/qemu_2.11.1.bb
>> rename to meta/recipes-devtools/qemu/qemu_2.12.0.bb
>> index f4b7d69fca..63590fc9eb 100644
>> --- a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
>> +++ b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
>> @@ -20,8 +20,6 @@ SRC_URI =
>> "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
>>             file://chardev-connect-socket-to-a-spawned-command.patch \
>>             file://apic-fixup-fallthrough-to-PIC.patch \
>>
>> file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
>> -           file://memfd.patch \
>> -
>> file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
>>             "
>>  UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
>>
>> @@ -31,8 +29,8 @@ SRC_URI_append_class-native = " \
>>              file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
>>              "
>>
>> -SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
>> -SRC_URI[sha256sum] =
>> "d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb"
>> +SRC_URI[md5sum] = "122fd7cdf241ff7eb1e42c0b503b5d1b"
>> +SRC_URI[sha256sum] =
>> "c9f4a147bc915d24df9784affc611a115f42d24720a89210b479f1ba7a3f679c"
>>
>>  COMPATIBLE_HOST_mipsarchn32 = "null"
>>  COMPATIBLE_HOST_mipsarchn64 = "null"
>> --
>> 2.17.0
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCHv2 1/5] libsdl2: allow to build native and nativesdk
  2018-05-09 15:38   ` Burton, Ross
  2018-05-10 21:32     ` Alistair Francis
@ 2018-05-11 19:20     ` Martin Jansa
  2018-05-11 19:21       ` [PATCHv2 2/5] qemu: upgrade to 2.12.0 Martin Jansa
                         ` (4 more replies)
  1 sibling, 5 replies; 29+ messages in thread
From: Martin Jansa @ 2018-05-11 19:20 UTC (permalink / raw)
  To: openembedded-core

* enable x11 in native builds

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb
index c0cf70d7fd..c37f669321 100644
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb
@@ -37,6 +37,8 @@ EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
 # and BSP layers to pick either (desktop) opengl, gles2, or no GL
 PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
 
+PACKAGECONFIG_class-native = "x11"
+PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
 PACKAGECONFIG ??= " \
     ${PACKAGECONFIG_GL} \
     ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
@@ -63,3 +65,5 @@ do_configure_prepend() {
 }
 
 FILES_${PN}-dev += "${libdir}/cmake"
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCHv2 2/5] qemu: upgrade to 2.12.0
  2018-05-11 19:20     ` [PATCHv2 1/5] libsdl2: allow to build native and nativesdk Martin Jansa
@ 2018-05-11 19:21       ` Martin Jansa
  2018-05-11 23:17         ` Alistair Francis
  2018-05-11 19:21       ` [PATCHv2 3/5] qemu: refresh patches with devtool Martin Jansa
                         ` (3 subsequent siblings)
  4 siblings, 1 reply; 29+ messages in thread
From: Martin Jansa @ 2018-05-11 19:21 UTC (permalink / raw)
  To: openembedded-core

From: Martin Jansa <martin.jansa@gmail.com>

* drop patches which are now included upstream

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/conf/distro/include/tcmode-default.inc   |  2 +-
 ...4-treat-DISAS_UPDATE-as-variant-of-D.patch | 67 -------------------
 ...-connect-socket-to-a-spawned-command.patch | 52 +++++++-------
 ...2Queue-pointers-in-post_load-routine.patch | 63 -----------------
 .../qemu/qemu/disable-grabs.patch             | 43 ++++++------
 meta/recipes-devtools/qemu/qemu/memfd.patch   | 57 ----------------
 .../qemu/qemu/qemu-2.5.0-cflags.patch         | 15 ++++-
 .../qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}   |  7 +-
 8 files changed, 65 insertions(+), 241 deletions(-)
 delete mode 100644 meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu/check-PS2Queue-pointers-in-post_load-routine.patch
 delete mode 100644 meta/recipes-devtools/qemu/qemu/memfd.patch
 rename meta/recipes-devtools/qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb} (84%)

diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc
index b197819e9e..5271b41860 100644
--- a/meta/conf/distro/include/tcmode-default.inc
+++ b/meta/conf/distro/include/tcmode-default.inc
@@ -28,7 +28,7 @@ BINUVERSION ?= "2.30%"
 GDBVERSION ?= "8.1%"
 GLIBCVERSION ?= "2.27%"
 LINUXLIBCVERSION ?= "4.15%"
-QEMUVERSION ?= "2.11%"
+QEMUVERSION ?= "2.12%"
 
 PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
 PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
diff --git a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch b/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
deleted file mode 100644
index f90cae694c..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00 2001
-From: Victor Kamensky <kamensky@cisco.com>
-Date: Fri, 23 Mar 2018 18:26:45 +0000
-Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of
- DISAS_EXIT
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-In OE project 4.15 linux kernel boot hang was observed under
-single cpu aarch64 qemu. Kernel code was in a loop waiting for
-vtimer arrival, spinning in TC generated blocks, while interrupt
-was pending unprocessed. This happened because when qemu tried to
-handle vtimer interrupt target had interrupts disabled, as
-result flag indicating TCG exit, cpu->icount_decr.u16.high,
-was cleared but arm_cpu_exec_interrupt function did not call
-arm_cpu_do_interrupt to process interrupt. Later when target
-reenabled interrupts, it happened without exit into main loop, so
-following code that waited for result of interrupt execution
-run in infinite loop.
-
-To solve the problem instructions that operate on CPU sys state
-(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
-should be considered as DISAS_EXIT variant, and should be
-forced to exit back to main loop so qemu will have a chance
-processing pending CPU state updates, including pending
-interrupts.
-
-This change brings consistency with how DISAS_UPDATE is treated
-in aarch32 case.
-
-CC: Peter Maydell <peter.maydell@linaro.org>
-CC: Alex Bennée <alex.bennee@linaro.org>
-CC: qemu-stable@nongnu.org
-Suggested-by: Peter Maydell <peter.maydell@linaro.org>
-Signed-off-by: Victor Kamensky <kamensky@cisco.com>
-Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
-Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
-Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-Upstream-Status: Backport
----
- target/arm/translate-a64.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
-index 31ff047..327513e 100644
---- a/target/arm/translate-a64.c
-+++ b/target/arm/translate-a64.c
-@@ -13378,12 +13378,12 @@ static void aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
-         case DISAS_UPDATE:
-             gen_a64_set_pc_im(dc->pc);
-             /* fall through */
--        case DISAS_JUMP:
--            tcg_gen_lookup_and_goto_ptr();
--            break;
-         case DISAS_EXIT:
-             tcg_gen_exit_tb(0);
-             break;
-+        case DISAS_JUMP:
-+            tcg_gen_lookup_and_goto_ptr();
-+            break;
-         case DISAS_NORETURN:
-         case DISAS_SWI:
-             break;
--- 
-2.7.4
-
diff --git a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
index 6e6bf95c18..f1cf53a8c5 100644
--- a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
+++ b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
@@ -1,4 +1,4 @@
-From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00 2001
+From a7690b02df70e0d3957e6eaa1e1cf92595839fbb Mon Sep 17 00:00:00 2001
 From: Alistair Francis <alistair.francis@xilinx.com>
 Date: Thu, 21 Dec 2017 11:35:16 -0800
 Subject: [PATCH] chardev: connect socket to a spawned command
@@ -45,16 +45,16 @@ Upstream-Status: Inappropriate [embedded specific]
 
 Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
 ---
- chardev/char-socket.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++---
- chardev/char.c        |  3 ++
- qapi/char.json        |  5 +++
- 3 files changed, 90 insertions(+), 4 deletions(-)
+ chardev/char-socket.c | 102 ++++++++++++++++++++++++++++++++++++++++++
+ chardev/char.c        |   3 ++
+ qapi/char.json        |   5 +++
+ 3 files changed, 110 insertions(+)
 
 diff --git a/chardev/char-socket.c b/chardev/char-socket.c
-index 53eda8ef00..f566107c35 100644
+index 159e69c3b1..84778cf31a 100644
 --- a/chardev/char-socket.c
 +++ b/chardev/char-socket.c
-@@ -852,6 +852,68 @@ static gboolean socket_reconnect_timeout(gpointer opaque)
+@@ -934,6 +934,68 @@ static gboolean socket_reconnect_timeout(gpointer opaque)
      return false;
  }
  
@@ -123,7 +123,7 @@ index 53eda8ef00..f566107c35 100644
  static void qmp_chardev_open_socket(Chardev *chr,
                                      ChardevBackend *backend,
                                      bool *be_opened,
-@@ -859,6 +921,9 @@
+@@ -941,6 +1003,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
  {
      SocketChardev *s = SOCKET_CHARDEV(chr);
      ChardevSocket *sock = backend->u.socket.data;
@@ -133,11 +133,10 @@ index 53eda8ef00..f566107c35 100644
      bool do_nodelay     = sock->has_nodelay ? sock->nodelay : false;
      bool is_listen      = sock->has_server  ? sock->server  : true;
      bool is_telnet      = sock->has_telnet  ? sock->telnet  : false;
-@@ -925,7 +990,14 @@
-     } else if (reconnect > 0) {
+@@ -1008,6 +1073,14 @@ static void qmp_chardev_open_socket(Chardev *chr,
          s->reconnect_time = reconnect;
      }
--
+ 
 +#ifndef _WIN32
 +    if (cmd) {
 +        chardev_open_socket_cmd(chr, cmd, errp);
@@ -146,12 +145,12 @@ index 53eda8ef00..f566107c35 100644
 +        *be_opened = true;
 +    } else
 +#endif
-     if (s->reconnect_time) {
-         sioc = qio_channel_socket_new();
-         tcp_chr_set_client_ioc_name(chr, sioc);
-@@ -985,10 +1057,26 @@
-     const char *host = qemu_opt_get(opts, "host");
+     /* If reconnect_time is set, will do that in chr_machine_done. */
+     if (!s->reconnect_time) {
+         if (s->is_listen) {
+@@ -1065,9 +1138,26 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
      const char *port = qemu_opt_get(opts, "port");
+     const char *fd = qemu_opt_get(opts, "fd");
      const char *tls_creds = qemu_opt_get(opts, "tls-creds");
 +#ifndef _WIN32
 +    const char *cmd = qemu_opt_get(opts, "cmd");
@@ -159,7 +158,6 @@ index 53eda8ef00..f566107c35 100644
      SocketAddressLegacy *addr;
      ChardevSocket *sock;
  
-     backend->type = CHARDEV_BACKEND_KIND_SOCKET;
 +#ifndef _WIN32
 +    if (cmd) {
 +        /*
@@ -173,17 +171,18 @@ index 53eda8ef00..f566107c35 100644
 +        }
 +    } else
 +#endif
-     if (!path) {
-         if (!host) {
-             error_setg(errp, "chardev: socket: no host given");
-@@ -1021,13 +1109,24 @@
-     sock->has_reconnect = true;
++
+     if ((!!path + !!fd + !!host) != 1) {
+         error_setg(errp,
+                    "Exactly one of 'path', 'fd' or 'host' required");
+@@ -1112,12 +1202,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
      sock->reconnect = reconnect;
      sock->tls_creds = g_strdup(tls_creds);
+ 
 +#ifndef _WIN32
 +    sock->cmd = g_strdup(cmd);
 +#endif
- 
++ 
      addr = g_new0(SocketAddressLegacy, 1);
 +#ifndef _WIN32
 +    if (path || cmd) {
@@ -198,11 +197,11 @@ index 53eda8ef00..f566107c35 100644
 +#else
          q_unix->path = g_strdup(path);
 +#endif
-     } else {
+     } else if (host) {
          addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
          addr->u.inet.data = g_new(InetSocketAddress, 1);
 diff --git a/chardev/char.c b/chardev/char.c
-index 2ae4f465ec..5d52cd5de5 100644
+index 76d866e6fe..9747d51d7c 100644
 --- a/chardev/char.c
 +++ b/chardev/char.c
 @@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
@@ -239,4 +238,5 @@ index ae19dcd1ed..6de0f29bcd 100644
                                       '*server'    : 'bool',
                                       '*wait'      : 'bool',
 -- 
-2.14.1
+2.17.0
+
diff --git a/meta/recipes-devtools/qemu/qemu/check-PS2Queue-pointers-in-post_load-routine.patch b/meta/recipes-devtools/qemu/qemu/check-PS2Queue-pointers-in-post_load-routine.patch
deleted file mode 100644
index f8d7f66ace..0000000000
--- a/meta/recipes-devtools/qemu/qemu/check-PS2Queue-pointers-in-post_load-routine.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From ee9a17d0e12143971a9676227cce953c0dbe52fb Mon Sep 17 00:00:00 2001
-From: Prasad J Pandit <pjp@fedoraproject.org>
-Date: Thu, 16 Nov 2017 13:21:55 +0530
-Subject: [PATCH] ps2: check PS2Queue pointers in post_load routine
-
-During Qemu guest migration, a destination process invokes ps2
-post_load function. In that, if 'rptr' and 'count' values were
-invalid, it could lead to OOB access or infinite loop issue.
-Add check to avoid it.
-
-Reported-by: Cyrille Chatras <cyrille.chatras@orange.com>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-Message-id: 20171116075155.22378-1-ppandit@redhat.com
-Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-
-CVE: CVE-2017-16845
-Upstream-Status: Backport
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- hw/input/ps2.c | 21 +++++++++------------
- 1 file changed, 9 insertions(+), 12 deletions(-)
-
-diff --git a/hw/input/ps2.c b/hw/input/ps2.c
-index f388a23..de171a2 100644
---- a/hw/input/ps2.c
-+++ b/hw/input/ps2.c
-@@ -1225,24 +1225,21 @@ static void ps2_common_reset(PS2State *s)
- static void ps2_common_post_load(PS2State *s)
- {
-     PS2Queue *q = &s->queue;
--    int size;
--    int i;
--    int tmp_data[PS2_QUEUE_SIZE];
-+    uint8_t i, size;
-+    uint8_t tmp_data[PS2_QUEUE_SIZE];
- 
-     /* set the useful data buffer queue size, < PS2_QUEUE_SIZE */
--    size = q->count > PS2_QUEUE_SIZE ? 0 : q->count;
-+    size = (q->count < 0 || q->count > PS2_QUEUE_SIZE) ? 0 : q->count;
- 
-     /* move the queue elements to the start of data array */
--    if (size > 0) {
--        for (i = 0; i < size; i++) {
--            /* move the queue elements to the temporary buffer */
--            tmp_data[i] = q->data[q->rptr];
--            if (++q->rptr == 256) {
--                q->rptr = 0;
--            }
-+    for (i = 0; i < size; i++) {
-+        if (q->rptr < 0 || q->rptr >= sizeof(q->data)) {
-+            q->rptr = 0;
-         }
--        memcpy(q->data, tmp_data, size);
-+        tmp_data[i] = q->data[q->rptr++];
-     }
-+    memcpy(q->data, tmp_data, size);
-+
-     /* reset rptr/wptr/count */
-     q->rptr = 0;
-     q->wptr = size;
--- 
-2.7.4
-
diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
index 77117890f4..e29c011a6f 100644
--- a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
+++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
@@ -1,3 +1,11 @@
+From a31c5c695cb716310257f1fc60a06b821e74fe7f Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Wed, 18 Sep 2013 14:04:54 +0100
+Subject: [PATCH] sdl.c: allow user to disable pointer grabs
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
 When the pointer enters the Qemu window it calls SDL_WM_GrabInput, which calls
 XGrabPointer in a busyloop until it returns GrabSuccess. However if there's already
 a pointer grab (screen is locked, a menu is open) then qemu will hang until the
@@ -11,35 +19,30 @@ them in a conditional that can be set by the autobuilder environment, preserving
 the current grabbing behaviour for everyone else.
 
 Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Wed, 18 Sep 2013 14:04:54 +0100
-Subject: [PATCH] sdl.c: allow user to disable pointer grabs
-
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 Signed-off-by: Eric Bénard <eric@eukrea.com>
+
 ---
- ui/sdl.c | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
+ ui/sdl.c | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
 
-Index: qemu-2.11.1/ui/sdl.c
-===================================================================
---- qemu-2.11.1.orig/ui/sdl.c
-+++ qemu-2.11.1/ui/sdl.c
-@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
- static int scaling_active = 0;
- static Notifier mouse_mode_notifier;
- static int idle_counter;
+diff --git a/ui/sdl.c b/ui/sdl.c
+index a5fd503..ab8d1b1 100644
+--- a/ui/sdl.c
++++ b/ui/sdl.c
+@@ -68,6 +68,11 @@ static int idle_counter;
+ static const guint16 *keycode_map;
+ static size_t keycode_maplen;
+ 
 +#ifndef True
 +#define True 1
 +#endif
 +static doing_grabs = True;
- 
++
  #define SDL_REFRESH_INTERVAL_BUSY 10
  #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
-@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
+                             / SDL_REFRESH_INTERVAL_BUSY + 1)
+@@ -398,14 +403,16 @@ static void sdl_grab_start(void)
          }
      } else
          sdl_hide_cursor();
@@ -58,7 +61,7 @@ Index: qemu-2.11.1/ui/sdl.c
      gui_grab = 0;
      sdl_show_cursor();
      sdl_update_caption();
-@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
+@@ -945,6 +952,8 @@ static void sdl1_display_init(DisplayState *ds, DisplayOptions *o)
       * This requires SDL >= 1.2.14. */
      setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
  
diff --git a/meta/recipes-devtools/qemu/qemu/memfd.patch b/meta/recipes-devtools/qemu/qemu/memfd.patch
deleted file mode 100644
index 62e8d3800b..0000000000
--- a/meta/recipes-devtools/qemu/qemu/memfd.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001
-From: Paolo Bonzini <pbonzini@redhat.com>
-Date: Tue, 28 Nov 2017 11:51:27 +0100
-Subject: [PATCH] memfd: fix configure test
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Recent glibc added memfd_create in sys/mman.h.  This conflicts with
-the definition in util/memfd.c:
-
-    /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error: static declaration of memfd_create follows non-static declaration
-
-Fix the configure test, and remove the sys/memfd.h inclusion since the
-file actually does not exist---it is a typo in the memfd_create(2) man
-page.
-
-Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
-Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
----
- configure    | 2 +-
- util/memfd.c | 4 +---
- 2 files changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/configure b/configure
-index 9c8aa5a98b..99ccc1725a 100755
---- a/configure
-+++ b/configure
-@@ -3923,7 +3923,7 @@ fi
- # check if memfd is supported
- memfd=no
- cat > $TMPC << EOF
--#include <sys/memfd.h>
-+#include <sys/mman.h>
- 
- int main(void)
- {
-diff --git a/util/memfd.c b/util/memfd.c
-index 4571d1aba8..412e94a405 100644
---- a/util/memfd.c
-+++ b/util/memfd.c
-@@ -31,9 +31,7 @@
- 
- #include "qemu/memfd.h"
- 
--#ifdef CONFIG_MEMFD
--#include <sys/memfd.h>
--#elif defined CONFIG_LINUX
-+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
- #include <sys/syscall.h>
- #include <asm/unistd.h>
- 
--- 
-2.11.0
diff --git a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
index eb99d14639..360519f1a1 100644
--- a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
+++ b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
@@ -1,8 +1,19 @@
+From 6702ec74a7ba90b99efedde260c9f08b75d5516d Mon Sep 17 00:00:00 2001
+From: Stephen Arnold <sarnold@vctlabs.com>
+Date: Sun, 12 Jun 2016 18:09:56 -0700
+Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some environment
+
 Upstream-Status: Pending
 
+---
+ configure | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/configure b/configure
+index 69e05fb..12fc3d8 100755
 --- a/configure
 +++ b/configure
-@@ -4468,10 +4468,6 @@ fi
+@@ -5413,10 +5413,6 @@ write_c_skeleton
  if test "$gcov" = "yes" ; then
    CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
    LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
@@ -12,4 +23,4 @@ Upstream-Status: Pending
 -  CFLAGS="-O2 $CFLAGS"
  fi
  
- ##########################################
+ if test "$have_asan" = "yes"; then
diff --git a/meta/recipes-devtools/qemu/qemu_2.11.1.bb b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
similarity index 84%
rename from meta/recipes-devtools/qemu/qemu_2.11.1.bb
rename to meta/recipes-devtools/qemu/qemu_2.12.0.bb
index ab82c5fe56..63590fc9eb 100644
--- a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
@@ -20,9 +20,6 @@ SRC_URI = "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
            file://chardev-connect-socket-to-a-spawned-command.patch \
            file://apic-fixup-fallthrough-to-PIC.patch \
            file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
-           file://memfd.patch \
-           file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
-           file://check-PS2Queue-pointers-in-post_load-routine.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
 
@@ -32,8 +29,8 @@ SRC_URI_append_class-native = " \
             file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
             "
 
-SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
-SRC_URI[sha256sum] = "d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb"
+SRC_URI[md5sum] = "122fd7cdf241ff7eb1e42c0b503b5d1b"
+SRC_URI[sha256sum] = "c9f4a147bc915d24df9784affc611a115f42d24720a89210b479f1ba7a3f679c"
 
 COMPATIBLE_HOST_mipsarchn32 = "null"
 COMPATIBLE_HOST_mipsarchn64 = "null"
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCHv2 3/5] qemu: refresh patches with devtool
  2018-05-11 19:20     ` [PATCHv2 1/5] libsdl2: allow to build native and nativesdk Martin Jansa
  2018-05-11 19:21       ` [PATCHv2 2/5] qemu: upgrade to 2.12.0 Martin Jansa
@ 2018-05-11 19:21       ` Martin Jansa
  2018-05-11 23:18         ` Alistair Francis
  2018-05-11 19:21       ` [PATCHv2 4/5] qemu: add PACKAGECONFIG for virglrenderer, sdl2, usb-redir and spice Martin Jansa
                         ` (2 subsequent siblings)
  4 siblings, 1 reply; 29+ messages in thread
From: Martin Jansa @ 2018-05-11 19:21 UTC (permalink / raw)
  To: openembedded-core

From: Martin Jansa <martin.jansa@gmail.com>

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 .../qemu/qemu/add-ptest-in-makefile-v10.patch | 13 ++++---
 .../qemu/apic-fixup-fallthrough-to-PIC.patch  | 15 ++++----
 ...pus.c-qemu_cpu_kick_thread_debugging.patch | 12 +++----
 ...x-libcap-header-issue-on-some-distro.patch | 16 +++++----
 ...webkitgtk-hangs-on-32-bit-x86-target.patch | 10 +++---
 .../qemu/qemu/no-valgrind.patch               | 19 ++++++++--
 .../qemu/qemu/pathlimit.patch                 | 35 ++++++++++++-------
 .../qemu/qemu-enlarge-env-entry-size.patch    | 18 +++++-----
 meta/recipes-devtools/qemu/qemu/wacom.patch   | 24 ++++++++-----
 9 files changed, 100 insertions(+), 62 deletions(-)

diff --git a/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch
index e9639820be..3337d1c7ba 100644
--- a/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch
+++ b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch
@@ -1,7 +1,8 @@
-From 4201a5791fc4798a45a9b9f881602d7bacb74ed1 Mon Sep 17 00:00:00 2001
+From 6c01c969def7adae70d7d59a40b5640454b97bdb Mon Sep 17 00:00:00 2001
 From: Juro Bystricky <juro.bystricky@intel.com>
 Date: Thu, 31 Aug 2017 11:06:56 -0700
-Subject: Add subpackage -ptest which runs all unit test cases for qemu.
+Subject: [PATCH] Add subpackage -ptest which runs all unit test cases for
+ qemu.
 
 Upstream-Status: Pending
 
@@ -9,11 +10,15 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
 
 Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
 
+---
+ tests/Makefile.include | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
 diff --git a/tests/Makefile.include b/tests/Makefile.include
-index f08b741..3d1b3e9 100644
+index 3b9a5e3..dfbcd72 100644
 --- a/tests/Makefile.include
 +++ b/tests/Makefile.include
-@@ -924,4 +924,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
+@@ -972,4 +972,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
  -include $(wildcard tests/*.d)
  -include $(wildcard tests/libqos/*.d)
  
diff --git a/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch b/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
index d6a3522eda..8ba507c9ff 100644
--- a/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
+++ b/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
@@ -1,7 +1,7 @@
-From bef93bb81588b5323a52d2e1886f2a77b64a976b Mon Sep 17 00:00:00 2001
+From ca247c6e7ab7a0bd7b94658a726940f10a6b0559 Mon Sep 17 00:00:00 2001
 From: Mark Asselstine <mark.asselstine@windriver.com>
 Date: Tue, 26 Feb 2013 11:43:28 -0500
-Subject: [PATCH 03/18] apic: fixup fallthrough to PIC
+Subject: [PATCH] apic: fixup fallthrough to PIC
 
 Commit 0e21e12bb311c4c1095d0269dc2ef81196ccb60a [Don't route PIC
 interrupts through the local APIC if the local APIC config says so.]
@@ -24,15 +24,16 @@ serviced, is -1.
 Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
 Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html]
 Signed-off-by: He Zhe <zhe.he@windriver.com>
+
 ---
  hw/intc/apic.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-Index: qemu-2.11.1/hw/intc/apic.c
-===================================================================
---- qemu-2.11.1.orig/hw/intc/apic.c
-+++ qemu-2.11.1/hw/intc/apic.c
-@@ -591,7 +591,7 @@ int apic_accept_pic_intr(DeviceState *de
+diff --git a/hw/intc/apic.c b/hw/intc/apic.c
+index 6fda52b..cd72919 100644
+--- a/hw/intc/apic.c
++++ b/hw/intc/apic.c
+@@ -603,7 +603,7 @@ int apic_accept_pic_intr(DeviceState *dev)
      APICCommonState *s = APIC(dev);
      uint32_t lvt0;
  
diff --git a/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch b/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch
index 6822132541..46c82a4aea 100644
--- a/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch
+++ b/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch
@@ -1,4 +1,4 @@
-From 697a834c35d19447b7dcdb9e1d9434bc6ce17c21 Mon Sep 17 00:00:00 2001
+From a2e3ad8e3bbdea20a4c53404674dd8ae46bd2528 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
 Date: Wed, 12 Aug 2015 15:11:30 -0500
 Subject: [PATCH] cpus.c: Add error messages when qemi_cpu_kick_thread fails.
@@ -12,6 +12,7 @@ current cpu information.
 
 Upstream-Status: Inappropriate
 Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+
 ---
  cpus.c         |  5 +++++
  custom_debug.h | 24 ++++++++++++++++++++++++
@@ -19,10 +20,10 @@ Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
  create mode 100644 custom_debug.h
 
 diff --git a/cpus.c b/cpus.c
-index a822ce3..7e4786e 100644
+index 38eba8b..b84a60a 100644
 --- a/cpus.c
 +++ b/cpus.c
-@@ -1080,6 +1080,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
+@@ -1690,6 +1690,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
      return NULL;
  }
  
@@ -31,7 +32,7 @@ index a822ce3..7e4786e 100644
  static void qemu_cpu_kick_thread(CPUState *cpu)
  {
  #ifndef _WIN32
-@@ -1088,6 +1090,9 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
+@@ -1702,6 +1704,9 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
      err = pthread_kill(cpu->thread->thread, SIG_IPI);
      if (err) {
          fprintf(stderr, "qemu:%s: %s", __func__, strerror(err));
@@ -71,6 +72,3 @@ index 0000000..f029e45
 +
 +	free(symbols);
 +}
--- 
-1.9.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch b/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
index cee6a676ab..a5ab6c5849 100644
--- a/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
+++ b/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
@@ -1,4 +1,7 @@
-fix libcap header issue on some distro
+From ebcb35fc87ca201ce7e5d01e82d677498bd96aea Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 12 Mar 2013 09:54:06 +0800
+Subject: [PATCH] fix libcap header issue on some distro
 
 1, When build qemu-native on SLED 11.2, there is an error:
 ...
@@ -51,14 +54,16 @@ http://patchwork.linuxtv.org/patch/12748/
 
 Upstream-Status: Pending
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
 ---
- fsdev/virtfs-proxy-helper.c |    7 +++++--
+ fsdev/virtfs-proxy-helper.c | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
+index 6f132c5..8329950 100644
 --- a/fsdev/virtfs-proxy-helper.c
 +++ b/fsdev/virtfs-proxy-helper.c
-@@ -12,7 +12,6 @@
+@@ -13,7 +13,6 @@
  #include <sys/resource.h>
  #include <getopt.h>
  #include <syslog.h>
@@ -66,7 +71,7 @@ diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
  #include <sys/fsuid.h>
  #include <sys/vfs.h>
  #include <sys/ioctl.h>
-@@ -26,7 +25,11 @@
+@@ -27,7 +26,11 @@
  #include "9p-iov-marshal.h"
  #include "hw/9pfs/9p-proxy.h"
  #include "fsdev/9p-iov-marshal.h"
@@ -79,6 +84,3 @@ diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
  #define PROGNAME "virtfs-proxy-helper"
  
  #ifndef XFS_SUPER_MAGIC
--- 
-1.7.10.4
-
diff --git a/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch b/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
index d2c52252f6..5dfd735268 100644
--- a/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
+++ b/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
@@ -1,4 +1,4 @@
-From 4fa4aae4176ef6d8f4d4b8323d061e2433918a26 Mon Sep 17 00:00:00 2001
+From a49987d386084515610fd40f0416a9b2f216842c Mon Sep 17 00:00:00 2001
 From: Alistair Francis <alistair.francis@xilinx.com>
 Date: Wed, 17 Jan 2018 10:51:49 -0800
 Subject: [PATCH] linux-user: Fix webkitgtk hangs on 32-bit x86 target
@@ -13,15 +13,16 @@ to what it was before the problematic commit.
 
 Upstream-Status: Submitted http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg04185.html
 Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
+
 ---
  linux-user/main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/linux-user/main.c b/linux-user/main.c
-index 450eb3ce65..c7cc0a184e 100644
+index 8907a84..ea42c43 100644
 --- a/linux-user/main.c
 +++ b/linux-user/main.c
-@@ -77,7 +77,7 @@ do {                                                                    \
+@@ -79,7 +79,7 @@ do {                                                                    \
        (TARGET_LONG_BITS == 32 || defined(TARGET_ABI32))
  /* There are a number of places where we assign reserved_va to a variable
     of type abi_ulong and expect it to fit.  Avoid the last page.  */
@@ -30,6 +31,3 @@ index 450eb3ce65..c7cc0a184e 100644
  #  else
  #   define MAX_RESERVED_VA  (1ul << TARGET_VIRT_ADDR_SPACE_BITS)
  #  endif
--- 
-2.14.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/no-valgrind.patch b/meta/recipes-devtools/qemu/qemu/no-valgrind.patch
index 91f728042d..80f9ed11a6 100644
--- a/meta/recipes-devtools/qemu/qemu/no-valgrind.patch
+++ b/meta/recipes-devtools/qemu/qemu/no-valgrind.patch
@@ -1,13 +1,25 @@
+From 4210013809605e1f3d2f4655a7f686cf103cea12 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Tue, 20 Oct 2015 22:19:08 +0100
+Subject: [PATCH] qemu: disable Valgrind
+
 There isn't an option to enable or disable valgrind support, so disable it to avoid non-deterministic builds.
 
 Upstream-Status: Inappropriate
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 
+---
+ configure | 9 ---------
+ 1 file changed, 9 deletions(-)
+
 diff --git a/configure b/configure
-index b3c4f51..4d3929e 100755
+index 0a19b03..69e05fb 100755
 --- a/configure
 +++ b/configure
-@@ -4193,9 +4192,0 @@ valgrind_h=no
+@@ -4895,15 +4895,6 @@ fi
+ # check if we have valgrind/valgrind.h
+ 
+ valgrind_h=no
 -cat > $TMPC << EOF
 -#include <valgrind/valgrind.h>
 -int main(void) {
@@ -17,3 +29,6 @@ index b3c4f51..4d3929e 100755
 -if compile_prog "" "" ; then
 -    valgrind_h=yes
 -fi
+ 
+ ########################################
+ # check if environ is declared
diff --git a/meta/recipes-devtools/qemu/qemu/pathlimit.patch b/meta/recipes-devtools/qemu/qemu/pathlimit.patch
index 57ab981c61..09e98f77b4 100644
--- a/meta/recipes-devtools/qemu/qemu/pathlimit.patch
+++ b/meta/recipes-devtools/qemu/qemu/pathlimit.patch
@@ -1,3 +1,8 @@
+From a99658f1bb4bc858f67bf7032e8fe9ddd46abe66 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Wed, 9 Mar 2016 22:49:02 +0000
+Subject: [PATCH] qemu: Limit paths searched during user mode emulation
+
 By default qemu builds a complete list of directories within the user
 emulation sysroot (-L option). The OE sysroot directory is large and
 this is confusing, for example it indexes all pkgdata. In particular this
@@ -8,18 +13,22 @@ things if/as/when it needs to. This drastically reduces the files it
 reads and reduces memory usage and cleans up strace.
 
 It would also avoid the infinite directory traversal bug in [YOCTO #6996]
-although the code could still be vulnerable if it parsed those specific 
+although the code could still be vulnerable if it parsed those specific
 paths.
 
 RP
 2016/3/9
 Upstream-Status: Pending
 
-Index: qemu-2.5.0/util/path.c
-===================================================================
---- qemu-2.5.0.orig/util/path.c
-+++ qemu-2.5.0/util/path.c
-@@ -19,6 +19,7 @@ struct pathelem
+---
+ util/path.c | 44 ++++++++++++++++++++++----------------------
+ 1 file changed, 22 insertions(+), 22 deletions(-)
+
+diff --git a/util/path.c b/util/path.c
+index 7f9fc27..a416cd4 100644
+--- a/util/path.c
++++ b/util/path.c
+@@ -15,6 +15,7 @@ struct pathelem
      char *name;
      /* Full path name, eg. /usr/gnemul/x86-linux/lib. */
      char *pathname;
@@ -27,7 +36,7 @@ Index: qemu-2.5.0/util/path.c
      struct pathelem *parent;
      /* Children */
      unsigned int num_entries;
-@@ -49,6 +50,7 @@ static struct pathelem *new_entry(const
+@@ -45,6 +46,7 @@ static struct pathelem *new_entry(const char *root,
      new->name = g_strdup(name);
      new->pathname = g_strdup_printf("%s/%s", root, name);
      new->num_entries = 0;
@@ -35,7 +44,7 @@ Index: qemu-2.5.0/util/path.c
      return new;
  }
  
-@@ -57,15 +59,16 @@ static struct pathelem *new_entry(const
+@@ -53,15 +55,16 @@ static struct pathelem *new_entry(const char *root,
  /* Not all systems provide this feature */
  #if defined(DT_DIR) && defined(DT_UNKNOWN) && defined(DT_LNK)
  # define dirent_type(dirent) ((dirent)->d_type)
@@ -55,7 +64,7 @@ Index: qemu-2.5.0/util/path.c
      DIR *dir;
  
      if ((dir = opendir(path->pathname)) != NULL) {
-@@ -78,6 +81,11 @@ static struct pathelem *add_dir_maybe(st
+@@ -74,6 +77,11 @@ static struct pathelem *add_dir_maybe(struct pathelem *path)
          }
          closedir(dir);
      }
@@ -67,7 +76,7 @@ Index: qemu-2.5.0/util/path.c
      return path;
  }
  
-@@ -93,26 +101,16 @@ static struct pathelem *add_entry(struct
+@@ -89,26 +97,16 @@ static struct pathelem *add_entry(struct pathelem *root, const char *name,
      e = &root->entries[root->num_entries-1];
  
      *e = new_entry(root->pathname, root, name);
@@ -97,7 +106,7 @@ Index: qemu-2.5.0/util/path.c
  {
      unsigned int i, namelen;
  
-@@ -123,14 +121,18 @@ follow_path(const struct pathelem *curso
+@@ -119,14 +117,18 @@ follow_path(const struct pathelem *cursor, const char *name)
          return cursor->pathname;
  
      if (strneq(name, namelen, ".."))
@@ -119,7 +128,7 @@ Index: qemu-2.5.0/util/path.c
  
      /* Not found */
      return NULL;
-@@ -164,8 +166,6 @@ void init_paths(const char *prefix)
+@@ -160,8 +162,6 @@ void init_paths(const char *prefix)
          g_free(base->name);
          g_free(base);
          base = NULL;
@@ -128,7 +137,7 @@ Index: qemu-2.5.0/util/path.c
      }
  }
  
-@@ -177,5 +177,5 @@ const char *path(const char *name)
+@@ -173,5 +173,5 @@ const char *path(const char *name)
      if (!base || !name || name[0] != '/')
          return name;
  
diff --git a/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch b/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch
index c7425ab8d4..dbe28c4c7f 100644
--- a/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch
+++ b/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch
@@ -1,4 +1,8 @@
-qemu: Add addition environment space to boot loader qemu-system-mips 
+From 3c1badb861c79f673503dd08c71b3c9c9ac2a8c0 Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Fri, 28 Mar 2014 17:42:43 +0800
+Subject: [PATCH] qemu: Add addition environment space to boot loader
+ qemu-system-mips
 
 Upstream-Status: Inappropriate - OE uses deep paths
 
@@ -9,15 +13,16 @@ to only 256 bytes. This patch expands the limit.
 
 Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
 Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
 ---
- hw/mips/mips_malta.c    |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ hw/mips/mips_malta.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
-index 9d521cc..17c0391 100644
+index f6513a4..d5efafb 100644
 --- a/hw/mips/mips_malta.c
 +++ b/hw/mips/mips_malta.c
-@@ -53,7 +53,7 @@
+@@ -62,7 +62,7 @@
  
  #define ENVP_ADDR		0x80002000l
  #define ENVP_NB_ENTRIES	 	16
@@ -26,6 +31,3 @@ index 9d521cc..17c0391 100644
  
  /* Hardware addresses */
  #define FLASH_ADDRESS 0x1e000000ULL
--- 
-1.7.10.4
-
diff --git a/meta/recipes-devtools/qemu/qemu/wacom.patch b/meta/recipes-devtools/qemu/qemu/wacom.patch
index cd06aa4ac6..90e4b800b5 100644
--- a/meta/recipes-devtools/qemu/qemu/wacom.patch
+++ b/meta/recipes-devtools/qemu/qemu/wacom.patch
@@ -1,19 +1,27 @@
+From 41603f745caaecdc7c9d760fb7d2df01ccc60128 Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Thu, 27 Nov 2014 14:04:29 +0000
+Subject: [PATCH] qemu: Add missing wacom HID descriptor
+
 The USB wacom device is missing a HID descriptor which causes it
 to fail to operate with recent kernels (e.g. 3.17).
 
-This patch adds a HID desriptor to the device, based upon one from 
+This patch adds a HID desriptor to the device, based upon one from
 real wcom device.
 
 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
 
 Upstream-Status: Submitted
 2014/11/27
+---
+ hw/usb/dev-wacom.c | 94 +++++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 93 insertions(+), 1 deletion(-)
 
-Index: qemu-2.1.0/hw/usb/dev-wacom.c
-===================================================================
---- qemu-2.1.0.orig/hw/usb/dev-wacom.c	2014-08-01 15:12:17.000000000 +0100
-+++ qemu-2.1.0/hw/usb/dev-wacom.c	2014-10-12 12:13:30.540306042 +0100
-@@ -68,6 +68,89 @@
+diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c
+index bf70013059..2f6e129732 100644
+--- a/hw/usb/dev-wacom.c
++++ b/hw/usb/dev-wacom.c
+@@ -72,6 +72,89 @@ static const USBDescStrings desc_strings = {
      [STR_SERIALNUMBER]     = "1",
  };
  
@@ -103,7 +111,7 @@ Index: qemu-2.1.0/hw/usb/dev-wacom.c
  static const USBDescIface desc_iface_wacom = {
      .bInterfaceNumber              = 0,
      .bNumEndpoints                 = 1,
-@@ -85,7 +168,7 @@
+@@ -89,7 +172,7 @@ static const USBDescIface desc_iface_wacom = {
                  0x00,          /*  u8  country_code */
                  0x01,          /*  u8  num_descriptors */
                  0x22,          /*  u8  type: Report */
@@ -112,7 +120,7 @@ Index: qemu-2.1.0/hw/usb/dev-wacom.c
              },
          },
      },
-@@ -265,6 +350,15 @@
+@@ -269,6 +352,15 @@ static void usb_wacom_handle_control(USBDevice *dev, USBPacket *p,
      }
  
      switch (request) {
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCHv2 4/5] qemu: add PACKAGECONFIG for virglrenderer, sdl2, usb-redir and spice
  2018-05-11 19:20     ` [PATCHv2 1/5] libsdl2: allow to build native and nativesdk Martin Jansa
  2018-05-11 19:21       ` [PATCHv2 2/5] qemu: upgrade to 2.12.0 Martin Jansa
  2018-05-11 19:21       ` [PATCHv2 3/5] qemu: refresh patches with devtool Martin Jansa
@ 2018-05-11 19:21       ` Martin Jansa
  2018-05-13 20:05         ` Burton, Ross
  2018-05-11 19:21       ` [PATCHv2 5/5] qemu: use sdl2 instead of sdl1 Martin Jansa
  2018-05-11 23:20       ` [PATCHv2 1/5] libsdl2: allow to build native and nativesdk Alistair Francis
  4 siblings, 1 reply; 29+ messages in thread
From: Martin Jansa @ 2018-05-11 19:21 UTC (permalink / raw)
  To: openembedded-core

* drop "fdt sdl" listed twice in PACKAGECONFIG
* sdl2 when selected needs sdl as well and will depend on both libsdl
  and libsdl
* keep all 4 disabled by default
* spice, usbredir recipes will eventually be in meta-networking layer
  (you can use jansa/spice branch from meta-openembedded-contrib repository)
* virglrenderer recipe will eventually be in oe-core layer
  (you can use jansa/qemu branch from openembedded-core-contrib repository)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-devtools/qemu/qemu.inc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index dc73df813a..9010a04792 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -74,7 +74,6 @@ do_install_append() {
 # END of qemu-mips workaround
 
 PACKAGECONFIG ??= " \
-	fdt sdl \
 	fdt sdl kvm \
 	${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
 	"
@@ -89,6 +88,7 @@ PACKAGECONFIG_remove_darwin = "kvm"
 PACKAGECONFIG_remove_mingw32 = "kvm"
 
 PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl"
+PACKAGECONFIG[sdl2] = "--with-sdlabi=2.0,--with-sdlabi=1.2,libsdl2"
 PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap attr,"
 PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio,"
 PACKAGECONFIG[xfs] = "--enable-xfsctl,--disable-xfsctl,xfsprogs,"
@@ -115,5 +115,10 @@ PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
 PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,${BLUEZ}"
 PACKAGECONFIG[libiscsi] = "--enable-libiscsi,--disable-libiscsi"
 PACKAGECONFIG[kvm] = "--enable-kvm,--disable-kvm"
+PACKAGECONFIG[virglrenderer] = "--enable-virglrenderer,--disable-virglrenderer,virglrenderer"
+# spice will be in meta-networking layer
+PACKAGECONFIG[spice] = "--enable-spice,--disable-spice,spice"
+# usbredir will be in meta-networking layer
+PACKAGECONFIG[usb-redir] = "--enable-usb-redir,--disable-usb-redir,usbredir"
 
 INSANE_SKIP_${PN} = "arch"
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCHv2 5/5] qemu: use sdl2 instead of sdl1
  2018-05-11 19:20     ` [PATCHv2 1/5] libsdl2: allow to build native and nativesdk Martin Jansa
                         ` (2 preceding siblings ...)
  2018-05-11 19:21       ` [PATCHv2 4/5] qemu: add PACKAGECONFIG for virglrenderer, sdl2, usb-redir and spice Martin Jansa
@ 2018-05-11 19:21       ` Martin Jansa
  2018-05-11 23:22         ` Alistair Francis
  2018-05-11 23:20       ` [PATCHv2 1/5] libsdl2: allow to build native and nativesdk Alistair Francis
  4 siblings, 1 reply; 29+ messages in thread
From: Martin Jansa @ 2018-05-11 19:21 UTC (permalink / raw)
  To: openembedded-core

* sdl1 since qemu-2.12.0 depends on x11 in DISTRO_FEATURES, switch to sdl2

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-devtools/qemu/qemu.inc | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 9010a04792..8169e55e69 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -74,11 +74,11 @@ do_install_append() {
 # END of qemu-mips workaround
 
 PACKAGECONFIG ??= " \
-	fdt sdl kvm \
-	${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
-	"
-PACKAGECONFIG_class-native ??= "fdt alsa kvm"
-PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm"
+    fdt sdl sdl2 kvm \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
+"
+PACKAGECONFIG_class-native ??= "fdt sdl sdl2 alsa kvm"
+PACKAGECONFIG_class-nativesdk ??= "fdt sdl sdl2 kvm"
 
 # Handle distros such as CentOS 5 32-bit that do not have kvm support
 PACKAGECONFIG_class-native_remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}"
@@ -87,6 +87,9 @@ PACKAGECONFIG_class-native_remove = "${@'kvm' if not os.path.exists('/usr/includ
 PACKAGECONFIG_remove_darwin = "kvm"
 PACKAGECONFIG_remove_mingw32 = "kvm"
 
+# sdl1 can be used only together with x11 in DISTRO_FEATURES, because since:
+# https://github.com/qemu/qemu/commit/2ec78706d188df7d3dab43d07b19b05ef7800a44
+# it explicitly includes X11/Xlib.h for all gtk, sdl1 UI backends
 PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl"
 PACKAGECONFIG[sdl2] = "--with-sdlabi=2.0,--with-sdlabi=1.2,libsdl2"
 PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap attr,"
-- 
2.17.0



^ permalink raw reply related	[flat|nested] 29+ messages in thread

* Re: [PATCHv2 2/5] qemu: upgrade to 2.12.0
  2018-05-11 19:21       ` [PATCHv2 2/5] qemu: upgrade to 2.12.0 Martin Jansa
@ 2018-05-11 23:17         ` Alistair Francis
  0 siblings, 0 replies; 29+ messages in thread
From: Alistair Francis @ 2018-05-11 23:17 UTC (permalink / raw)
  To: Martin Jansa; +Cc: OE-core

On Fri, May 11, 2018 at 12:21 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> From: Martin Jansa <martin.jansa@gmail.com>
>
> * drop patches which are now included upstream
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> Signed-off-by: Ross Burton <ross.burton@intel.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  meta/conf/distro/include/tcmode-default.inc   |  2 +-
>  ...4-treat-DISAS_UPDATE-as-variant-of-D.patch | 67 -------------------
>  ...-connect-socket-to-a-spawned-command.patch | 52 +++++++-------
>  ...2Queue-pointers-in-post_load-routine.patch | 63 -----------------
>  .../qemu/qemu/disable-grabs.patch             | 43 ++++++------
>  meta/recipes-devtools/qemu/qemu/memfd.patch   | 57 ----------------
>  .../qemu/qemu/qemu-2.5.0-cflags.patch         | 15 ++++-
>  .../qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}   |  7 +-
>  8 files changed, 65 insertions(+), 241 deletions(-)
>  delete mode 100644 meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>  delete mode 100644 meta/recipes-devtools/qemu/qemu/check-PS2Queue-pointers-in-post_load-routine.patch
>  delete mode 100644 meta/recipes-devtools/qemu/qemu/memfd.patch
>  rename meta/recipes-devtools/qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb} (84%)
>
> diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc
> index b197819e9e..5271b41860 100644
> --- a/meta/conf/distro/include/tcmode-default.inc
> +++ b/meta/conf/distro/include/tcmode-default.inc
> @@ -28,7 +28,7 @@ BINUVERSION ?= "2.30%"
>  GDBVERSION ?= "8.1%"
>  GLIBCVERSION ?= "2.27%"
>  LINUXLIBCVERSION ?= "4.15%"
> -QEMUVERSION ?= "2.11%"
> +QEMUVERSION ?= "2.12%"
>
>  PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
>  PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
> diff --git a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch b/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
> deleted file mode 100644
> index f90cae694c..0000000000
> --- a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
> +++ /dev/null
> @@ -1,67 +0,0 @@
> -From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00 2001
> -From: Victor Kamensky <kamensky@cisco.com>
> -Date: Fri, 23 Mar 2018 18:26:45 +0000
> -Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of
> - DISAS_EXIT
> -MIME-Version: 1.0
> -Content-Type: text/plain; charset=UTF-8
> -Content-Transfer-Encoding: 8bit
> -
> -In OE project 4.15 linux kernel boot hang was observed under
> -single cpu aarch64 qemu. Kernel code was in a loop waiting for
> -vtimer arrival, spinning in TC generated blocks, while interrupt
> -was pending unprocessed. This happened because when qemu tried to
> -handle vtimer interrupt target had interrupts disabled, as
> -result flag indicating TCG exit, cpu->icount_decr.u16.high,
> -was cleared but arm_cpu_exec_interrupt function did not call
> -arm_cpu_do_interrupt to process interrupt. Later when target
> -reenabled interrupts, it happened without exit into main loop, so
> -following code that waited for result of interrupt execution
> -run in infinite loop.
> -
> -To solve the problem instructions that operate on CPU sys state
> -(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
> -should be considered as DISAS_EXIT variant, and should be
> -forced to exit back to main loop so qemu will have a chance
> -processing pending CPU state updates, including pending
> -interrupts.
> -
> -This change brings consistency with how DISAS_UPDATE is treated
> -in aarch32 case.
> -
> -CC: Peter Maydell <peter.maydell@linaro.org>
> -CC: Alex Bennée <alex.bennee@linaro.org>
> -CC: qemu-stable@nongnu.org
> -Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> -Signed-off-by: Victor Kamensky <kamensky@cisco.com>
> -Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> -Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
> -Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> -Upstream-Status: Backport
> ----
> - target/arm/translate-a64.c | 6 +++---
> - 1 file changed, 3 insertions(+), 3 deletions(-)
> -
> -diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
> -index 31ff047..327513e 100644
> ---- a/target/arm/translate-a64.c
> -+++ b/target/arm/translate-a64.c
> -@@ -13378,12 +13378,12 @@ static void aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
> -         case DISAS_UPDATE:
> -             gen_a64_set_pc_im(dc->pc);
> -             /* fall through */
> --        case DISAS_JUMP:
> --            tcg_gen_lookup_and_goto_ptr();
> --            break;
> -         case DISAS_EXIT:
> -             tcg_gen_exit_tb(0);
> -             break;
> -+        case DISAS_JUMP:
> -+            tcg_gen_lookup_and_goto_ptr();
> -+            break;
> -         case DISAS_NORETURN:
> -         case DISAS_SWI:
> -             break;
> ---
> -2.7.4
> -
> diff --git a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> index 6e6bf95c18..f1cf53a8c5 100644
> --- a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> +++ b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> @@ -1,4 +1,4 @@
> -From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00 2001
> +From a7690b02df70e0d3957e6eaa1e1cf92595839fbb Mon Sep 17 00:00:00 2001
>  From: Alistair Francis <alistair.francis@xilinx.com>
>  Date: Thu, 21 Dec 2017 11:35:16 -0800
>  Subject: [PATCH] chardev: connect socket to a spawned command
> @@ -45,16 +45,16 @@ Upstream-Status: Inappropriate [embedded specific]
>
>  Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
>  ---
> - chardev/char-socket.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++---
> - chardev/char.c        |  3 ++
> - qapi/char.json        |  5 +++
> - 3 files changed, 90 insertions(+), 4 deletions(-)
> + chardev/char-socket.c | 102 ++++++++++++++++++++++++++++++++++++++++++
> + chardev/char.c        |   3 ++
> + qapi/char.json        |   5 +++
> + 3 files changed, 110 insertions(+)
>
>  diff --git a/chardev/char-socket.c b/chardev/char-socket.c
> -index 53eda8ef00..f566107c35 100644
> +index 159e69c3b1..84778cf31a 100644
>  --- a/chardev/char-socket.c
>  +++ b/chardev/char-socket.c
> -@@ -852,6 +852,68 @@ static gboolean socket_reconnect_timeout(gpointer opaque)
> +@@ -934,6 +934,68 @@ static gboolean socket_reconnect_timeout(gpointer opaque)
>       return false;
>   }
>
> @@ -123,7 +123,7 @@ index 53eda8ef00..f566107c35 100644
>   static void qmp_chardev_open_socket(Chardev *chr,
>                                       ChardevBackend *backend,
>                                       bool *be_opened,
> -@@ -859,6 +921,9 @@
> +@@ -941,6 +1003,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
>   {
>       SocketChardev *s = SOCKET_CHARDEV(chr);
>       ChardevSocket *sock = backend->u.socket.data;
> @@ -133,11 +133,10 @@ index 53eda8ef00..f566107c35 100644
>       bool do_nodelay     = sock->has_nodelay ? sock->nodelay : false;
>       bool is_listen      = sock->has_server  ? sock->server  : true;
>       bool is_telnet      = sock->has_telnet  ? sock->telnet  : false;
> -@@ -925,7 +990,14 @@
> -     } else if (reconnect > 0) {
> +@@ -1008,6 +1073,14 @@ static void qmp_chardev_open_socket(Chardev *chr,
>           s->reconnect_time = reconnect;
>       }
> --
> +
>  +#ifndef _WIN32
>  +    if (cmd) {
>  +        chardev_open_socket_cmd(chr, cmd, errp);
> @@ -146,12 +145,12 @@ index 53eda8ef00..f566107c35 100644
>  +        *be_opened = true;
>  +    } else
>  +#endif
> -     if (s->reconnect_time) {
> -         sioc = qio_channel_socket_new();
> -         tcp_chr_set_client_ioc_name(chr, sioc);
> -@@ -985,10 +1057,26 @@
> -     const char *host = qemu_opt_get(opts, "host");
> +     /* If reconnect_time is set, will do that in chr_machine_done. */
> +     if (!s->reconnect_time) {
> +         if (s->is_listen) {
> +@@ -1065,9 +1138,26 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
>       const char *port = qemu_opt_get(opts, "port");
> +     const char *fd = qemu_opt_get(opts, "fd");
>       const char *tls_creds = qemu_opt_get(opts, "tls-creds");
>  +#ifndef _WIN32
>  +    const char *cmd = qemu_opt_get(opts, "cmd");
> @@ -159,7 +158,6 @@ index 53eda8ef00..f566107c35 100644
>       SocketAddressLegacy *addr;
>       ChardevSocket *sock;
>
> -     backend->type = CHARDEV_BACKEND_KIND_SOCKET;
>  +#ifndef _WIN32
>  +    if (cmd) {
>  +        /*
> @@ -173,17 +171,18 @@ index 53eda8ef00..f566107c35 100644
>  +        }
>  +    } else
>  +#endif
> -     if (!path) {
> -         if (!host) {
> -             error_setg(errp, "chardev: socket: no host given");
> -@@ -1021,13 +1109,24 @@
> -     sock->has_reconnect = true;
> ++
> +     if ((!!path + !!fd + !!host) != 1) {
> +         error_setg(errp,
> +                    "Exactly one of 'path', 'fd' or 'host' required");
> +@@ -1112,12 +1202,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
>       sock->reconnect = reconnect;
>       sock->tls_creds = g_strdup(tls_creds);
> +
>  +#ifndef _WIN32
>  +    sock->cmd = g_strdup(cmd);
>  +#endif
> -
> ++
>       addr = g_new0(SocketAddressLegacy, 1);
>  +#ifndef _WIN32
>  +    if (path || cmd) {
> @@ -198,11 +197,11 @@ index 53eda8ef00..f566107c35 100644
>  +#else
>           q_unix->path = g_strdup(path);
>  +#endif
> -     } else {
> +     } else if (host) {
>           addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
>           addr->u.inet.data = g_new(InetSocketAddress, 1);
>  diff --git a/chardev/char.c b/chardev/char.c
> -index 2ae4f465ec..5d52cd5de5 100644
> +index 76d866e6fe..9747d51d7c 100644
>  --- a/chardev/char.c
>  +++ b/chardev/char.c
>  @@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
> @@ -239,4 +238,5 @@ index ae19dcd1ed..6de0f29bcd 100644
>                                        '*server'    : 'bool',
>                                        '*wait'      : 'bool',
>  --
> -2.14.1
> +2.17.0
> +
> diff --git a/meta/recipes-devtools/qemu/qemu/check-PS2Queue-pointers-in-post_load-routine.patch b/meta/recipes-devtools/qemu/qemu/check-PS2Queue-pointers-in-post_load-routine.patch
> deleted file mode 100644
> index f8d7f66ace..0000000000
> --- a/meta/recipes-devtools/qemu/qemu/check-PS2Queue-pointers-in-post_load-routine.patch
> +++ /dev/null
> @@ -1,63 +0,0 @@
> -From ee9a17d0e12143971a9676227cce953c0dbe52fb Mon Sep 17 00:00:00 2001
> -From: Prasad J Pandit <pjp@fedoraproject.org>
> -Date: Thu, 16 Nov 2017 13:21:55 +0530
> -Subject: [PATCH] ps2: check PS2Queue pointers in post_load routine
> -
> -During Qemu guest migration, a destination process invokes ps2
> -post_load function. In that, if 'rptr' and 'count' values were
> -invalid, it could lead to OOB access or infinite loop issue.
> -Add check to avoid it.
> -
> -Reported-by: Cyrille Chatras <cyrille.chatras@orange.com>
> -Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
> -Message-id: 20171116075155.22378-1-ppandit@redhat.com
> -Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> -
> -CVE: CVE-2017-16845
> -Upstream-Status: Backport
> -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ----
> - hw/input/ps2.c | 21 +++++++++------------
> - 1 file changed, 9 insertions(+), 12 deletions(-)
> -
> -diff --git a/hw/input/ps2.c b/hw/input/ps2.c
> -index f388a23..de171a2 100644
> ---- a/hw/input/ps2.c
> -+++ b/hw/input/ps2.c
> -@@ -1225,24 +1225,21 @@ static void ps2_common_reset(PS2State *s)
> - static void ps2_common_post_load(PS2State *s)
> - {
> -     PS2Queue *q = &s->queue;
> --    int size;
> --    int i;
> --    int tmp_data[PS2_QUEUE_SIZE];
> -+    uint8_t i, size;
> -+    uint8_t tmp_data[PS2_QUEUE_SIZE];
> -
> -     /* set the useful data buffer queue size, < PS2_QUEUE_SIZE */
> --    size = q->count > PS2_QUEUE_SIZE ? 0 : q->count;
> -+    size = (q->count < 0 || q->count > PS2_QUEUE_SIZE) ? 0 : q->count;
> -
> -     /* move the queue elements to the start of data array */
> --    if (size > 0) {
> --        for (i = 0; i < size; i++) {
> --            /* move the queue elements to the temporary buffer */
> --            tmp_data[i] = q->data[q->rptr];
> --            if (++q->rptr == 256) {
> --                q->rptr = 0;
> --            }
> -+    for (i = 0; i < size; i++) {
> -+        if (q->rptr < 0 || q->rptr >= sizeof(q->data)) {
> -+            q->rptr = 0;
> -         }
> --        memcpy(q->data, tmp_data, size);
> -+        tmp_data[i] = q->data[q->rptr++];
> -     }
> -+    memcpy(q->data, tmp_data, size);
> -+
> -     /* reset rptr/wptr/count */
> -     q->rptr = 0;
> -     q->wptr = size;
> ---
> -2.7.4
> -
> diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> index 77117890f4..e29c011a6f 100644
> --- a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> +++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> @@ -1,3 +1,11 @@
> +From a31c5c695cb716310257f1fc60a06b821e74fe7f Mon Sep 17 00:00:00 2001
> +From: Ross Burton <ross.burton@intel.com>
> +Date: Wed, 18 Sep 2013 14:04:54 +0100
> +Subject: [PATCH] sdl.c: allow user to disable pointer grabs
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
>  When the pointer enters the Qemu window it calls SDL_WM_GrabInput, which calls
>  XGrabPointer in a busyloop until it returns GrabSuccess. However if there's already
>  a pointer grab (screen is locked, a menu is open) then qemu will hang until the
> @@ -11,35 +19,30 @@ them in a conditional that can be set by the autobuilder environment, preserving
>  the current grabbing behaviour for everyone else.
>
>  Upstream-Status: Pending
> -Signed-off-by: Ross Burton <ross.burton@intel.com>
> -
> -From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00 2001
> -From: Ross Burton <ross.burton@intel.com>
> -Date: Wed, 18 Sep 2013 14:04:54 +0100
> -Subject: [PATCH] sdl.c: allow user to disable pointer grabs
> -
>  Signed-off-by: Ross Burton <ross.burton@intel.com>
>  Signed-off-by: Eric Bénard <eric@eukrea.com>
> +
>  ---
> - ui/sdl.c | 12 ++++++++++--
> - 1 file changed, 10 insertions(+), 2 deletions(-)
> + ui/sdl.c | 13 +++++++++++--
> + 1 file changed, 11 insertions(+), 2 deletions(-)
>
> -Index: qemu-2.11.1/ui/sdl.c
> -===================================================================
> ---- qemu-2.11.1.orig/ui/sdl.c
> -+++ qemu-2.11.1/ui/sdl.c
> -@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
> - static int scaling_active = 0;
> - static Notifier mouse_mode_notifier;
> - static int idle_counter;
> +diff --git a/ui/sdl.c b/ui/sdl.c
> +index a5fd503..ab8d1b1 100644
> +--- a/ui/sdl.c
> ++++ b/ui/sdl.c
> +@@ -68,6 +68,11 @@ static int idle_counter;
> + static const guint16 *keycode_map;
> + static size_t keycode_maplen;
> +
>  +#ifndef True
>  +#define True 1
>  +#endif
>  +static doing_grabs = True;
> -
> ++
>   #define SDL_REFRESH_INTERVAL_BUSY 10
>   #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
> -@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
> +                             / SDL_REFRESH_INTERVAL_BUSY + 1)
> +@@ -398,14 +403,16 @@ static void sdl_grab_start(void)
>           }
>       } else
>           sdl_hide_cursor();
> @@ -58,7 +61,7 @@ Index: qemu-2.11.1/ui/sdl.c
>       gui_grab = 0;
>       sdl_show_cursor();
>       sdl_update_caption();
> -@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
> +@@ -945,6 +952,8 @@ static void sdl1_display_init(DisplayState *ds, DisplayOptions *o)
>        * This requires SDL >= 1.2.14. */
>       setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
>
> diff --git a/meta/recipes-devtools/qemu/qemu/memfd.patch b/meta/recipes-devtools/qemu/qemu/memfd.patch
> deleted file mode 100644
> index 62e8d3800b..0000000000
> --- a/meta/recipes-devtools/qemu/qemu/memfd.patch
> +++ /dev/null
> @@ -1,57 +0,0 @@
> -Upstream-Status: Backport
> -Signed-off-by: Ross Burton <ross.burton@intel.com>
> -
> -From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001
> -From: Paolo Bonzini <pbonzini@redhat.com>
> -Date: Tue, 28 Nov 2017 11:51:27 +0100
> -Subject: [PATCH] memfd: fix configure test
> -MIME-Version: 1.0
> -Content-Type: text/plain; charset=UTF-8
> -Content-Transfer-Encoding: 8bit
> -
> -Recent glibc added memfd_create in sys/mman.h.  This conflicts with
> -the definition in util/memfd.c:
> -
> -    /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error: static declaration of memfd_create follows non-static declaration
> -
> -Fix the configure test, and remove the sys/memfd.h inclusion since the
> -file actually does not exist---it is a typo in the memfd_create(2) man
> -page.
> -
> -Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> -Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ----
> - configure    | 2 +-
> - util/memfd.c | 4 +---
> - 2 files changed, 2 insertions(+), 4 deletions(-)
> -
> -diff --git a/configure b/configure
> -index 9c8aa5a98b..99ccc1725a 100755
> ---- a/configure
> -+++ b/configure
> -@@ -3923,7 +3923,7 @@ fi
> - # check if memfd is supported
> - memfd=no
> - cat > $TMPC << EOF
> --#include <sys/memfd.h>
> -+#include <sys/mman.h>
> -
> - int main(void)
> - {
> -diff --git a/util/memfd.c b/util/memfd.c
> -index 4571d1aba8..412e94a405 100644
> ---- a/util/memfd.c
> -+++ b/util/memfd.c
> -@@ -31,9 +31,7 @@
> -
> - #include "qemu/memfd.h"
> -
> --#ifdef CONFIG_MEMFD
> --#include <sys/memfd.h>
> --#elif defined CONFIG_LINUX
> -+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
> - #include <sys/syscall.h>
> - #include <asm/unistd.h>
> -
> ---
> -2.11.0
> diff --git a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> index eb99d14639..360519f1a1 100644
> --- a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> +++ b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> @@ -1,8 +1,19 @@
> +From 6702ec74a7ba90b99efedde260c9f08b75d5516d Mon Sep 17 00:00:00 2001
> +From: Stephen Arnold <sarnold@vctlabs.com>
> +Date: Sun, 12 Jun 2016 18:09:56 -0700
> +Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some environment
> +
>  Upstream-Status: Pending
>
> +---
> + configure | 4 ----
> + 1 file changed, 4 deletions(-)
> +
> +diff --git a/configure b/configure
> +index 69e05fb..12fc3d8 100755
>  --- a/configure
>  +++ b/configure
> -@@ -4468,10 +4468,6 @@ fi
> +@@ -5413,10 +5413,6 @@ write_c_skeleton
>   if test "$gcov" = "yes" ; then
>     CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
>     LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
> @@ -12,4 +23,4 @@ Upstream-Status: Pending
>  -  CFLAGS="-O2 $CFLAGS"
>   fi
>
> - ##########################################
> + if test "$have_asan" = "yes"; then
> diff --git a/meta/recipes-devtools/qemu/qemu_2.11.1.bb b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
> similarity index 84%
> rename from meta/recipes-devtools/qemu/qemu_2.11.1.bb
> rename to meta/recipes-devtools/qemu/qemu_2.12.0.bb
> index ab82c5fe56..63590fc9eb 100644
> --- a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
> +++ b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
> @@ -20,9 +20,6 @@ SRC_URI = "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
>             file://chardev-connect-socket-to-a-spawned-command.patch \
>             file://apic-fixup-fallthrough-to-PIC.patch \
>             file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
> -           file://memfd.patch \
> -           file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
> -           file://check-PS2Queue-pointers-in-post_load-routine.patch \
>             "
>  UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
>
> @@ -32,8 +29,8 @@ SRC_URI_append_class-native = " \
>              file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
>              "
>
> -SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
> -SRC_URI[sha256sum] = "d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb"
> +SRC_URI[md5sum] = "122fd7cdf241ff7eb1e42c0b503b5d1b"
> +SRC_URI[sha256sum] = "c9f4a147bc915d24df9784affc611a115f42d24720a89210b479f1ba7a3f679c"
>
>  COMPATIBLE_HOST_mipsarchn32 = "null"
>  COMPATIBLE_HOST_mipsarchn64 = "null"
> --
> 2.17.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCHv2 3/5] qemu: refresh patches with devtool
  2018-05-11 19:21       ` [PATCHv2 3/5] qemu: refresh patches with devtool Martin Jansa
@ 2018-05-11 23:18         ` Alistair Francis
  0 siblings, 0 replies; 29+ messages in thread
From: Alistair Francis @ 2018-05-11 23:18 UTC (permalink / raw)
  To: Martin Jansa; +Cc: OE-core

On Fri, May 11, 2018 at 12:21 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> From: Martin Jansa <martin.jansa@gmail.com>
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> Signed-off-by: Ross Burton <ross.burton@intel.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  .../qemu/qemu/add-ptest-in-makefile-v10.patch | 13 ++++---
>  .../qemu/apic-fixup-fallthrough-to-PIC.patch  | 15 ++++----
>  ...pus.c-qemu_cpu_kick_thread_debugging.patch | 12 +++----
>  ...x-libcap-header-issue-on-some-distro.patch | 16 +++++----
>  ...webkitgtk-hangs-on-32-bit-x86-target.patch | 10 +++---
>  .../qemu/qemu/no-valgrind.patch               | 19 ++++++++--
>  .../qemu/qemu/pathlimit.patch                 | 35 ++++++++++++-------
>  .../qemu/qemu-enlarge-env-entry-size.patch    | 18 +++++-----
>  meta/recipes-devtools/qemu/qemu/wacom.patch   | 24 ++++++++-----
>  9 files changed, 100 insertions(+), 62 deletions(-)
>
> diff --git a/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch
> index e9639820be..3337d1c7ba 100644
> --- a/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch
> +++ b/meta/recipes-devtools/qemu/qemu/add-ptest-in-makefile-v10.patch
> @@ -1,7 +1,8 @@
> -From 4201a5791fc4798a45a9b9f881602d7bacb74ed1 Mon Sep 17 00:00:00 2001
> +From 6c01c969def7adae70d7d59a40b5640454b97bdb Mon Sep 17 00:00:00 2001
>  From: Juro Bystricky <juro.bystricky@intel.com>
>  Date: Thu, 31 Aug 2017 11:06:56 -0700
> -Subject: Add subpackage -ptest which runs all unit test cases for qemu.
> +Subject: [PATCH] Add subpackage -ptest which runs all unit test cases for
> + qemu.
>
>  Upstream-Status: Pending
>
> @@ -9,11 +10,15 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
>
>  Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
>
> +---
> + tests/Makefile.include | 8 ++++++++
> + 1 file changed, 8 insertions(+)
> +
>  diff --git a/tests/Makefile.include b/tests/Makefile.include
> -index f08b741..3d1b3e9 100644
> +index 3b9a5e3..dfbcd72 100644
>  --- a/tests/Makefile.include
>  +++ b/tests/Makefile.include
> -@@ -924,4 +924,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
> +@@ -972,4 +972,12 @@ all: $(QEMU_IOTESTS_HELPERS-y)
>   -include $(wildcard tests/*.d)
>   -include $(wildcard tests/libqos/*.d)
>
> diff --git a/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch b/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
> index d6a3522eda..8ba507c9ff 100644
> --- a/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
> +++ b/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
> @@ -1,7 +1,7 @@
> -From bef93bb81588b5323a52d2e1886f2a77b64a976b Mon Sep 17 00:00:00 2001
> +From ca247c6e7ab7a0bd7b94658a726940f10a6b0559 Mon Sep 17 00:00:00 2001
>  From: Mark Asselstine <mark.asselstine@windriver.com>
>  Date: Tue, 26 Feb 2013 11:43:28 -0500
> -Subject: [PATCH 03/18] apic: fixup fallthrough to PIC
> +Subject: [PATCH] apic: fixup fallthrough to PIC
>
>  Commit 0e21e12bb311c4c1095d0269dc2ef81196ccb60a [Don't route PIC
>  interrupts through the local APIC if the local APIC config says so.]
> @@ -24,15 +24,16 @@ serviced, is -1.
>  Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
>  Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html]
>  Signed-off-by: He Zhe <zhe.he@windriver.com>
> +
>  ---
>   hw/intc/apic.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> -Index: qemu-2.11.1/hw/intc/apic.c
> -===================================================================
> ---- qemu-2.11.1.orig/hw/intc/apic.c
> -+++ qemu-2.11.1/hw/intc/apic.c
> -@@ -591,7 +591,7 @@ int apic_accept_pic_intr(DeviceState *de
> +diff --git a/hw/intc/apic.c b/hw/intc/apic.c
> +index 6fda52b..cd72919 100644
> +--- a/hw/intc/apic.c
> ++++ b/hw/intc/apic.c
> +@@ -603,7 +603,7 @@ int apic_accept_pic_intr(DeviceState *dev)
>       APICCommonState *s = APIC(dev);
>       uint32_t lvt0;
>
> diff --git a/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch b/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch
> index 6822132541..46c82a4aea 100644
> --- a/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch
> +++ b/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_cpu_kick_thread_debugging.patch
> @@ -1,4 +1,4 @@
> -From 697a834c35d19447b7dcdb9e1d9434bc6ce17c21 Mon Sep 17 00:00:00 2001
> +From a2e3ad8e3bbdea20a4c53404674dd8ae46bd2528 Mon Sep 17 00:00:00 2001
>  From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
>  Date: Wed, 12 Aug 2015 15:11:30 -0500
>  Subject: [PATCH] cpus.c: Add error messages when qemi_cpu_kick_thread fails.
> @@ -12,6 +12,7 @@ current cpu information.
>
>  Upstream-Status: Inappropriate
>  Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
> +
>  ---
>   cpus.c         |  5 +++++
>   custom_debug.h | 24 ++++++++++++++++++++++++
> @@ -19,10 +20,10 @@ Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
>   create mode 100644 custom_debug.h
>
>  diff --git a/cpus.c b/cpus.c
> -index a822ce3..7e4786e 100644
> +index 38eba8b..b84a60a 100644
>  --- a/cpus.c
>  +++ b/cpus.c
> -@@ -1080,6 +1080,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
> +@@ -1690,6 +1690,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
>       return NULL;
>   }
>
> @@ -31,7 +32,7 @@ index a822ce3..7e4786e 100644
>   static void qemu_cpu_kick_thread(CPUState *cpu)
>   {
>   #ifndef _WIN32
> -@@ -1088,6 +1090,9 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
> +@@ -1702,6 +1704,9 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
>       err = pthread_kill(cpu->thread->thread, SIG_IPI);
>       if (err) {
>           fprintf(stderr, "qemu:%s: %s", __func__, strerror(err));
> @@ -71,6 +72,3 @@ index 0000000..f029e45
>  +
>  +      free(symbols);
>  +}
> ---
> -1.9.1
> -
> diff --git a/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch b/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
> index cee6a676ab..a5ab6c5849 100644
> --- a/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
> +++ b/meta/recipes-devtools/qemu/qemu/fix-libcap-header-issue-on-some-distro.patch
> @@ -1,4 +1,7 @@
> -fix libcap header issue on some distro
> +From ebcb35fc87ca201ce7e5d01e82d677498bd96aea Mon Sep 17 00:00:00 2001
> +From: Hongxu Jia <hongxu.jia@windriver.com>
> +Date: Tue, 12 Mar 2013 09:54:06 +0800
> +Subject: [PATCH] fix libcap header issue on some distro
>
>  1, When build qemu-native on SLED 11.2, there is an error:
>  ...
> @@ -51,14 +54,16 @@ http://patchwork.linuxtv.org/patch/12748/
>
>  Upstream-Status: Pending
>  Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> +
>  ---
> - fsdev/virtfs-proxy-helper.c |    7 +++++--
> + fsdev/virtfs-proxy-helper.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
>
>  diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
> +index 6f132c5..8329950 100644
>  --- a/fsdev/virtfs-proxy-helper.c
>  +++ b/fsdev/virtfs-proxy-helper.c
> -@@ -12,7 +12,6 @@
> +@@ -13,7 +13,6 @@
>   #include <sys/resource.h>
>   #include <getopt.h>
>   #include <syslog.h>
> @@ -66,7 +71,7 @@ diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
>   #include <sys/fsuid.h>
>   #include <sys/vfs.h>
>   #include <sys/ioctl.h>
> -@@ -26,7 +25,11 @@
> +@@ -27,7 +26,11 @@
>   #include "9p-iov-marshal.h"
>   #include "hw/9pfs/9p-proxy.h"
>   #include "fsdev/9p-iov-marshal.h"
> @@ -79,6 +84,3 @@ diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
>   #define PROGNAME "virtfs-proxy-helper"
>
>   #ifndef XFS_SUPER_MAGIC
> ---
> -1.7.10.4
> -
> diff --git a/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch b/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
> index d2c52252f6..5dfd735268 100644
> --- a/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
> +++ b/meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
> @@ -1,4 +1,4 @@
> -From 4fa4aae4176ef6d8f4d4b8323d061e2433918a26 Mon Sep 17 00:00:00 2001
> +From a49987d386084515610fd40f0416a9b2f216842c Mon Sep 17 00:00:00 2001
>  From: Alistair Francis <alistair.francis@xilinx.com>
>  Date: Wed, 17 Jan 2018 10:51:49 -0800
>  Subject: [PATCH] linux-user: Fix webkitgtk hangs on 32-bit x86 target
> @@ -13,15 +13,16 @@ to what it was before the problematic commit.
>
>  Upstream-Status: Submitted http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg04185.html
>  Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> +
>  ---
>   linux-user/main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
>  diff --git a/linux-user/main.c b/linux-user/main.c
> -index 450eb3ce65..c7cc0a184e 100644
> +index 8907a84..ea42c43 100644
>  --- a/linux-user/main.c
>  +++ b/linux-user/main.c
> -@@ -77,7 +77,7 @@ do {                                                                    \
> +@@ -79,7 +79,7 @@ do {                                                                    \
>         (TARGET_LONG_BITS == 32 || defined(TARGET_ABI32))
>   /* There are a number of places where we assign reserved_va to a variable
>      of type abi_ulong and expect it to fit.  Avoid the last page.  */
> @@ -30,6 +31,3 @@ index 450eb3ce65..c7cc0a184e 100644
>   #  else
>   #   define MAX_RESERVED_VA  (1ul << TARGET_VIRT_ADDR_SPACE_BITS)
>   #  endif
> ---
> -2.14.1
> -
> diff --git a/meta/recipes-devtools/qemu/qemu/no-valgrind.patch b/meta/recipes-devtools/qemu/qemu/no-valgrind.patch
> index 91f728042d..80f9ed11a6 100644
> --- a/meta/recipes-devtools/qemu/qemu/no-valgrind.patch
> +++ b/meta/recipes-devtools/qemu/qemu/no-valgrind.patch
> @@ -1,13 +1,25 @@
> +From 4210013809605e1f3d2f4655a7f686cf103cea12 Mon Sep 17 00:00:00 2001
> +From: Ross Burton <ross.burton@intel.com>
> +Date: Tue, 20 Oct 2015 22:19:08 +0100
> +Subject: [PATCH] qemu: disable Valgrind
> +
>  There isn't an option to enable or disable valgrind support, so disable it to avoid non-deterministic builds.
>
>  Upstream-Status: Inappropriate
>  Signed-off-by: Ross Burton <ross.burton@intel.com>
>
> +---
> + configure | 9 ---------
> + 1 file changed, 9 deletions(-)
> +
>  diff --git a/configure b/configure
> -index b3c4f51..4d3929e 100755
> +index 0a19b03..69e05fb 100755
>  --- a/configure
>  +++ b/configure
> -@@ -4193,9 +4192,0 @@ valgrind_h=no
> +@@ -4895,15 +4895,6 @@ fi
> + # check if we have valgrind/valgrind.h
> +
> + valgrind_h=no
>  -cat > $TMPC << EOF
>  -#include <valgrind/valgrind.h>
>  -int main(void) {
> @@ -17,3 +29,6 @@ index b3c4f51..4d3929e 100755
>  -if compile_prog "" "" ; then
>  -    valgrind_h=yes
>  -fi
> +
> + ########################################
> + # check if environ is declared
> diff --git a/meta/recipes-devtools/qemu/qemu/pathlimit.patch b/meta/recipes-devtools/qemu/qemu/pathlimit.patch
> index 57ab981c61..09e98f77b4 100644
> --- a/meta/recipes-devtools/qemu/qemu/pathlimit.patch
> +++ b/meta/recipes-devtools/qemu/qemu/pathlimit.patch
> @@ -1,3 +1,8 @@
> +From a99658f1bb4bc858f67bf7032e8fe9ddd46abe66 Mon Sep 17 00:00:00 2001
> +From: Richard Purdie <richard.purdie@linuxfoundation.org>
> +Date: Wed, 9 Mar 2016 22:49:02 +0000
> +Subject: [PATCH] qemu: Limit paths searched during user mode emulation
> +
>  By default qemu builds a complete list of directories within the user
>  emulation sysroot (-L option). The OE sysroot directory is large and
>  this is confusing, for example it indexes all pkgdata. In particular this
> @@ -8,18 +13,22 @@ things if/as/when it needs to. This drastically reduces the files it
>  reads and reduces memory usage and cleans up strace.
>
>  It would also avoid the infinite directory traversal bug in [YOCTO #6996]
> -although the code could still be vulnerable if it parsed those specific
> +although the code could still be vulnerable if it parsed those specific
>  paths.
>
>  RP
>  2016/3/9
>  Upstream-Status: Pending
>
> -Index: qemu-2.5.0/util/path.c
> -===================================================================
> ---- qemu-2.5.0.orig/util/path.c
> -+++ qemu-2.5.0/util/path.c
> -@@ -19,6 +19,7 @@ struct pathelem
> +---
> + util/path.c | 44 ++++++++++++++++++++++----------------------
> + 1 file changed, 22 insertions(+), 22 deletions(-)
> +
> +diff --git a/util/path.c b/util/path.c
> +index 7f9fc27..a416cd4 100644
> +--- a/util/path.c
> ++++ b/util/path.c
> +@@ -15,6 +15,7 @@ struct pathelem
>       char *name;
>       /* Full path name, eg. /usr/gnemul/x86-linux/lib. */
>       char *pathname;
> @@ -27,7 +36,7 @@ Index: qemu-2.5.0/util/path.c
>       struct pathelem *parent;
>       /* Children */
>       unsigned int num_entries;
> -@@ -49,6 +50,7 @@ static struct pathelem *new_entry(const
> +@@ -45,6 +46,7 @@ static struct pathelem *new_entry(const char *root,
>       new->name = g_strdup(name);
>       new->pathname = g_strdup_printf("%s/%s", root, name);
>       new->num_entries = 0;
> @@ -35,7 +44,7 @@ Index: qemu-2.5.0/util/path.c
>       return new;
>   }
>
> -@@ -57,15 +59,16 @@ static struct pathelem *new_entry(const
> +@@ -53,15 +55,16 @@ static struct pathelem *new_entry(const char *root,
>   /* Not all systems provide this feature */
>   #if defined(DT_DIR) && defined(DT_UNKNOWN) && defined(DT_LNK)
>   # define dirent_type(dirent) ((dirent)->d_type)
> @@ -55,7 +64,7 @@ Index: qemu-2.5.0/util/path.c
>       DIR *dir;
>
>       if ((dir = opendir(path->pathname)) != NULL) {
> -@@ -78,6 +81,11 @@ static struct pathelem *add_dir_maybe(st
> +@@ -74,6 +77,11 @@ static struct pathelem *add_dir_maybe(struct pathelem *path)
>           }
>           closedir(dir);
>       }
> @@ -67,7 +76,7 @@ Index: qemu-2.5.0/util/path.c
>       return path;
>   }
>
> -@@ -93,26 +101,16 @@ static struct pathelem *add_entry(struct
> +@@ -89,26 +97,16 @@ static struct pathelem *add_entry(struct pathelem *root, const char *name,
>       e = &root->entries[root->num_entries-1];
>
>       *e = new_entry(root->pathname, root, name);
> @@ -97,7 +106,7 @@ Index: qemu-2.5.0/util/path.c
>   {
>       unsigned int i, namelen;
>
> -@@ -123,14 +121,18 @@ follow_path(const struct pathelem *curso
> +@@ -119,14 +117,18 @@ follow_path(const struct pathelem *cursor, const char *name)
>           return cursor->pathname;
>
>       if (strneq(name, namelen, ".."))
> @@ -119,7 +128,7 @@ Index: qemu-2.5.0/util/path.c
>
>       /* Not found */
>       return NULL;
> -@@ -164,8 +166,6 @@ void init_paths(const char *prefix)
> +@@ -160,8 +162,6 @@ void init_paths(const char *prefix)
>           g_free(base->name);
>           g_free(base);
>           base = NULL;
> @@ -128,7 +137,7 @@ Index: qemu-2.5.0/util/path.c
>       }
>   }
>
> -@@ -177,5 +177,5 @@ const char *path(const char *name)
> +@@ -173,5 +173,5 @@ const char *path(const char *name)
>       if (!base || !name || name[0] != '/')
>           return name;
>
> diff --git a/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch b/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch
> index c7425ab8d4..dbe28c4c7f 100644
> --- a/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch
> +++ b/meta/recipes-devtools/qemu/qemu/qemu-enlarge-env-entry-size.patch
> @@ -1,4 +1,8 @@
> -qemu: Add addition environment space to boot loader qemu-system-mips
> +From 3c1badb861c79f673503dd08c71b3c9c9ac2a8c0 Mon Sep 17 00:00:00 2001
> +From: Jason Wessel <jason.wessel@windriver.com>
> +Date: Fri, 28 Mar 2014 17:42:43 +0800
> +Subject: [PATCH] qemu: Add addition environment space to boot loader
> + qemu-system-mips
>
>  Upstream-Status: Inappropriate - OE uses deep paths
>
> @@ -9,15 +13,16 @@ to only 256 bytes. This patch expands the limit.
>
>  Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
>  Signed-off-by: Roy Li <rongqing.li@windriver.com>
> +
>  ---
> - hw/mips/mips_malta.c    |    2 +-
> - 1 files changed, 1 insertions(+), 1 deletions(-)
> + hw/mips/mips_malta.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
>
>  diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
> -index 9d521cc..17c0391 100644
> +index f6513a4..d5efafb 100644
>  --- a/hw/mips/mips_malta.c
>  +++ b/hw/mips/mips_malta.c
> -@@ -53,7 +53,7 @@
> +@@ -62,7 +62,7 @@
>
>   #define ENVP_ADDR             0x80002000l
>   #define ENVP_NB_ENTRIES               16
> @@ -26,6 +31,3 @@ index 9d521cc..17c0391 100644
>
>   /* Hardware addresses */
>   #define FLASH_ADDRESS 0x1e000000ULL
> ---
> -1.7.10.4
> -
> diff --git a/meta/recipes-devtools/qemu/qemu/wacom.patch b/meta/recipes-devtools/qemu/qemu/wacom.patch
> index cd06aa4ac6..90e4b800b5 100644
> --- a/meta/recipes-devtools/qemu/qemu/wacom.patch
> +++ b/meta/recipes-devtools/qemu/qemu/wacom.patch
> @@ -1,19 +1,27 @@
> +From 41603f745caaecdc7c9d760fb7d2df01ccc60128 Mon Sep 17 00:00:00 2001
> +From: Richard Purdie <richard.purdie@linuxfoundation.org>
> +Date: Thu, 27 Nov 2014 14:04:29 +0000
> +Subject: [PATCH] qemu: Add missing wacom HID descriptor
> +
>  The USB wacom device is missing a HID descriptor which causes it
>  to fail to operate with recent kernels (e.g. 3.17).
>
> -This patch adds a HID desriptor to the device, based upon one from
> +This patch adds a HID desriptor to the device, based upon one from
>  real wcom device.
>
>  Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
>  Upstream-Status: Submitted
>  2014/11/27
> +---
> + hw/usb/dev-wacom.c | 94 +++++++++++++++++++++++++++++++++++++++++++++-
> + 1 file changed, 93 insertions(+), 1 deletion(-)
>
> -Index: qemu-2.1.0/hw/usb/dev-wacom.c
> -===================================================================
> ---- qemu-2.1.0.orig/hw/usb/dev-wacom.c 2014-08-01 15:12:17.000000000 +0100
> -+++ qemu-2.1.0/hw/usb/dev-wacom.c      2014-10-12 12:13:30.540306042 +0100
> -@@ -68,6 +68,89 @@
> +diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c
> +index bf70013059..2f6e129732 100644
> +--- a/hw/usb/dev-wacom.c
> ++++ b/hw/usb/dev-wacom.c
> +@@ -72,6 +72,89 @@ static const USBDescStrings desc_strings = {
>       [STR_SERIALNUMBER]     = "1",
>   };
>
> @@ -103,7 +111,7 @@ Index: qemu-2.1.0/hw/usb/dev-wacom.c
>   static const USBDescIface desc_iface_wacom = {
>       .bInterfaceNumber              = 0,
>       .bNumEndpoints                 = 1,
> -@@ -85,7 +168,7 @@
> +@@ -89,7 +172,7 @@ static const USBDescIface desc_iface_wacom = {
>                   0x00,          /*  u8  country_code */
>                   0x01,          /*  u8  num_descriptors */
>                   0x22,          /*  u8  type: Report */
> @@ -112,7 +120,7 @@ Index: qemu-2.1.0/hw/usb/dev-wacom.c
>               },
>           },
>       },
> -@@ -265,6 +350,15 @@
> +@@ -269,6 +352,15 @@ static void usb_wacom_handle_control(USBDevice *dev, USBPacket *p,
>       }
>
>       switch (request) {
> --
> 2.17.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCHv2 1/5] libsdl2: allow to build native and nativesdk
  2018-05-11 19:20     ` [PATCHv2 1/5] libsdl2: allow to build native and nativesdk Martin Jansa
                         ` (3 preceding siblings ...)
  2018-05-11 19:21       ` [PATCHv2 5/5] qemu: use sdl2 instead of sdl1 Martin Jansa
@ 2018-05-11 23:20       ` Alistair Francis
  4 siblings, 0 replies; 29+ messages in thread
From: Alistair Francis @ 2018-05-11 23:20 UTC (permalink / raw)
  To: Martin Jansa; +Cc: OE-core

On Fri, May 11, 2018 at 12:20 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> * enable x11 in native builds
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb
> index c0cf70d7fd..c37f669321 100644
> --- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb
> +++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb
> @@ -37,6 +37,8 @@ EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
>  # and BSP layers to pick either (desktop) opengl, gles2, or no GL
>  PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
>
> +PACKAGECONFIG_class-native = "x11"
> +PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
>  PACKAGECONFIG ??= " \
>      ${PACKAGECONFIG_GL} \
>      ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
> @@ -63,3 +65,5 @@ do_configure_prepend() {
>  }
>
>  FILES_${PN}-dev += "${libdir}/cmake"
> +
> +BBCLASSEXTEND = "native nativesdk"
> --
> 2.17.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCHv2 5/5] qemu: use sdl2 instead of sdl1
  2018-05-11 19:21       ` [PATCHv2 5/5] qemu: use sdl2 instead of sdl1 Martin Jansa
@ 2018-05-11 23:22         ` Alistair Francis
  0 siblings, 0 replies; 29+ messages in thread
From: Alistair Francis @ 2018-05-11 23:22 UTC (permalink / raw)
  To: Martin Jansa; +Cc: OE-core

On Fri, May 11, 2018 at 12:21 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> * sdl1 since qemu-2.12.0 depends on x11 in DISTRO_FEATURES, switch to sdl2
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  meta/recipes-devtools/qemu/qemu.inc | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
> index 9010a04792..8169e55e69 100644
> --- a/meta/recipes-devtools/qemu/qemu.inc
> +++ b/meta/recipes-devtools/qemu/qemu.inc
> @@ -74,11 +74,11 @@ do_install_append() {
>  # END of qemu-mips workaround
>
>  PACKAGECONFIG ??= " \
> -       fdt sdl kvm \
> -       ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
> -       "
> -PACKAGECONFIG_class-native ??= "fdt alsa kvm"
> -PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm"
> +    fdt sdl sdl2 kvm \
> +    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
> +"
> +PACKAGECONFIG_class-native ??= "fdt sdl sdl2 alsa kvm"
> +PACKAGECONFIG_class-nativesdk ??= "fdt sdl sdl2 kvm"
>
>  # Handle distros such as CentOS 5 32-bit that do not have kvm support
>  PACKAGECONFIG_class-native_remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}"
> @@ -87,6 +87,9 @@ PACKAGECONFIG_class-native_remove = "${@'kvm' if not os.path.exists('/usr/includ
>  PACKAGECONFIG_remove_darwin = "kvm"
>  PACKAGECONFIG_remove_mingw32 = "kvm"
>
> +# sdl1 can be used only together with x11 in DISTRO_FEATURES, because since:
> +# https://github.com/qemu/qemu/commit/2ec78706d188df7d3dab43d07b19b05ef7800a44
> +# it explicitly includes X11/Xlib.h for all gtk, sdl1 UI backends
>  PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl"
>  PACKAGECONFIG[sdl2] = "--with-sdlabi=2.0,--with-sdlabi=1.2,libsdl2"
>  PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap attr,"
> --
> 2.17.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCHv2 4/5] qemu: add PACKAGECONFIG for virglrenderer, sdl2, usb-redir and spice
  2018-05-11 19:21       ` [PATCHv2 4/5] qemu: add PACKAGECONFIG for virglrenderer, sdl2, usb-redir and spice Martin Jansa
@ 2018-05-13 20:05         ` Burton, Ross
  2018-05-14 16:12           ` Martin Jansa
  0 siblings, 1 reply; 29+ messages in thread
From: Burton, Ross @ 2018-05-13 20:05 UTC (permalink / raw)
  To: Martin Jansa; +Cc: OE-core

On 11 May 2018 at 20:21, Martin Jansa <martin.jansa@gmail.com> wrote:
> * sdl2 when selected needs sdl as well and will depend on both libsdl
>   and libsdl

Is that a limitation of the qemu build, or just how the configure
options work?  Doesn't seem great to need both!

Ross


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCHv2 4/5] qemu: add PACKAGECONFIG for virglrenderer, sdl2, usb-redir and spice
  2018-05-13 20:05         ` Burton, Ross
@ 2018-05-14 16:12           ` Martin Jansa
  0 siblings, 0 replies; 29+ messages in thread
From: Martin Jansa @ 2018-05-14 16:12 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 966 bytes --]

On Sun, May 13, 2018 at 09:05:16PM +0100, Burton, Ross wrote:
> On 11 May 2018 at 20:21, Martin Jansa <martin.jansa@gmail.com> wrote:
> > * sdl2 when selected needs sdl as well and will depend on both libsdl
> >   and libsdl
> 
> Is that a limitation of the qemu build, or just how the configure
> options work?  Doesn't seem great to need both!
> 
> Ross

Agreed, it's not great.

It's kind of PACKAGECONFIG limitation, the sdl option is like tristate:
--enable-sdl + --with-sdlabi=1.2
--enable-sdl + --with-sdlabi=2.0
--disable-sdl

I've added sdl2 PACKAGECONFIG like this:
PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl"
PACKAGECONFIG[sdl2] = "--with-sdlabi=2.0,--with-sdlabi=1.2,libsdl2"

I can add 3rd PACKAGECONFIG (that user will need to use sdl+sdl1 or
sdl+sdl2) or anonymous python to remove libsdl when both both libsdl and
libsdl2 are in DEPENDS.

Regards,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 2/3] qemu: upgrade to 2.12.0
  2018-05-02 14:37 ` [PATCH 2/3] qemu: upgrade to 2.12.0 Martin Jansa
  2018-05-02 20:44   ` Alistair Francis
  2018-05-09 15:38   ` Burton, Ross
@ 2018-05-18 21:58   ` Burton, Ross
  2018-05-29  9:10     ` Martin Jansa
  2 siblings, 1 reply; 29+ messages in thread
From: Burton, Ross @ 2018-05-18 21:58 UTC (permalink / raw)
  To: Martin Jansa; +Cc: OE-core

This is causing the AB to hang when built for qemux86 with musl whilst
building webkitgtk during the gobject-introspection qemu-i386 calls,
qemu enters an infinite loop.

I've not yet reproduced locally to try and get a log out of qemu, but
it has happened on the autobuilder repeatedly.

Ross

On 2 May 2018 at 15:37, Martin Jansa <martin.jansa@gmail.com> wrote:
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta/conf/distro/include/tcmode-default.inc   |  2 +-
>  ...4-treat-DISAS_UPDATE-as-variant-of-D.patch | 67 -------------------
>  ...-connect-socket-to-a-spawned-command.patch | 52 +++++++-------
>  .../qemu/qemu/disable-grabs.patch             | 43 ++++++------
>  meta/recipes-devtools/qemu/qemu/memfd.patch   | 57 ----------------
>  .../qemu/qemu/qemu-2.5.0-cflags.patch         | 15 ++++-
>  .../qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}   |  6 +-
>  7 files changed, 65 insertions(+), 177 deletions(-)
>  delete mode 100644 meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>  delete mode 100644 meta/recipes-devtools/qemu/qemu/memfd.patch
>  rename meta/recipes-devtools/qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb} (87%)
>
> diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc
> index 00399ae820..8b5214ed96 100644
> --- a/meta/conf/distro/include/tcmode-default.inc
> +++ b/meta/conf/distro/include/tcmode-default.inc
> @@ -28,7 +28,7 @@ BINUVERSION ?= "2.30%"
>  GDBVERSION ?= "8.0%"
>  GLIBCVERSION ?= "2.27%"
>  LINUXLIBCVERSION ?= "4.15%"
> -QEMUVERSION ?= "2.11%"
> +QEMUVERSION ?= "2.12%"
>
>  PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
>  PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
> diff --git a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch b/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
> deleted file mode 100644
> index f90cae694c..0000000000
> --- a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
> +++ /dev/null
> @@ -1,67 +0,0 @@
> -From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00 2001
> -From: Victor Kamensky <kamensky@cisco.com>
> -Date: Fri, 23 Mar 2018 18:26:45 +0000
> -Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of
> - DISAS_EXIT
> -MIME-Version: 1.0
> -Content-Type: text/plain; charset=UTF-8
> -Content-Transfer-Encoding: 8bit
> -
> -In OE project 4.15 linux kernel boot hang was observed under
> -single cpu aarch64 qemu. Kernel code was in a loop waiting for
> -vtimer arrival, spinning in TC generated blocks, while interrupt
> -was pending unprocessed. This happened because when qemu tried to
> -handle vtimer interrupt target had interrupts disabled, as
> -result flag indicating TCG exit, cpu->icount_decr.u16.high,
> -was cleared but arm_cpu_exec_interrupt function did not call
> -arm_cpu_do_interrupt to process interrupt. Later when target
> -reenabled interrupts, it happened without exit into main loop, so
> -following code that waited for result of interrupt execution
> -run in infinite loop.
> -
> -To solve the problem instructions that operate on CPU sys state
> -(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
> -should be considered as DISAS_EXIT variant, and should be
> -forced to exit back to main loop so qemu will have a chance
> -processing pending CPU state updates, including pending
> -interrupts.
> -
> -This change brings consistency with how DISAS_UPDATE is treated
> -in aarch32 case.
> -
> -CC: Peter Maydell <peter.maydell@linaro.org>
> -CC: Alex Bennée <alex.bennee@linaro.org>
> -CC: qemu-stable@nongnu.org
> -Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> -Signed-off-by: Victor Kamensky <kamensky@cisco.com>
> -Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> -Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
> -Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> -Upstream-Status: Backport
> ----
> - target/arm/translate-a64.c | 6 +++---
> - 1 file changed, 3 insertions(+), 3 deletions(-)
> -
> -diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
> -index 31ff047..327513e 100644
> ---- a/target/arm/translate-a64.c
> -+++ b/target/arm/translate-a64.c
> -@@ -13378,12 +13378,12 @@ static void aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
> -         case DISAS_UPDATE:
> -             gen_a64_set_pc_im(dc->pc);
> -             /* fall through */
> --        case DISAS_JUMP:
> --            tcg_gen_lookup_and_goto_ptr();
> --            break;
> -         case DISAS_EXIT:
> -             tcg_gen_exit_tb(0);
> -             break;
> -+        case DISAS_JUMP:
> -+            tcg_gen_lookup_and_goto_ptr();
> -+            break;
> -         case DISAS_NORETURN:
> -         case DISAS_SWI:
> -             break;
> ---
> -2.7.4
> -
> diff --git a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> index 6e6bf95c18..f1cf53a8c5 100644
> --- a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> +++ b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> @@ -1,4 +1,4 @@
> -From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00 2001
> +From a7690b02df70e0d3957e6eaa1e1cf92595839fbb Mon Sep 17 00:00:00 2001
>  From: Alistair Francis <alistair.francis@xilinx.com>
>  Date: Thu, 21 Dec 2017 11:35:16 -0800
>  Subject: [PATCH] chardev: connect socket to a spawned command
> @@ -45,16 +45,16 @@ Upstream-Status: Inappropriate [embedded specific]
>
>  Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
>  ---
> - chardev/char-socket.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++---
> - chardev/char.c        |  3 ++
> - qapi/char.json        |  5 +++
> - 3 files changed, 90 insertions(+), 4 deletions(-)
> + chardev/char-socket.c | 102 ++++++++++++++++++++++++++++++++++++++++++
> + chardev/char.c        |   3 ++
> + qapi/char.json        |   5 +++
> + 3 files changed, 110 insertions(+)
>
>  diff --git a/chardev/char-socket.c b/chardev/char-socket.c
> -index 53eda8ef00..f566107c35 100644
> +index 159e69c3b1..84778cf31a 100644
>  --- a/chardev/char-socket.c
>  +++ b/chardev/char-socket.c
> -@@ -852,6 +852,68 @@ static gboolean socket_reconnect_timeout(gpointer opaque)
> +@@ -934,6 +934,68 @@ static gboolean socket_reconnect_timeout(gpointer opaque)
>       return false;
>   }
>
> @@ -123,7 +123,7 @@ index 53eda8ef00..f566107c35 100644
>   static void qmp_chardev_open_socket(Chardev *chr,
>                                       ChardevBackend *backend,
>                                       bool *be_opened,
> -@@ -859,6 +921,9 @@
> +@@ -941,6 +1003,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
>   {
>       SocketChardev *s = SOCKET_CHARDEV(chr);
>       ChardevSocket *sock = backend->u.socket.data;
> @@ -133,11 +133,10 @@ index 53eda8ef00..f566107c35 100644
>       bool do_nodelay     = sock->has_nodelay ? sock->nodelay : false;
>       bool is_listen      = sock->has_server  ? sock->server  : true;
>       bool is_telnet      = sock->has_telnet  ? sock->telnet  : false;
> -@@ -925,7 +990,14 @@
> -     } else if (reconnect > 0) {
> +@@ -1008,6 +1073,14 @@ static void qmp_chardev_open_socket(Chardev *chr,
>           s->reconnect_time = reconnect;
>       }
> --
> +
>  +#ifndef _WIN32
>  +    if (cmd) {
>  +        chardev_open_socket_cmd(chr, cmd, errp);
> @@ -146,12 +145,12 @@ index 53eda8ef00..f566107c35 100644
>  +        *be_opened = true;
>  +    } else
>  +#endif
> -     if (s->reconnect_time) {
> -         sioc = qio_channel_socket_new();
> -         tcp_chr_set_client_ioc_name(chr, sioc);
> -@@ -985,10 +1057,26 @@
> -     const char *host = qemu_opt_get(opts, "host");
> +     /* If reconnect_time is set, will do that in chr_machine_done. */
> +     if (!s->reconnect_time) {
> +         if (s->is_listen) {
> +@@ -1065,9 +1138,26 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
>       const char *port = qemu_opt_get(opts, "port");
> +     const char *fd = qemu_opt_get(opts, "fd");
>       const char *tls_creds = qemu_opt_get(opts, "tls-creds");
>  +#ifndef _WIN32
>  +    const char *cmd = qemu_opt_get(opts, "cmd");
> @@ -159,7 +158,6 @@ index 53eda8ef00..f566107c35 100644
>       SocketAddressLegacy *addr;
>       ChardevSocket *sock;
>
> -     backend->type = CHARDEV_BACKEND_KIND_SOCKET;
>  +#ifndef _WIN32
>  +    if (cmd) {
>  +        /*
> @@ -173,17 +171,18 @@ index 53eda8ef00..f566107c35 100644
>  +        }
>  +    } else
>  +#endif
> -     if (!path) {
> -         if (!host) {
> -             error_setg(errp, "chardev: socket: no host given");
> -@@ -1021,13 +1109,24 @@
> -     sock->has_reconnect = true;
> ++
> +     if ((!!path + !!fd + !!host) != 1) {
> +         error_setg(errp,
> +                    "Exactly one of 'path', 'fd' or 'host' required");
> +@@ -1112,12 +1202,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend,
>       sock->reconnect = reconnect;
>       sock->tls_creds = g_strdup(tls_creds);
> +
>  +#ifndef _WIN32
>  +    sock->cmd = g_strdup(cmd);
>  +#endif
> -
> ++
>       addr = g_new0(SocketAddressLegacy, 1);
>  +#ifndef _WIN32
>  +    if (path || cmd) {
> @@ -198,11 +197,11 @@ index 53eda8ef00..f566107c35 100644
>  +#else
>           q_unix->path = g_strdup(path);
>  +#endif
> -     } else {
> +     } else if (host) {
>           addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
>           addr->u.inet.data = g_new(InetSocketAddress, 1);
>  diff --git a/chardev/char.c b/chardev/char.c
> -index 2ae4f465ec..5d52cd5de5 100644
> +index 76d866e6fe..9747d51d7c 100644
>  --- a/chardev/char.c
>  +++ b/chardev/char.c
>  @@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
> @@ -239,4 +238,5 @@ index ae19dcd1ed..6de0f29bcd 100644
>                                        '*server'    : 'bool',
>                                        '*wait'      : 'bool',
>  --
> -2.14.1
> +2.17.0
> +
> diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> index 77117890f4..e29c011a6f 100644
> --- a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> +++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> @@ -1,3 +1,11 @@
> +From a31c5c695cb716310257f1fc60a06b821e74fe7f Mon Sep 17 00:00:00 2001
> +From: Ross Burton <ross.burton@intel.com>
> +Date: Wed, 18 Sep 2013 14:04:54 +0100
> +Subject: [PATCH] sdl.c: allow user to disable pointer grabs
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
>  When the pointer enters the Qemu window it calls SDL_WM_GrabInput, which calls
>  XGrabPointer in a busyloop until it returns GrabSuccess. However if there's already
>  a pointer grab (screen is locked, a menu is open) then qemu will hang until the
> @@ -11,35 +19,30 @@ them in a conditional that can be set by the autobuilder environment, preserving
>  the current grabbing behaviour for everyone else.
>
>  Upstream-Status: Pending
> -Signed-off-by: Ross Burton <ross.burton@intel.com>
> -
> -From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00 2001
> -From: Ross Burton <ross.burton@intel.com>
> -Date: Wed, 18 Sep 2013 14:04:54 +0100
> -Subject: [PATCH] sdl.c: allow user to disable pointer grabs
> -
>  Signed-off-by: Ross Burton <ross.burton@intel.com>
>  Signed-off-by: Eric Bénard <eric@eukrea.com>
> +
>  ---
> - ui/sdl.c | 12 ++++++++++--
> - 1 file changed, 10 insertions(+), 2 deletions(-)
> + ui/sdl.c | 13 +++++++++++--
> + 1 file changed, 11 insertions(+), 2 deletions(-)
>
> -Index: qemu-2.11.1/ui/sdl.c
> -===================================================================
> ---- qemu-2.11.1.orig/ui/sdl.c
> -+++ qemu-2.11.1/ui/sdl.c
> -@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
> - static int scaling_active = 0;
> - static Notifier mouse_mode_notifier;
> - static int idle_counter;
> +diff --git a/ui/sdl.c b/ui/sdl.c
> +index a5fd503..ab8d1b1 100644
> +--- a/ui/sdl.c
> ++++ b/ui/sdl.c
> +@@ -68,6 +68,11 @@ static int idle_counter;
> + static const guint16 *keycode_map;
> + static size_t keycode_maplen;
> +
>  +#ifndef True
>  +#define True 1
>  +#endif
>  +static doing_grabs = True;
> -
> ++
>   #define SDL_REFRESH_INTERVAL_BUSY 10
>   #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
> -@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
> +                             / SDL_REFRESH_INTERVAL_BUSY + 1)
> +@@ -398,14 +403,16 @@ static void sdl_grab_start(void)
>           }
>       } else
>           sdl_hide_cursor();
> @@ -58,7 +61,7 @@ Index: qemu-2.11.1/ui/sdl.c
>       gui_grab = 0;
>       sdl_show_cursor();
>       sdl_update_caption();
> -@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
> +@@ -945,6 +952,8 @@ static void sdl1_display_init(DisplayState *ds, DisplayOptions *o)
>        * This requires SDL >= 1.2.14. */
>       setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
>
> diff --git a/meta/recipes-devtools/qemu/qemu/memfd.patch b/meta/recipes-devtools/qemu/qemu/memfd.patch
> deleted file mode 100644
> index 62e8d3800b..0000000000
> --- a/meta/recipes-devtools/qemu/qemu/memfd.patch
> +++ /dev/null
> @@ -1,57 +0,0 @@
> -Upstream-Status: Backport
> -Signed-off-by: Ross Burton <ross.burton@intel.com>
> -
> -From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001
> -From: Paolo Bonzini <pbonzini@redhat.com>
> -Date: Tue, 28 Nov 2017 11:51:27 +0100
> -Subject: [PATCH] memfd: fix configure test
> -MIME-Version: 1.0
> -Content-Type: text/plain; charset=UTF-8
> -Content-Transfer-Encoding: 8bit
> -
> -Recent glibc added memfd_create in sys/mman.h.  This conflicts with
> -the definition in util/memfd.c:
> -
> -    /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error: static declaration of memfd_create follows non-static declaration
> -
> -Fix the configure test, and remove the sys/memfd.h inclusion since the
> -file actually does not exist---it is a typo in the memfd_create(2) man
> -page.
> -
> -Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> -Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ----
> - configure    | 2 +-
> - util/memfd.c | 4 +---
> - 2 files changed, 2 insertions(+), 4 deletions(-)
> -
> -diff --git a/configure b/configure
> -index 9c8aa5a98b..99ccc1725a 100755
> ---- a/configure
> -+++ b/configure
> -@@ -3923,7 +3923,7 @@ fi
> - # check if memfd is supported
> - memfd=no
> - cat > $TMPC << EOF
> --#include <sys/memfd.h>
> -+#include <sys/mman.h>
> -
> - int main(void)
> - {
> -diff --git a/util/memfd.c b/util/memfd.c
> -index 4571d1aba8..412e94a405 100644
> ---- a/util/memfd.c
> -+++ b/util/memfd.c
> -@@ -31,9 +31,7 @@
> -
> - #include "qemu/memfd.h"
> -
> --#ifdef CONFIG_MEMFD
> --#include <sys/memfd.h>
> --#elif defined CONFIG_LINUX
> -+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
> - #include <sys/syscall.h>
> - #include <asm/unistd.h>
> -
> ---
> -2.11.0
> diff --git a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> index eb99d14639..360519f1a1 100644
> --- a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> +++ b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> @@ -1,8 +1,19 @@
> +From 6702ec74a7ba90b99efedde260c9f08b75d5516d Mon Sep 17 00:00:00 2001
> +From: Stephen Arnold <sarnold@vctlabs.com>
> +Date: Sun, 12 Jun 2016 18:09:56 -0700
> +Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some environment
> +
>  Upstream-Status: Pending
>
> +---
> + configure | 4 ----
> + 1 file changed, 4 deletions(-)
> +
> +diff --git a/configure b/configure
> +index 69e05fb..12fc3d8 100755
>  --- a/configure
>  +++ b/configure
> -@@ -4468,10 +4468,6 @@ fi
> +@@ -5413,10 +5413,6 @@ write_c_skeleton
>   if test "$gcov" = "yes" ; then
>     CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
>     LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
> @@ -12,4 +23,4 @@ Upstream-Status: Pending
>  -  CFLAGS="-O2 $CFLAGS"
>   fi
>
> - ##########################################
> + if test "$have_asan" = "yes"; then
> diff --git a/meta/recipes-devtools/qemu/qemu_2.11.1.bb b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
> similarity index 87%
> rename from meta/recipes-devtools/qemu/qemu_2.11.1.bb
> rename to meta/recipes-devtools/qemu/qemu_2.12.0.bb
> index f4b7d69fca..63590fc9eb 100644
> --- a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
> +++ b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
> @@ -20,8 +20,6 @@ SRC_URI = "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
>             file://chardev-connect-socket-to-a-spawned-command.patch \
>             file://apic-fixup-fallthrough-to-PIC.patch \
>             file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
> -           file://memfd.patch \
> -           file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
>             "
>  UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
>
> @@ -31,8 +29,8 @@ SRC_URI_append_class-native = " \
>              file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
>              "
>
> -SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
> -SRC_URI[sha256sum] = "d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb"
> +SRC_URI[md5sum] = "122fd7cdf241ff7eb1e42c0b503b5d1b"
> +SRC_URI[sha256sum] = "c9f4a147bc915d24df9784affc611a115f42d24720a89210b479f1ba7a3f679c"
>
>  COMPATIBLE_HOST_mipsarchn32 = "null"
>  COMPATIBLE_HOST_mipsarchn64 = "null"
> --
> 2.17.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 2/3] qemu: upgrade to 2.12.0
  2018-05-18 21:58   ` [PATCH 2/3] qemu: upgrade to 2.12.0 Burton, Ross
@ 2018-05-29  9:10     ` Martin Jansa
  2018-05-29 12:56       ` Martin Jansa
  0 siblings, 1 reply; 29+ messages in thread
From: Martin Jansa @ 2018-05-29  9:10 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 20483 bytes --]

This hang should have been fixed by:
meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch

which was added with previous upgrade to 2.11.0:

commit d6d0d99569e0d8b62a61e27d389e7939af45bab9
Author: Alistair Francis <alistair.francis@xilinx.com>
Date:   Wed Jan 17 13:39:06 2018 -0800

    qemu: Bump to version 2.11.0

and my update only shifted the chunk by 2 lines in:

commit a742584f253e25b97729abe19ca9e4fa2809ea2e
Author: Martin Jansa <martin.jansa@gmail.com>
Date:   Wed May 2 14:37:33 2018 +0000

    qemu: refresh patches with devtool

and the patch is still being applied. I was waiting for
http://jenkins.nas-admin.org/view/OE/job/oe_world_qemux86/ to reproduce it,
but it seems that Khem is working on some bigger overhaul of the jobs and
it's not ready yet, I'll try to reproduce it locally now and if I can
reproduce it, then I'll try to just remove this patch, because the upstream
didn't accept it very well in:
http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg04185.html
and the discussion there died few months ago.

Regards,

On Fri, May 18, 2018 at 11:59 PM Burton, Ross <ross.burton@intel.com> wrote:

> This is causing the AB to hang when built for qemux86 with musl whilst
> building webkitgtk during the gobject-introspection qemu-i386 calls,
> qemu enters an infinite loop.
>
> I've not yet reproduced locally to try and get a log out of qemu, but
> it has happened on the autobuilder repeatedly.
>
> Ross
>
> On 2 May 2018 at 15:37, Martin Jansa <martin.jansa@gmail.com> wrote:
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > ---
> >  meta/conf/distro/include/tcmode-default.inc   |  2 +-
> >  ...4-treat-DISAS_UPDATE-as-variant-of-D.patch | 67 -------------------
> >  ...-connect-socket-to-a-spawned-command.patch | 52 +++++++-------
> >  .../qemu/qemu/disable-grabs.patch             | 43 ++++++------
> >  meta/recipes-devtools/qemu/qemu/memfd.patch   | 57 ----------------
> >  .../qemu/qemu/qemu-2.5.0-cflags.patch         | 15 ++++-
> >  .../qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}   |  6 +-
> >  7 files changed, 65 insertions(+), 177 deletions(-)
> >  delete mode 100644
> meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
> >  delete mode 100644 meta/recipes-devtools/qemu/qemu/memfd.patch
> >  rename meta/recipes-devtools/qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}
> (87%)
> >
> > diff --git a/meta/conf/distro/include/tcmode-default.inc
> b/meta/conf/distro/include/tcmode-default.inc
> > index 00399ae820..8b5214ed96 100644
> > --- a/meta/conf/distro/include/tcmode-default.inc
> > +++ b/meta/conf/distro/include/tcmode-default.inc
> > @@ -28,7 +28,7 @@ BINUVERSION ?= "2.30%"
> >  GDBVERSION ?= "8.0%"
> >  GLIBCVERSION ?= "2.27%"
> >  LINUXLIBCVERSION ?= "4.15%"
> > -QEMUVERSION ?= "2.11%"
> > +QEMUVERSION ?= "2.12%"
> >
> >  PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
> >  PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
> > diff --git
> a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
> b/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
> > deleted file mode 100644
> > index f90cae694c..0000000000
> > ---
> a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
> > +++ /dev/null
> > @@ -1,67 +0,0 @@
> > -From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00 2001
> > -From: Victor Kamensky <kamensky@cisco.com>
> > -Date: Fri, 23 Mar 2018 18:26:45 +0000
> > -Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of
> > - DISAS_EXIT
> > -MIME-Version: 1.0
> > -Content-Type: text/plain; charset=UTF-8
> > -Content-Transfer-Encoding: 8bit
> > -
> > -In OE project 4.15 linux kernel boot hang was observed under
> > -single cpu aarch64 qemu. Kernel code was in a loop waiting for
> > -vtimer arrival, spinning in TC generated blocks, while interrupt
> > -was pending unprocessed. This happened because when qemu tried to
> > -handle vtimer interrupt target had interrupts disabled, as
> > -result flag indicating TCG exit, cpu->icount_decr.u16.high,
> > -was cleared but arm_cpu_exec_interrupt function did not call
> > -arm_cpu_do_interrupt to process interrupt. Later when target
> > -reenabled interrupts, it happened without exit into main loop, so
> > -following code that waited for result of interrupt execution
> > -run in infinite loop.
> > -
> > -To solve the problem instructions that operate on CPU sys state
> > -(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
> > -should be considered as DISAS_EXIT variant, and should be
> > -forced to exit back to main loop so qemu will have a chance
> > -processing pending CPU state updates, including pending
> > -interrupts.
> > -
> > -This change brings consistency with how DISAS_UPDATE is treated
> > -in aarch32 case.
> > -
> > -CC: Peter Maydell <peter.maydell@linaro.org>
> > -CC: Alex Bennée <alex.bennee@linaro.org>
> > -CC: qemu-stable@nongnu.org
> > -Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> > -Signed-off-by: Victor Kamensky <kamensky@cisco.com>
> > -Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> > -Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
> > -Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> > -Upstream-Status: Backport
> > ----
> > - target/arm/translate-a64.c | 6 +++---
> > - 1 file changed, 3 insertions(+), 3 deletions(-)
> > -
> > -diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
> > -index 31ff047..327513e 100644
> > ---- a/target/arm/translate-a64.c
> > -+++ b/target/arm/translate-a64.c
> > -@@ -13378,12 +13378,12 @@ static void
> aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
> > -         case DISAS_UPDATE:
> > -             gen_a64_set_pc_im(dc->pc);
> > -             /* fall through */
> > --        case DISAS_JUMP:
> > --            tcg_gen_lookup_and_goto_ptr();
> > --            break;
> > -         case DISAS_EXIT:
> > -             tcg_gen_exit_tb(0);
> > -             break;
> > -+        case DISAS_JUMP:
> > -+            tcg_gen_lookup_and_goto_ptr();
> > -+            break;
> > -         case DISAS_NORETURN:
> > -         case DISAS_SWI:
> > -             break;
> > ---
> > -2.7.4
> > -
> > diff --git
> a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> > index 6e6bf95c18..f1cf53a8c5 100644
> > ---
> a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> > +++
> b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> > @@ -1,4 +1,4 @@
> > -From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00 2001
> > +From a7690b02df70e0d3957e6eaa1e1cf92595839fbb Mon Sep 17 00:00:00 2001
> >  From: Alistair Francis <alistair.francis@xilinx.com>
> >  Date: Thu, 21 Dec 2017 11:35:16 -0800
> >  Subject: [PATCH] chardev: connect socket to a spawned command
> > @@ -45,16 +45,16 @@ Upstream-Status: Inappropriate [embedded specific]
> >
> >  Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
> >  ---
> > - chardev/char-socket.c | 86
> ++++++++++++++++++++++++++++++++++++++++++++++++---
> > - chardev/char.c        |  3 ++
> > - qapi/char.json        |  5 +++
> > - 3 files changed, 90 insertions(+), 4 deletions(-)
> > + chardev/char-socket.c | 102 ++++++++++++++++++++++++++++++++++++++++++
> > + chardev/char.c        |   3 ++
> > + qapi/char.json        |   5 +++
> > + 3 files changed, 110 insertions(+)
> >
> >  diff --git a/chardev/char-socket.c b/chardev/char-socket.c
> > -index 53eda8ef00..f566107c35 100644
> > +index 159e69c3b1..84778cf31a 100644
> >  --- a/chardev/char-socket.c
> >  +++ b/chardev/char-socket.c
> > -@@ -852,6 +852,68 @@ static gboolean socket_reconnect_timeout(gpointer
> opaque)
> > +@@ -934,6 +934,68 @@ static gboolean socket_reconnect_timeout(gpointer
> opaque)
> >       return false;
> >   }
> >
> > @@ -123,7 +123,7 @@ index 53eda8ef00..f566107c35 100644
> >   static void qmp_chardev_open_socket(Chardev *chr,
> >                                       ChardevBackend *backend,
> >                                       bool *be_opened,
> > -@@ -859,6 +921,9 @@
> > +@@ -941,6 +1003,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
> >   {
> >       SocketChardev *s = SOCKET_CHARDEV(chr);
> >       ChardevSocket *sock = backend->u.socket.data;
> > @@ -133,11 +133,10 @@ index 53eda8ef00..f566107c35 100644
> >       bool do_nodelay     = sock->has_nodelay ? sock->nodelay : false;
> >       bool is_listen      = sock->has_server  ? sock->server  : true;
> >       bool is_telnet      = sock->has_telnet  ? sock->telnet  : false;
> > -@@ -925,7 +990,14 @@
> > -     } else if (reconnect > 0) {
> > +@@ -1008,6 +1073,14 @@ static void qmp_chardev_open_socket(Chardev *chr,
> >           s->reconnect_time = reconnect;
> >       }
> > --
> > +
> >  +#ifndef _WIN32
> >  +    if (cmd) {
> >  +        chardev_open_socket_cmd(chr, cmd, errp);
> > @@ -146,12 +145,12 @@ index 53eda8ef00..f566107c35 100644
> >  +        *be_opened = true;
> >  +    } else
> >  +#endif
> > -     if (s->reconnect_time) {
> > -         sioc = qio_channel_socket_new();
> > -         tcp_chr_set_client_ioc_name(chr, sioc);
> > -@@ -985,10 +1057,26 @@
> > -     const char *host = qemu_opt_get(opts, "host");
> > +     /* If reconnect_time is set, will do that in chr_machine_done. */
> > +     if (!s->reconnect_time) {
> > +         if (s->is_listen) {
> > +@@ -1065,9 +1138,26 @@ static void qemu_chr_parse_socket(QemuOpts
> *opts, ChardevBackend *backend,
> >       const char *port = qemu_opt_get(opts, "port");
> > +     const char *fd = qemu_opt_get(opts, "fd");
> >       const char *tls_creds = qemu_opt_get(opts, "tls-creds");
> >  +#ifndef _WIN32
> >  +    const char *cmd = qemu_opt_get(opts, "cmd");
> > @@ -159,7 +158,6 @@ index 53eda8ef00..f566107c35 100644
> >       SocketAddressLegacy *addr;
> >       ChardevSocket *sock;
> >
> > -     backend->type = CHARDEV_BACKEND_KIND_SOCKET;
> >  +#ifndef _WIN32
> >  +    if (cmd) {
> >  +        /*
> > @@ -173,17 +171,18 @@ index 53eda8ef00..f566107c35 100644
> >  +        }
> >  +    } else
> >  +#endif
> > -     if (!path) {
> > -         if (!host) {
> > -             error_setg(errp, "chardev: socket: no host given");
> > -@@ -1021,13 +1109,24 @@
> > -     sock->has_reconnect = true;
> > ++
> > +     if ((!!path + !!fd + !!host) != 1) {
> > +         error_setg(errp,
> > +                    "Exactly one of 'path', 'fd' or 'host' required");
> > +@@ -1112,12 +1202,24 @@ static void qemu_chr_parse_socket(QemuOpts
> *opts, ChardevBackend *backend,
> >       sock->reconnect = reconnect;
> >       sock->tls_creds = g_strdup(tls_creds);
> > +
> >  +#ifndef _WIN32
> >  +    sock->cmd = g_strdup(cmd);
> >  +#endif
> > -
> > ++
> >       addr = g_new0(SocketAddressLegacy, 1);
> >  +#ifndef _WIN32
> >  +    if (path || cmd) {
> > @@ -198,11 +197,11 @@ index 53eda8ef00..f566107c35 100644
> >  +#else
> >           q_unix->path = g_strdup(path);
> >  +#endif
> > -     } else {
> > +     } else if (host) {
> >           addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
> >           addr->u.inet.data = g_new(InetSocketAddress, 1);
> >  diff --git a/chardev/char.c b/chardev/char.c
> > -index 2ae4f465ec..5d52cd5de5 100644
> > +index 76d866e6fe..9747d51d7c 100644
> >  --- a/chardev/char.c
> >  +++ b/chardev/char.c
> >  @@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
> > @@ -239,4 +238,5 @@ index ae19dcd1ed..6de0f29bcd 100644
> >                                        '*server'    : 'bool',
> >                                        '*wait'      : 'bool',
> >  --
> > -2.14.1
> > +2.17.0
> > +
> > diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> > index 77117890f4..e29c011a6f 100644
> > --- a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> > +++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> > @@ -1,3 +1,11 @@
> > +From a31c5c695cb716310257f1fc60a06b821e74fe7f Mon Sep 17 00:00:00 2001
> > +From: Ross Burton <ross.burton@intel.com>
> > +Date: Wed, 18 Sep 2013 14:04:54 +0100
> > +Subject: [PATCH] sdl.c: allow user to disable pointer grabs
> > +MIME-Version: 1.0
> > +Content-Type: text/plain; charset=UTF-8
> > +Content-Transfer-Encoding: 8bit
> > +
> >  When the pointer enters the Qemu window it calls SDL_WM_GrabInput,
> which calls
> >  XGrabPointer in a busyloop until it returns GrabSuccess. However if
> there's already
> >  a pointer grab (screen is locked, a menu is open) then qemu will hang
> until the
> > @@ -11,35 +19,30 @@ them in a conditional that can be set by the
> autobuilder environment, preserving
> >  the current grabbing behaviour for everyone else.
> >
> >  Upstream-Status: Pending
> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
> > -
> > -From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00 2001
> > -From: Ross Burton <ross.burton@intel.com>
> > -Date: Wed, 18 Sep 2013 14:04:54 +0100
> > -Subject: [PATCH] sdl.c: allow user to disable pointer grabs
> > -
> >  Signed-off-by: Ross Burton <ross.burton@intel.com>
> >  Signed-off-by: Eric Bénard <eric@eukrea.com>
> > +
> >  ---
> > - ui/sdl.c | 12 ++++++++++--
> > - 1 file changed, 10 insertions(+), 2 deletions(-)
> > + ui/sdl.c | 13 +++++++++++--
> > + 1 file changed, 11 insertions(+), 2 deletions(-)
> >
> > -Index: qemu-2.11.1/ui/sdl.c
> > -===================================================================
> > ---- qemu-2.11.1.orig/ui/sdl.c
> > -+++ qemu-2.11.1/ui/sdl.c
> > -@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
> > - static int scaling_active = 0;
> > - static Notifier mouse_mode_notifier;
> > - static int idle_counter;
> > +diff --git a/ui/sdl.c b/ui/sdl.c
> > +index a5fd503..ab8d1b1 100644
> > +--- a/ui/sdl.c
> > ++++ b/ui/sdl.c
> > +@@ -68,6 +68,11 @@ static int idle_counter;
> > + static const guint16 *keycode_map;
> > + static size_t keycode_maplen;
> > +
> >  +#ifndef True
> >  +#define True 1
> >  +#endif
> >  +static doing_grabs = True;
> > -
> > ++
> >   #define SDL_REFRESH_INTERVAL_BUSY 10
> >   #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
> > -@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
> > +                             / SDL_REFRESH_INTERVAL_BUSY + 1)
> > +@@ -398,14 +403,16 @@ static void sdl_grab_start(void)
> >           }
> >       } else
> >           sdl_hide_cursor();
> > @@ -58,7 +61,7 @@ Index: qemu-2.11.1/ui/sdl.c
> >       gui_grab = 0;
> >       sdl_show_cursor();
> >       sdl_update_caption();
> > -@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
> > +@@ -945,6 +952,8 @@ static void sdl1_display_init(DisplayState *ds,
> DisplayOptions *o)
> >        * This requires SDL >= 1.2.14. */
> >       setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
> >
> > diff --git a/meta/recipes-devtools/qemu/qemu/memfd.patch
> b/meta/recipes-devtools/qemu/qemu/memfd.patch
> > deleted file mode 100644
> > index 62e8d3800b..0000000000
> > --- a/meta/recipes-devtools/qemu/qemu/memfd.patch
> > +++ /dev/null
> > @@ -1,57 +0,0 @@
> > -Upstream-Status: Backport
> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
> > -
> > -From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001
> > -From: Paolo Bonzini <pbonzini@redhat.com>
> > -Date: Tue, 28 Nov 2017 11:51:27 +0100
> > -Subject: [PATCH] memfd: fix configure test
> > -MIME-Version: 1.0
> > -Content-Type: text/plain; charset=UTF-8
> > -Content-Transfer-Encoding: 8bit
> > -
> > -Recent glibc added memfd_create in sys/mman.h.  This conflicts with
> > -the definition in util/memfd.c:
> > -
> > -    /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error:
> static declaration of memfd_create follows non-static declaration
> > -
> > -Fix the configure test, and remove the sys/memfd.h inclusion since the
> > -file actually does not exist---it is a typo in the memfd_create(2) man
> > -page.
> > -
> > -Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> > -Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > ----
> > - configure    | 2 +-
> > - util/memfd.c | 4 +---
> > - 2 files changed, 2 insertions(+), 4 deletions(-)
> > -
> > -diff --git a/configure b/configure
> > -index 9c8aa5a98b..99ccc1725a 100755
> > ---- a/configure
> > -+++ b/configure
> > -@@ -3923,7 +3923,7 @@ fi
> > - # check if memfd is supported
> > - memfd=no
> > - cat > $TMPC << EOF
> > --#include <sys/memfd.h>
> > -+#include <sys/mman.h>
> > -
> > - int main(void)
> > - {
> > -diff --git a/util/memfd.c b/util/memfd.c
> > -index 4571d1aba8..412e94a405 100644
> > ---- a/util/memfd.c
> > -+++ b/util/memfd.c
> > -@@ -31,9 +31,7 @@
> > -
> > - #include "qemu/memfd.h"
> > -
> > --#ifdef CONFIG_MEMFD
> > --#include <sys/memfd.h>
> > --#elif defined CONFIG_LINUX
> > -+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
> > - #include <sys/syscall.h>
> > - #include <asm/unistd.h>
> > -
> > ---
> > -2.11.0
> > diff --git a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> > index eb99d14639..360519f1a1 100644
> > --- a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> > +++ b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> > @@ -1,8 +1,19 @@
> > +From 6702ec74a7ba90b99efedde260c9f08b75d5516d Mon Sep 17 00:00:00 2001
> > +From: Stephen Arnold <sarnold@vctlabs.com>
> > +Date: Sun, 12 Jun 2016 18:09:56 -0700
> > +Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some
> environment
> > +
> >  Upstream-Status: Pending
> >
> > +---
> > + configure | 4 ----
> > + 1 file changed, 4 deletions(-)
> > +
> > +diff --git a/configure b/configure
> > +index 69e05fb..12fc3d8 100755
> >  --- a/configure
> >  +++ b/configure
> > -@@ -4468,10 +4468,6 @@ fi
> > +@@ -5413,10 +5413,6 @@ write_c_skeleton
> >   if test "$gcov" = "yes" ; then
> >     CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
> >     LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
> > @@ -12,4 +23,4 @@ Upstream-Status: Pending
> >  -  CFLAGS="-O2 $CFLAGS"
> >   fi
> >
> > - ##########################################
> > + if test "$have_asan" = "yes"; then
> > diff --git a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
> b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
> > similarity index 87%
> > rename from meta/recipes-devtools/qemu/qemu_2.11.1.bb
> > rename to meta/recipes-devtools/qemu/qemu_2.12.0.bb
> > index f4b7d69fca..63590fc9eb 100644
> > --- a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
> > +++ b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
> > @@ -20,8 +20,6 @@ SRC_URI = "
> http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
> >             file://chardev-connect-socket-to-a-spawned-command.patch \
> >             file://apic-fixup-fallthrough-to-PIC.patch \
> >
>  file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
> > -           file://memfd.patch \
> > -
>  file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
> >             "
> >  UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
> >
> > @@ -31,8 +29,8 @@ SRC_URI_append_class-native = " \
> >              file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
> >              "
> >
> > -SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
> > -SRC_URI[sha256sum] =
> "d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb"
> > +SRC_URI[md5sum] = "122fd7cdf241ff7eb1e42c0b503b5d1b"
> > +SRC_URI[sha256sum] =
> "c9f4a147bc915d24df9784affc611a115f42d24720a89210b479f1ba7a3f679c"
> >
> >  COMPATIBLE_HOST_mipsarchn32 = "null"
> >  COMPATIBLE_HOST_mipsarchn64 = "null"
> > --
> > 2.17.0
> >
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 27031 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 2/3] qemu: upgrade to 2.12.0
  2018-05-29  9:10     ` Martin Jansa
@ 2018-05-29 12:56       ` Martin Jansa
  2018-05-29 20:40         ` Martin Jansa
  0 siblings, 1 reply; 29+ messages in thread
From: Martin Jansa @ 2018-05-29 12:56 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 22935 bytes --]

I've tried to reproduce it locally, but g-ir-scanner-qemuwrapper is failing
for me in various recipes and I never got as far as webkitgtk

pango:
Error relocating
TOPDIR/tmp-musl/work/i586-oe-linux-musl/pango/1.40.14-r0/recipe-sysroot//usr/lib/libGL.so.1:
__glX_tls_Context: symbol not found
http://errors.yoctoproject.org/Errors/Details/178988/

after disabling GI for pango (GI_DATA_ENABLED_pn-pango = "False") it failed
in
librsvg:
Error relocating
TOPDIR/tmp-musl/work/i586-oe-linux-musl/librsvg/2.40.20-r0/recipe-sysroot//usr/lib/libGL.so.1:
__glX_tls_Context: symbol not found
http://errors.yoctoproject.org/Errors/Details/178991/

gstreamer1.0-plugins-base:
Error relocating
TOPDIR/tmp-musl/work/i586-oe-linux-musl/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot//usr/lib/libEGL.so.1:
_egl_TLS: symbol not found
http://errors.yoctoproject.org/Errors/Details/178993/

and gtk+3 as well, because of disabled GI for pango:
Couldn't find include 'Pango-1.0.gir' (search path:
'['TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gir-1.0',
'../gdk',
'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gir-1.0',
'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot-native/usr/share/gir-1.0',
'/usr/share/gir-1.0',
'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot-native/usr/share/gir-1.0']')
TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gobject-introspection-1.0/Makefile.introspection:159:
recipe for target 'Gdk-3.0.gir' failed
http://errors.yoctoproject.org/Errors/Details/178992/

I'm not sure how exactly AB is doing this qemux86 musl build, it might be
some more changes I have locally or missing/superfluous something in my
config.

On Tue, May 29, 2018 at 11:10 AM Martin Jansa <martin.jansa@gmail.com>
wrote:

> This hang should have been fixed by:
>
> meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
>
> which was added with previous upgrade to 2.11.0:
>
> commit d6d0d99569e0d8b62a61e27d389e7939af45bab9
> Author: Alistair Francis <alistair.francis@xilinx.com>
> Date:   Wed Jan 17 13:39:06 2018 -0800
>
>     qemu: Bump to version 2.11.0
>
> and my update only shifted the chunk by 2 lines in:
>
> commit a742584f253e25b97729abe19ca9e4fa2809ea2e
> Author: Martin Jansa <martin.jansa@gmail.com>
> Date:   Wed May 2 14:37:33 2018 +0000
>
>     qemu: refresh patches with devtool
>
> and the patch is still being applied. I was waiting for
> http://jenkins.nas-admin.org/view/OE/job/oe_world_qemux86/ to reproduce
> it, but it seems that Khem is working on some bigger overhaul of the jobs
> and it's not ready yet, I'll try to reproduce it locally now and if I can
> reproduce it, then I'll try to just remove this patch, because the upstream
> didn't accept it very well in:
> http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg04185.html
> and the discussion there died few months ago.
>
> Regards,
>
> On Fri, May 18, 2018 at 11:59 PM Burton, Ross <ross.burton@intel.com>
> wrote:
>
>> This is causing the AB to hang when built for qemux86 with musl whilst
>> building webkitgtk during the gobject-introspection qemu-i386 calls,
>> qemu enters an infinite loop.
>>
>> I've not yet reproduced locally to try and get a log out of qemu, but
>> it has happened on the autobuilder repeatedly.
>>
>> Ross
>>
>> On 2 May 2018 at 15:37, Martin Jansa <martin.jansa@gmail.com> wrote:
>> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
>> > ---
>> >  meta/conf/distro/include/tcmode-default.inc   |  2 +-
>> >  ...4-treat-DISAS_UPDATE-as-variant-of-D.patch | 67 -------------------
>> >  ...-connect-socket-to-a-spawned-command.patch | 52 +++++++-------
>> >  .../qemu/qemu/disable-grabs.patch             | 43 ++++++------
>> >  meta/recipes-devtools/qemu/qemu/memfd.patch   | 57 ----------------
>> >  .../qemu/qemu/qemu-2.5.0-cflags.patch         | 15 ++++-
>> >  .../qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}   |  6 +-
>> >  7 files changed, 65 insertions(+), 177 deletions(-)
>> >  delete mode 100644
>> meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>> >  delete mode 100644 meta/recipes-devtools/qemu/qemu/memfd.patch
>> >  rename meta/recipes-devtools/qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}
>> (87%)
>> >
>> > diff --git a/meta/conf/distro/include/tcmode-default.inc
>> b/meta/conf/distro/include/tcmode-default.inc
>> > index 00399ae820..8b5214ed96 100644
>> > --- a/meta/conf/distro/include/tcmode-default.inc
>> > +++ b/meta/conf/distro/include/tcmode-default.inc
>> > @@ -28,7 +28,7 @@ BINUVERSION ?= "2.30%"
>> >  GDBVERSION ?= "8.0%"
>> >  GLIBCVERSION ?= "2.27%"
>> >  LINUXLIBCVERSION ?= "4.15%"
>> > -QEMUVERSION ?= "2.11%"
>> > +QEMUVERSION ?= "2.12%"
>> >
>> >  PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
>> >  PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
>> > diff --git
>> a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>> b/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>> > deleted file mode 100644
>> > index f90cae694c..0000000000
>> > ---
>> a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>> > +++ /dev/null
>> > @@ -1,67 +0,0 @@
>> > -From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00 2001
>> > -From: Victor Kamensky <kamensky@cisco.com>
>> > -Date: Fri, 23 Mar 2018 18:26:45 +0000
>> > -Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of
>> > - DISAS_EXIT
>> > -MIME-Version: 1.0
>> > -Content-Type: text/plain; charset=UTF-8
>> > -Content-Transfer-Encoding: 8bit
>> > -
>> > -In OE project 4.15 linux kernel boot hang was observed under
>> > -single cpu aarch64 qemu. Kernel code was in a loop waiting for
>> > -vtimer arrival, spinning in TC generated blocks, while interrupt
>> > -was pending unprocessed. This happened because when qemu tried to
>> > -handle vtimer interrupt target had interrupts disabled, as
>> > -result flag indicating TCG exit, cpu->icount_decr.u16.high,
>> > -was cleared but arm_cpu_exec_interrupt function did not call
>> > -arm_cpu_do_interrupt to process interrupt. Later when target
>> > -reenabled interrupts, it happened without exit into main loop, so
>> > -following code that waited for result of interrupt execution
>> > -run in infinite loop.
>> > -
>> > -To solve the problem instructions that operate on CPU sys state
>> > -(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
>> > -should be considered as DISAS_EXIT variant, and should be
>> > -forced to exit back to main loop so qemu will have a chance
>> > -processing pending CPU state updates, including pending
>> > -interrupts.
>> > -
>> > -This change brings consistency with how DISAS_UPDATE is treated
>> > -in aarch32 case.
>> > -
>> > -CC: Peter Maydell <peter.maydell@linaro.org>
>> > -CC: Alex Bennée <alex.bennee@linaro.org>
>> > -CC: qemu-stable@nongnu.org
>> > -Suggested-by: Peter Maydell <peter.maydell@linaro.org>
>> > -Signed-off-by: Victor Kamensky <kamensky@cisco.com>
>> > -Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>> > -Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
>> > -Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> > -Upstream-Status: Backport
>> > ----
>> > - target/arm/translate-a64.c | 6 +++---
>> > - 1 file changed, 3 insertions(+), 3 deletions(-)
>> > -
>> > -diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
>> > -index 31ff047..327513e 100644
>> > ---- a/target/arm/translate-a64.c
>> > -+++ b/target/arm/translate-a64.c
>> > -@@ -13378,12 +13378,12 @@ static void
>> aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
>> > -         case DISAS_UPDATE:
>> > -             gen_a64_set_pc_im(dc->pc);
>> > -             /* fall through */
>> > --        case DISAS_JUMP:
>> > --            tcg_gen_lookup_and_goto_ptr();
>> > --            break;
>> > -         case DISAS_EXIT:
>> > -             tcg_gen_exit_tb(0);
>> > -             break;
>> > -+        case DISAS_JUMP:
>> > -+            tcg_gen_lookup_and_goto_ptr();
>> > -+            break;
>> > -         case DISAS_NORETURN:
>> > -         case DISAS_SWI:
>> > -             break;
>> > ---
>> > -2.7.4
>> > -
>> > diff --git
>> a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>> b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>> > index 6e6bf95c18..f1cf53a8c5 100644
>> > ---
>> a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>> > +++
>> b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>> > @@ -1,4 +1,4 @@
>> > -From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00 2001
>> > +From a7690b02df70e0d3957e6eaa1e1cf92595839fbb Mon Sep 17 00:00:00 2001
>> >  From: Alistair Francis <alistair.francis@xilinx.com>
>> >  Date: Thu, 21 Dec 2017 11:35:16 -0800
>> >  Subject: [PATCH] chardev: connect socket to a spawned command
>> > @@ -45,16 +45,16 @@ Upstream-Status: Inappropriate [embedded specific]
>> >
>> >  Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
>> >  ---
>> > - chardev/char-socket.c | 86
>> ++++++++++++++++++++++++++++++++++++++++++++++++---
>> > - chardev/char.c        |  3 ++
>> > - qapi/char.json        |  5 +++
>> > - 3 files changed, 90 insertions(+), 4 deletions(-)
>> > + chardev/char-socket.c | 102 ++++++++++++++++++++++++++++++++++++++++++
>> > + chardev/char.c        |   3 ++
>> > + qapi/char.json        |   5 +++
>> > + 3 files changed, 110 insertions(+)
>> >
>> >  diff --git a/chardev/char-socket.c b/chardev/char-socket.c
>> > -index 53eda8ef00..f566107c35 100644
>> > +index 159e69c3b1..84778cf31a 100644
>> >  --- a/chardev/char-socket.c
>> >  +++ b/chardev/char-socket.c
>> > -@@ -852,6 +852,68 @@ static gboolean socket_reconnect_timeout(gpointer
>> opaque)
>> > +@@ -934,6 +934,68 @@ static gboolean socket_reconnect_timeout(gpointer
>> opaque)
>> >       return false;
>> >   }
>> >
>> > @@ -123,7 +123,7 @@ index 53eda8ef00..f566107c35 100644
>> >   static void qmp_chardev_open_socket(Chardev *chr,
>> >                                       ChardevBackend *backend,
>> >                                       bool *be_opened,
>> > -@@ -859,6 +921,9 @@
>> > +@@ -941,6 +1003,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
>> >   {
>> >       SocketChardev *s = SOCKET_CHARDEV(chr);
>> >       ChardevSocket *sock = backend->u.socket.data;
>> > @@ -133,11 +133,10 @@ index 53eda8ef00..f566107c35 100644
>> >       bool do_nodelay     = sock->has_nodelay ? sock->nodelay : false;
>> >       bool is_listen      = sock->has_server  ? sock->server  : true;
>> >       bool is_telnet      = sock->has_telnet  ? sock->telnet  : false;
>> > -@@ -925,7 +990,14 @@
>> > -     } else if (reconnect > 0) {
>> > +@@ -1008,6 +1073,14 @@ static void qmp_chardev_open_socket(Chardev
>> *chr,
>> >           s->reconnect_time = reconnect;
>> >       }
>> > --
>> > +
>> >  +#ifndef _WIN32
>> >  +    if (cmd) {
>> >  +        chardev_open_socket_cmd(chr, cmd, errp);
>> > @@ -146,12 +145,12 @@ index 53eda8ef00..f566107c35 100644
>> >  +        *be_opened = true;
>> >  +    } else
>> >  +#endif
>> > -     if (s->reconnect_time) {
>> > -         sioc = qio_channel_socket_new();
>> > -         tcp_chr_set_client_ioc_name(chr, sioc);
>> > -@@ -985,10 +1057,26 @@
>> > -     const char *host = qemu_opt_get(opts, "host");
>> > +     /* If reconnect_time is set, will do that in chr_machine_done. */
>> > +     if (!s->reconnect_time) {
>> > +         if (s->is_listen) {
>> > +@@ -1065,9 +1138,26 @@ static void qemu_chr_parse_socket(QemuOpts
>> *opts, ChardevBackend *backend,
>> >       const char *port = qemu_opt_get(opts, "port");
>> > +     const char *fd = qemu_opt_get(opts, "fd");
>> >       const char *tls_creds = qemu_opt_get(opts, "tls-creds");
>> >  +#ifndef _WIN32
>> >  +    const char *cmd = qemu_opt_get(opts, "cmd");
>> > @@ -159,7 +158,6 @@ index 53eda8ef00..f566107c35 100644
>> >       SocketAddressLegacy *addr;
>> >       ChardevSocket *sock;
>> >
>> > -     backend->type = CHARDEV_BACKEND_KIND_SOCKET;
>> >  +#ifndef _WIN32
>> >  +    if (cmd) {
>> >  +        /*
>> > @@ -173,17 +171,18 @@ index 53eda8ef00..f566107c35 100644
>> >  +        }
>> >  +    } else
>> >  +#endif
>> > -     if (!path) {
>> > -         if (!host) {
>> > -             error_setg(errp, "chardev: socket: no host given");
>> > -@@ -1021,13 +1109,24 @@
>> > -     sock->has_reconnect = true;
>> > ++
>> > +     if ((!!path + !!fd + !!host) != 1) {
>> > +         error_setg(errp,
>> > +                    "Exactly one of 'path', 'fd' or 'host' required");
>> > +@@ -1112,12 +1202,24 @@ static void qemu_chr_parse_socket(QemuOpts
>> *opts, ChardevBackend *backend,
>> >       sock->reconnect = reconnect;
>> >       sock->tls_creds = g_strdup(tls_creds);
>> > +
>> >  +#ifndef _WIN32
>> >  +    sock->cmd = g_strdup(cmd);
>> >  +#endif
>> > -
>> > ++
>> >       addr = g_new0(SocketAddressLegacy, 1);
>> >  +#ifndef _WIN32
>> >  +    if (path || cmd) {
>> > @@ -198,11 +197,11 @@ index 53eda8ef00..f566107c35 100644
>> >  +#else
>> >           q_unix->path = g_strdup(path);
>> >  +#endif
>> > -     } else {
>> > +     } else if (host) {
>> >           addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
>> >           addr->u.inet.data = g_new(InetSocketAddress, 1);
>> >  diff --git a/chardev/char.c b/chardev/char.c
>> > -index 2ae4f465ec..5d52cd5de5 100644
>> > +index 76d866e6fe..9747d51d7c 100644
>> >  --- a/chardev/char.c
>> >  +++ b/chardev/char.c
>> >  @@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
>> > @@ -239,4 +238,5 @@ index ae19dcd1ed..6de0f29bcd 100644
>> >                                        '*server'    : 'bool',
>> >                                        '*wait'      : 'bool',
>> >  --
>> > -2.14.1
>> > +2.17.0
>> > +
>> > diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>> b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>> > index 77117890f4..e29c011a6f 100644
>> > --- a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>> > +++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>> > @@ -1,3 +1,11 @@
>> > +From a31c5c695cb716310257f1fc60a06b821e74fe7f Mon Sep 17 00:00:00 2001
>> > +From: Ross Burton <ross.burton@intel.com>
>> > +Date: Wed, 18 Sep 2013 14:04:54 +0100
>> > +Subject: [PATCH] sdl.c: allow user to disable pointer grabs
>> > +MIME-Version: 1.0
>> > +Content-Type: text/plain; charset=UTF-8
>> > +Content-Transfer-Encoding: 8bit
>> > +
>> >  When the pointer enters the Qemu window it calls SDL_WM_GrabInput,
>> which calls
>> >  XGrabPointer in a busyloop until it returns GrabSuccess. However if
>> there's already
>> >  a pointer grab (screen is locked, a menu is open) then qemu will hang
>> until the
>> > @@ -11,35 +19,30 @@ them in a conditional that can be set by the
>> autobuilder environment, preserving
>> >  the current grabbing behaviour for everyone else.
>> >
>> >  Upstream-Status: Pending
>> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
>> > -
>> > -From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00 2001
>> > -From: Ross Burton <ross.burton@intel.com>
>> > -Date: Wed, 18 Sep 2013 14:04:54 +0100
>> > -Subject: [PATCH] sdl.c: allow user to disable pointer grabs
>> > -
>> >  Signed-off-by: Ross Burton <ross.burton@intel.com>
>> >  Signed-off-by: Eric Bénard <eric@eukrea.com>
>> > +
>> >  ---
>> > - ui/sdl.c | 12 ++++++++++--
>> > - 1 file changed, 10 insertions(+), 2 deletions(-)
>> > + ui/sdl.c | 13 +++++++++++--
>> > + 1 file changed, 11 insertions(+), 2 deletions(-)
>> >
>> > -Index: qemu-2.11.1/ui/sdl.c
>> > -===================================================================
>> > ---- qemu-2.11.1.orig/ui/sdl.c
>> > -+++ qemu-2.11.1/ui/sdl.c
>> > -@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
>> > - static int scaling_active = 0;
>> > - static Notifier mouse_mode_notifier;
>> > - static int idle_counter;
>> > +diff --git a/ui/sdl.c b/ui/sdl.c
>> > +index a5fd503..ab8d1b1 100644
>> > +--- a/ui/sdl.c
>> > ++++ b/ui/sdl.c
>> > +@@ -68,6 +68,11 @@ static int idle_counter;
>> > + static const guint16 *keycode_map;
>> > + static size_t keycode_maplen;
>> > +
>> >  +#ifndef True
>> >  +#define True 1
>> >  +#endif
>> >  +static doing_grabs = True;
>> > -
>> > ++
>> >   #define SDL_REFRESH_INTERVAL_BUSY 10
>> >   #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
>> > -@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
>> > +                             / SDL_REFRESH_INTERVAL_BUSY + 1)
>> > +@@ -398,14 +403,16 @@ static void sdl_grab_start(void)
>> >           }
>> >       } else
>> >           sdl_hide_cursor();
>> > @@ -58,7 +61,7 @@ Index: qemu-2.11.1/ui/sdl.c
>> >       gui_grab = 0;
>> >       sdl_show_cursor();
>> >       sdl_update_caption();
>> > -@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
>> > +@@ -945,6 +952,8 @@ static void sdl1_display_init(DisplayState *ds,
>> DisplayOptions *o)
>> >        * This requires SDL >= 1.2.14. */
>> >       setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
>> >
>> > diff --git a/meta/recipes-devtools/qemu/qemu/memfd.patch
>> b/meta/recipes-devtools/qemu/qemu/memfd.patch
>> > deleted file mode 100644
>> > index 62e8d3800b..0000000000
>> > --- a/meta/recipes-devtools/qemu/qemu/memfd.patch
>> > +++ /dev/null
>> > @@ -1,57 +0,0 @@
>> > -Upstream-Status: Backport
>> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
>> > -
>> > -From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001
>> > -From: Paolo Bonzini <pbonzini@redhat.com>
>> > -Date: Tue, 28 Nov 2017 11:51:27 +0100
>> > -Subject: [PATCH] memfd: fix configure test
>> > -MIME-Version: 1.0
>> > -Content-Type: text/plain; charset=UTF-8
>> > -Content-Transfer-Encoding: 8bit
>> > -
>> > -Recent glibc added memfd_create in sys/mman.h.  This conflicts with
>> > -the definition in util/memfd.c:
>> > -
>> > -    /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error:
>> static declaration of memfd_create follows non-static declaration
>> > -
>> > -Fix the configure test, and remove the sys/memfd.h inclusion since the
>> > -file actually does not exist---it is a typo in the memfd_create(2) man
>> > -page.
>> > -
>> > -Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
>> > -Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> > ----
>> > - configure    | 2 +-
>> > - util/memfd.c | 4 +---
>> > - 2 files changed, 2 insertions(+), 4 deletions(-)
>> > -
>> > -diff --git a/configure b/configure
>> > -index 9c8aa5a98b..99ccc1725a 100755
>> > ---- a/configure
>> > -+++ b/configure
>> > -@@ -3923,7 +3923,7 @@ fi
>> > - # check if memfd is supported
>> > - memfd=no
>> > - cat > $TMPC << EOF
>> > --#include <sys/memfd.h>
>> > -+#include <sys/mman.h>
>> > -
>> > - int main(void)
>> > - {
>> > -diff --git a/util/memfd.c b/util/memfd.c
>> > -index 4571d1aba8..412e94a405 100644
>> > ---- a/util/memfd.c
>> > -+++ b/util/memfd.c
>> > -@@ -31,9 +31,7 @@
>> > -
>> > - #include "qemu/memfd.h"
>> > -
>> > --#ifdef CONFIG_MEMFD
>> > --#include <sys/memfd.h>
>> > --#elif defined CONFIG_LINUX
>> > -+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
>> > - #include <sys/syscall.h>
>> > - #include <asm/unistd.h>
>> > -
>> > ---
>> > -2.11.0
>> > diff --git a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>> b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>> > index eb99d14639..360519f1a1 100644
>> > --- a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>> > +++ b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>> > @@ -1,8 +1,19 @@
>> > +From 6702ec74a7ba90b99efedde260c9f08b75d5516d Mon Sep 17 00:00:00 2001
>> > +From: Stephen Arnold <sarnold@vctlabs.com>
>> > +Date: Sun, 12 Jun 2016 18:09:56 -0700
>> > +Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some
>> environment
>> > +
>> >  Upstream-Status: Pending
>> >
>> > +---
>> > + configure | 4 ----
>> > + 1 file changed, 4 deletions(-)
>> > +
>> > +diff --git a/configure b/configure
>> > +index 69e05fb..12fc3d8 100755
>> >  --- a/configure
>> >  +++ b/configure
>> > -@@ -4468,10 +4468,6 @@ fi
>> > +@@ -5413,10 +5413,6 @@ write_c_skeleton
>> >   if test "$gcov" = "yes" ; then
>> >     CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
>> >     LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
>> > @@ -12,4 +23,4 @@ Upstream-Status: Pending
>> >  -  CFLAGS="-O2 $CFLAGS"
>> >   fi
>> >
>> > - ##########################################
>> > + if test "$have_asan" = "yes"; then
>> > diff --git a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
>> b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
>> > similarity index 87%
>> > rename from meta/recipes-devtools/qemu/qemu_2.11.1.bb
>> > rename to meta/recipes-devtools/qemu/qemu_2.12.0.bb
>> > index f4b7d69fca..63590fc9eb 100644
>> > --- a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
>> > +++ b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
>> > @@ -20,8 +20,6 @@ SRC_URI = "
>> http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
>> >             file://chardev-connect-socket-to-a-spawned-command.patch \
>> >             file://apic-fixup-fallthrough-to-PIC.patch \
>> >
>>  file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
>> > -           file://memfd.patch \
>> > -
>>  file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
>> >             "
>> >  UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
>> >
>> > @@ -31,8 +29,8 @@ SRC_URI_append_class-native = " \
>> >              file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
>> >              "
>> >
>> > -SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
>> > -SRC_URI[sha256sum] =
>> "d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb"
>> > +SRC_URI[md5sum] = "122fd7cdf241ff7eb1e42c0b503b5d1b"
>> > +SRC_URI[sha256sum] =
>> "c9f4a147bc915d24df9784affc611a115f42d24720a89210b479f1ba7a3f679c"
>> >
>> >  COMPATIBLE_HOST_mipsarchn32 = "null"
>> >  COMPATIBLE_HOST_mipsarchn64 = "null"
>> > --
>> > 2.17.0
>> >
>> > --
>> > _______________________________________________
>> > Openembedded-core mailing list
>> > Openembedded-core@lists.openembedded.org
>> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>
>

[-- Attachment #2: Type: text/html, Size: 30247 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 2/3] qemu: upgrade to 2.12.0
  2018-05-29 12:56       ` Martin Jansa
@ 2018-05-29 20:40         ` Martin Jansa
  2018-05-29 23:14           ` Alistair Francis
  2018-05-31 15:41           ` Martin Jansa
  0 siblings, 2 replies; 29+ messages in thread
From: Martin Jansa @ 2018-05-29 20:40 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 24158 bytes --]

After removing ld-is-gold I was able to reproduce the issue.

Unfortunately removing the meta/recipes-devtools/qemu/qemu
/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch doesn't help
with the hang, then I've tried to upgrade to latest SRCREV in qemu master
(currently 5a5c383b1373aeb6c87a0d6060f6c3dc7c53082b)

Will try to bisect where it started to hang between 2.11.0 and 2.12.0, but
it might be faster if Alistair Francis can chime in as the author of this
patch, he might have better idea why it stopped working.

Cheers,

On Tue, May 29, 2018 at 2:56 PM Martin Jansa <martin.jansa@gmail.com> wrote:

> I've tried to reproduce it locally, but g-ir-scanner-qemuwrapper is
> failing for me in various recipes and I never got as far as webkitgtk
>
> pango:
> Error relocating
> TOPDIR/tmp-musl/work/i586-oe-linux-musl/pango/1.40.14-r0/recipe-sysroot//usr/lib/libGL.so.1:
> __glX_tls_Context: symbol not found
> http://errors.yoctoproject.org/Errors/Details/178988/
>
> after disabling GI for pango (GI_DATA_ENABLED_pn-pango = "False") it
> failed in
> librsvg:
> Error relocating
> TOPDIR/tmp-musl/work/i586-oe-linux-musl/librsvg/2.40.20-r0/recipe-sysroot//usr/lib/libGL.so.1:
> __glX_tls_Context: symbol not found
> http://errors.yoctoproject.org/Errors/Details/178991/
>
> gstreamer1.0-plugins-base:
> Error relocating
> TOPDIR/tmp-musl/work/i586-oe-linux-musl/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot//usr/lib/libEGL.so.1:
> _egl_TLS: symbol not found
> http://errors.yoctoproject.org/Errors/Details/178993/
>
> and gtk+3 as well, because of disabled GI for pango:
> Couldn't find include 'Pango-1.0.gir' (search path:
> '['TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gir-1.0',
> '../gdk',
> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gir-1.0',
> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot-native/usr/share/gir-1.0',
> '/usr/share/gir-1.0',
> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot-native/usr/share/gir-1.0']')
> TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gobject-introspection-1.0/Makefile.introspection:159:
> recipe for target 'Gdk-3.0.gir' failed
> http://errors.yoctoproject.org/Errors/Details/178992/
>
> I'm not sure how exactly AB is doing this qemux86 musl build, it might be
> some more changes I have locally or missing/superfluous something in my
> config.
>
> On Tue, May 29, 2018 at 11:10 AM Martin Jansa <martin.jansa@gmail.com>
> wrote:
>
>> This hang should have been fixed by:
>>
>> meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
>>
>> which was added with previous upgrade to 2.11.0:
>>
>> commit d6d0d99569e0d8b62a61e27d389e7939af45bab9
>> Author: Alistair Francis <alistair.francis@xilinx.com>
>> Date:   Wed Jan 17 13:39:06 2018 -0800
>>
>>     qemu: Bump to version 2.11.0
>>
>> and my update only shifted the chunk by 2 lines in:
>>
>> commit a742584f253e25b97729abe19ca9e4fa2809ea2e
>> Author: Martin Jansa <martin.jansa@gmail.com>
>> Date:   Wed May 2 14:37:33 2018 +0000
>>
>>     qemu: refresh patches with devtool
>>
>> and the patch is still being applied. I was waiting for
>> http://jenkins.nas-admin.org/view/OE/job/oe_world_qemux86/ to reproduce
>> it, but it seems that Khem is working on some bigger overhaul of the jobs
>> and it's not ready yet, I'll try to reproduce it locally now and if I can
>> reproduce it, then I'll try to just remove this patch, because the upstream
>> didn't accept it very well in:
>> http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg04185.html
>> and the discussion there died few months ago.
>>
>> Regards,
>>
>> On Fri, May 18, 2018 at 11:59 PM Burton, Ross <ross.burton@intel.com>
>> wrote:
>>
>>> This is causing the AB to hang when built for qemux86 with musl whilst
>>> building webkitgtk during the gobject-introspection qemu-i386 calls,
>>> qemu enters an infinite loop.
>>>
>>> I've not yet reproduced locally to try and get a log out of qemu, but
>>> it has happened on the autobuilder repeatedly.
>>>
>>> Ross
>>>
>>> On 2 May 2018 at 15:37, Martin Jansa <martin.jansa@gmail.com> wrote:
>>> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
>>> > ---
>>> >  meta/conf/distro/include/tcmode-default.inc   |  2 +-
>>> >  ...4-treat-DISAS_UPDATE-as-variant-of-D.patch | 67 -------------------
>>> >  ...-connect-socket-to-a-spawned-command.patch | 52 +++++++-------
>>> >  .../qemu/qemu/disable-grabs.patch             | 43 ++++++------
>>> >  meta/recipes-devtools/qemu/qemu/memfd.patch   | 57 ----------------
>>> >  .../qemu/qemu/qemu-2.5.0-cflags.patch         | 15 ++++-
>>> >  .../qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}   |  6 +-
>>> >  7 files changed, 65 insertions(+), 177 deletions(-)
>>> >  delete mode 100644
>>> meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>>> >  delete mode 100644 meta/recipes-devtools/qemu/qemu/memfd.patch
>>> >  rename meta/recipes-devtools/qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}
>>> (87%)
>>> >
>>> > diff --git a/meta/conf/distro/include/tcmode-default.inc
>>> b/meta/conf/distro/include/tcmode-default.inc
>>> > index 00399ae820..8b5214ed96 100644
>>> > --- a/meta/conf/distro/include/tcmode-default.inc
>>> > +++ b/meta/conf/distro/include/tcmode-default.inc
>>> > @@ -28,7 +28,7 @@ BINUVERSION ?= "2.30%"
>>> >  GDBVERSION ?= "8.0%"
>>> >  GLIBCVERSION ?= "2.27%"
>>> >  LINUXLIBCVERSION ?= "4.15%"
>>> > -QEMUVERSION ?= "2.11%"
>>> > +QEMUVERSION ?= "2.12%"
>>> >
>>> >  PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
>>> >  PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
>>> > diff --git
>>> a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>>> b/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>>> > deleted file mode 100644
>>> > index f90cae694c..0000000000
>>> > ---
>>> a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>>> > +++ /dev/null
>>> > @@ -1,67 +0,0 @@
>>> > -From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00 2001
>>> > -From: Victor Kamensky <kamensky@cisco.com>
>>> > -Date: Fri, 23 Mar 2018 18:26:45 +0000
>>> > -Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of
>>> > - DISAS_EXIT
>>> > -MIME-Version: 1.0
>>> > -Content-Type: text/plain; charset=UTF-8
>>> > -Content-Transfer-Encoding: 8bit
>>> > -
>>> > -In OE project 4.15 linux kernel boot hang was observed under
>>> > -single cpu aarch64 qemu. Kernel code was in a loop waiting for
>>> > -vtimer arrival, spinning in TC generated blocks, while interrupt
>>> > -was pending unprocessed. This happened because when qemu tried to
>>> > -handle vtimer interrupt target had interrupts disabled, as
>>> > -result flag indicating TCG exit, cpu->icount_decr.u16.high,
>>> > -was cleared but arm_cpu_exec_interrupt function did not call
>>> > -arm_cpu_do_interrupt to process interrupt. Later when target
>>> > -reenabled interrupts, it happened without exit into main loop, so
>>> > -following code that waited for result of interrupt execution
>>> > -run in infinite loop.
>>> > -
>>> > -To solve the problem instructions that operate on CPU sys state
>>> > -(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
>>> > -should be considered as DISAS_EXIT variant, and should be
>>> > -forced to exit back to main loop so qemu will have a chance
>>> > -processing pending CPU state updates, including pending
>>> > -interrupts.
>>> > -
>>> > -This change brings consistency with how DISAS_UPDATE is treated
>>> > -in aarch32 case.
>>> > -
>>> > -CC: Peter Maydell <peter.maydell@linaro.org>
>>> > -CC: Alex Bennée <alex.bennee@linaro.org>
>>> > -CC: qemu-stable@nongnu.org
>>> > -Suggested-by: Peter Maydell <peter.maydell@linaro.org>
>>> > -Signed-off-by: Victor Kamensky <kamensky@cisco.com>
>>> > -Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>>> > -Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
>>> > -Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>>> > -Upstream-Status: Backport
>>> > ----
>>> > - target/arm/translate-a64.c | 6 +++---
>>> > - 1 file changed, 3 insertions(+), 3 deletions(-)
>>> > -
>>> > -diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
>>> > -index 31ff047..327513e 100644
>>> > ---- a/target/arm/translate-a64.c
>>> > -+++ b/target/arm/translate-a64.c
>>> > -@@ -13378,12 +13378,12 @@ static void
>>> aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
>>> > -         case DISAS_UPDATE:
>>> > -             gen_a64_set_pc_im(dc->pc);
>>> > -             /* fall through */
>>> > --        case DISAS_JUMP:
>>> > --            tcg_gen_lookup_and_goto_ptr();
>>> > --            break;
>>> > -         case DISAS_EXIT:
>>> > -             tcg_gen_exit_tb(0);
>>> > -             break;
>>> > -+        case DISAS_JUMP:
>>> > -+            tcg_gen_lookup_and_goto_ptr();
>>> > -+            break;
>>> > -         case DISAS_NORETURN:
>>> > -         case DISAS_SWI:
>>> > -             break;
>>> > ---
>>> > -2.7.4
>>> > -
>>> > diff --git
>>> a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>>> b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>>> > index 6e6bf95c18..f1cf53a8c5 100644
>>> > ---
>>> a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>>> > +++
>>> b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>>> > @@ -1,4 +1,4 @@
>>> > -From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00 2001
>>> > +From a7690b02df70e0d3957e6eaa1e1cf92595839fbb Mon Sep 17 00:00:00 2001
>>> >  From: Alistair Francis <alistair.francis@xilinx.com>
>>> >  Date: Thu, 21 Dec 2017 11:35:16 -0800
>>> >  Subject: [PATCH] chardev: connect socket to a spawned command
>>> > @@ -45,16 +45,16 @@ Upstream-Status: Inappropriate [embedded specific]
>>> >
>>> >  Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
>>> >  ---
>>> > - chardev/char-socket.c | 86
>>> ++++++++++++++++++++++++++++++++++++++++++++++++---
>>> > - chardev/char.c        |  3 ++
>>> > - qapi/char.json        |  5 +++
>>> > - 3 files changed, 90 insertions(+), 4 deletions(-)
>>> > + chardev/char-socket.c | 102
>>> ++++++++++++++++++++++++++++++++++++++++++
>>> > + chardev/char.c        |   3 ++
>>> > + qapi/char.json        |   5 +++
>>> > + 3 files changed, 110 insertions(+)
>>> >
>>> >  diff --git a/chardev/char-socket.c b/chardev/char-socket.c
>>> > -index 53eda8ef00..f566107c35 100644
>>> > +index 159e69c3b1..84778cf31a 100644
>>> >  --- a/chardev/char-socket.c
>>> >  +++ b/chardev/char-socket.c
>>> > -@@ -852,6 +852,68 @@ static gboolean
>>> socket_reconnect_timeout(gpointer opaque)
>>> > +@@ -934,6 +934,68 @@ static gboolean
>>> socket_reconnect_timeout(gpointer opaque)
>>> >       return false;
>>> >   }
>>> >
>>> > @@ -123,7 +123,7 @@ index 53eda8ef00..f566107c35 100644
>>> >   static void qmp_chardev_open_socket(Chardev *chr,
>>> >                                       ChardevBackend *backend,
>>> >                                       bool *be_opened,
>>> > -@@ -859,6 +921,9 @@
>>> > +@@ -941,6 +1003,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
>>> >   {
>>> >       SocketChardev *s = SOCKET_CHARDEV(chr);
>>> >       ChardevSocket *sock = backend->u.socket.data;
>>> > @@ -133,11 +133,10 @@ index 53eda8ef00..f566107c35 100644
>>> >       bool do_nodelay     = sock->has_nodelay ? sock->nodelay : false;
>>> >       bool is_listen      = sock->has_server  ? sock->server  : true;
>>> >       bool is_telnet      = sock->has_telnet  ? sock->telnet  : false;
>>> > -@@ -925,7 +990,14 @@
>>> > -     } else if (reconnect > 0) {
>>> > +@@ -1008,6 +1073,14 @@ static void qmp_chardev_open_socket(Chardev
>>> *chr,
>>> >           s->reconnect_time = reconnect;
>>> >       }
>>> > --
>>> > +
>>> >  +#ifndef _WIN32
>>> >  +    if (cmd) {
>>> >  +        chardev_open_socket_cmd(chr, cmd, errp);
>>> > @@ -146,12 +145,12 @@ index 53eda8ef00..f566107c35 100644
>>> >  +        *be_opened = true;
>>> >  +    } else
>>> >  +#endif
>>> > -     if (s->reconnect_time) {
>>> > -         sioc = qio_channel_socket_new();
>>> > -         tcp_chr_set_client_ioc_name(chr, sioc);
>>> > -@@ -985,10 +1057,26 @@
>>> > -     const char *host = qemu_opt_get(opts, "host");
>>> > +     /* If reconnect_time is set, will do that in chr_machine_done. */
>>> > +     if (!s->reconnect_time) {
>>> > +         if (s->is_listen) {
>>> > +@@ -1065,9 +1138,26 @@ static void qemu_chr_parse_socket(QemuOpts
>>> *opts, ChardevBackend *backend,
>>> >       const char *port = qemu_opt_get(opts, "port");
>>> > +     const char *fd = qemu_opt_get(opts, "fd");
>>> >       const char *tls_creds = qemu_opt_get(opts, "tls-creds");
>>> >  +#ifndef _WIN32
>>> >  +    const char *cmd = qemu_opt_get(opts, "cmd");
>>> > @@ -159,7 +158,6 @@ index 53eda8ef00..f566107c35 100644
>>> >       SocketAddressLegacy *addr;
>>> >       ChardevSocket *sock;
>>> >
>>> > -     backend->type = CHARDEV_BACKEND_KIND_SOCKET;
>>> >  +#ifndef _WIN32
>>> >  +    if (cmd) {
>>> >  +        /*
>>> > @@ -173,17 +171,18 @@ index 53eda8ef00..f566107c35 100644
>>> >  +        }
>>> >  +    } else
>>> >  +#endif
>>> > -     if (!path) {
>>> > -         if (!host) {
>>> > -             error_setg(errp, "chardev: socket: no host given");
>>> > -@@ -1021,13 +1109,24 @@
>>> > -     sock->has_reconnect = true;
>>> > ++
>>> > +     if ((!!path + !!fd + !!host) != 1) {
>>> > +         error_setg(errp,
>>> > +                    "Exactly one of 'path', 'fd' or 'host' required");
>>> > +@@ -1112,12 +1202,24 @@ static void qemu_chr_parse_socket(QemuOpts
>>> *opts, ChardevBackend *backend,
>>> >       sock->reconnect = reconnect;
>>> >       sock->tls_creds = g_strdup(tls_creds);
>>> > +
>>> >  +#ifndef _WIN32
>>> >  +    sock->cmd = g_strdup(cmd);
>>> >  +#endif
>>> > -
>>> > ++
>>> >       addr = g_new0(SocketAddressLegacy, 1);
>>> >  +#ifndef _WIN32
>>> >  +    if (path || cmd) {
>>> > @@ -198,11 +197,11 @@ index 53eda8ef00..f566107c35 100644
>>> >  +#else
>>> >           q_unix->path = g_strdup(path);
>>> >  +#endif
>>> > -     } else {
>>> > +     } else if (host) {
>>> >           addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
>>> >           addr->u.inet.data = g_new(InetSocketAddress, 1);
>>> >  diff --git a/chardev/char.c b/chardev/char.c
>>> > -index 2ae4f465ec..5d52cd5de5 100644
>>> > +index 76d866e6fe..9747d51d7c 100644
>>> >  --- a/chardev/char.c
>>> >  +++ b/chardev/char.c
>>> >  @@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
>>> > @@ -239,4 +238,5 @@ index ae19dcd1ed..6de0f29bcd 100644
>>> >                                        '*server'    : 'bool',
>>> >                                        '*wait'      : 'bool',
>>> >  --
>>> > -2.14.1
>>> > +2.17.0
>>> > +
>>> > diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>>> b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>>> > index 77117890f4..e29c011a6f 100644
>>> > --- a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>>> > +++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>>> > @@ -1,3 +1,11 @@
>>> > +From a31c5c695cb716310257f1fc60a06b821e74fe7f Mon Sep 17 00:00:00 2001
>>> > +From: Ross Burton <ross.burton@intel.com>
>>> > +Date: Wed, 18 Sep 2013 14:04:54 +0100
>>> > +Subject: [PATCH] sdl.c: allow user to disable pointer grabs
>>> > +MIME-Version: 1.0
>>> > +Content-Type: text/plain; charset=UTF-8
>>> > +Content-Transfer-Encoding: 8bit
>>> > +
>>> >  When the pointer enters the Qemu window it calls SDL_WM_GrabInput,
>>> which calls
>>> >  XGrabPointer in a busyloop until it returns GrabSuccess. However if
>>> there's already
>>> >  a pointer grab (screen is locked, a menu is open) then qemu will hang
>>> until the
>>> > @@ -11,35 +19,30 @@ them in a conditional that can be set by the
>>> autobuilder environment, preserving
>>> >  the current grabbing behaviour for everyone else.
>>> >
>>> >  Upstream-Status: Pending
>>> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
>>> > -
>>> > -From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00 2001
>>> > -From: Ross Burton <ross.burton@intel.com>
>>> > -Date: Wed, 18 Sep 2013 14:04:54 +0100
>>> > -Subject: [PATCH] sdl.c: allow user to disable pointer grabs
>>> > -
>>> >  Signed-off-by: Ross Burton <ross.burton@intel.com>
>>> >  Signed-off-by: Eric Bénard <eric@eukrea.com>
>>> > +
>>> >  ---
>>> > - ui/sdl.c | 12 ++++++++++--
>>> > - 1 file changed, 10 insertions(+), 2 deletions(-)
>>> > + ui/sdl.c | 13 +++++++++++--
>>> > + 1 file changed, 11 insertions(+), 2 deletions(-)
>>> >
>>> > -Index: qemu-2.11.1/ui/sdl.c
>>> > -===================================================================
>>> > ---- qemu-2.11.1.orig/ui/sdl.c
>>> > -+++ qemu-2.11.1/ui/sdl.c
>>> > -@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
>>> > - static int scaling_active = 0;
>>> > - static Notifier mouse_mode_notifier;
>>> > - static int idle_counter;
>>> > +diff --git a/ui/sdl.c b/ui/sdl.c
>>> > +index a5fd503..ab8d1b1 100644
>>> > +--- a/ui/sdl.c
>>> > ++++ b/ui/sdl.c
>>> > +@@ -68,6 +68,11 @@ static int idle_counter;
>>> > + static const guint16 *keycode_map;
>>> > + static size_t keycode_maplen;
>>> > +
>>> >  +#ifndef True
>>> >  +#define True 1
>>> >  +#endif
>>> >  +static doing_grabs = True;
>>> > -
>>> > ++
>>> >   #define SDL_REFRESH_INTERVAL_BUSY 10
>>> >   #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
>>> > -@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
>>> > +                             / SDL_REFRESH_INTERVAL_BUSY + 1)
>>> > +@@ -398,14 +403,16 @@ static void sdl_grab_start(void)
>>> >           }
>>> >       } else
>>> >           sdl_hide_cursor();
>>> > @@ -58,7 +61,7 @@ Index: qemu-2.11.1/ui/sdl.c
>>> >       gui_grab = 0;
>>> >       sdl_show_cursor();
>>> >       sdl_update_caption();
>>> > -@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
>>> > +@@ -945,6 +952,8 @@ static void sdl1_display_init(DisplayState *ds,
>>> DisplayOptions *o)
>>> >        * This requires SDL >= 1.2.14. */
>>> >       setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
>>> >
>>> > diff --git a/meta/recipes-devtools/qemu/qemu/memfd.patch
>>> b/meta/recipes-devtools/qemu/qemu/memfd.patch
>>> > deleted file mode 100644
>>> > index 62e8d3800b..0000000000
>>> > --- a/meta/recipes-devtools/qemu/qemu/memfd.patch
>>> > +++ /dev/null
>>> > @@ -1,57 +0,0 @@
>>> > -Upstream-Status: Backport
>>> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
>>> > -
>>> > -From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001
>>> > -From: Paolo Bonzini <pbonzini@redhat.com>
>>> > -Date: Tue, 28 Nov 2017 11:51:27 +0100
>>> > -Subject: [PATCH] memfd: fix configure test
>>> > -MIME-Version: 1.0
>>> > -Content-Type: text/plain; charset=UTF-8
>>> > -Content-Transfer-Encoding: 8bit
>>> > -
>>> > -Recent glibc added memfd_create in sys/mman.h.  This conflicts with
>>> > -the definition in util/memfd.c:
>>> > -
>>> > -    /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error:
>>> static declaration of memfd_create follows non-static declaration
>>> > -
>>> > -Fix the configure test, and remove the sys/memfd.h inclusion since the
>>> > -file actually does not exist---it is a typo in the memfd_create(2) man
>>> > -page.
>>> > -
>>> > -Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
>>> > -Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>> > ----
>>> > - configure    | 2 +-
>>> > - util/memfd.c | 4 +---
>>> > - 2 files changed, 2 insertions(+), 4 deletions(-)
>>> > -
>>> > -diff --git a/configure b/configure
>>> > -index 9c8aa5a98b..99ccc1725a 100755
>>> > ---- a/configure
>>> > -+++ b/configure
>>> > -@@ -3923,7 +3923,7 @@ fi
>>> > - # check if memfd is supported
>>> > - memfd=no
>>> > - cat > $TMPC << EOF
>>> > --#include <sys/memfd.h>
>>> > -+#include <sys/mman.h>
>>> > -
>>> > - int main(void)
>>> > - {
>>> > -diff --git a/util/memfd.c b/util/memfd.c
>>> > -index 4571d1aba8..412e94a405 100644
>>> > ---- a/util/memfd.c
>>> > -+++ b/util/memfd.c
>>> > -@@ -31,9 +31,7 @@
>>> > -
>>> > - #include "qemu/memfd.h"
>>> > -
>>> > --#ifdef CONFIG_MEMFD
>>> > --#include <sys/memfd.h>
>>> > --#elif defined CONFIG_LINUX
>>> > -+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
>>> > - #include <sys/syscall.h>
>>> > - #include <asm/unistd.h>
>>> > -
>>> > ---
>>> > -2.11.0
>>> > diff --git a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>>> b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>>> > index eb99d14639..360519f1a1 100644
>>> > --- a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>>> > +++ b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>>> > @@ -1,8 +1,19 @@
>>> > +From 6702ec74a7ba90b99efedde260c9f08b75d5516d Mon Sep 17 00:00:00 2001
>>> > +From: Stephen Arnold <sarnold@vctlabs.com>
>>> > +Date: Sun, 12 Jun 2016 18:09:56 -0700
>>> > +Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some
>>> environment
>>> > +
>>> >  Upstream-Status: Pending
>>> >
>>> > +---
>>> > + configure | 4 ----
>>> > + 1 file changed, 4 deletions(-)
>>> > +
>>> > +diff --git a/configure b/configure
>>> > +index 69e05fb..12fc3d8 100755
>>> >  --- a/configure
>>> >  +++ b/configure
>>> > -@@ -4468,10 +4468,6 @@ fi
>>> > +@@ -5413,10 +5413,6 @@ write_c_skeleton
>>> >   if test "$gcov" = "yes" ; then
>>> >     CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
>>> >     LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
>>> > @@ -12,4 +23,4 @@ Upstream-Status: Pending
>>> >  -  CFLAGS="-O2 $CFLAGS"
>>> >   fi
>>> >
>>> > - ##########################################
>>> > + if test "$have_asan" = "yes"; then
>>> > diff --git a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
>>> b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
>>> > similarity index 87%
>>> > rename from meta/recipes-devtools/qemu/qemu_2.11.1.bb
>>> > rename to meta/recipes-devtools/qemu/qemu_2.12.0.bb
>>> > index f4b7d69fca..63590fc9eb 100644
>>> > --- a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
>>> > +++ b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
>>> > @@ -20,8 +20,6 @@ SRC_URI = "
>>> http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
>>> >             file://chardev-connect-socket-to-a-spawned-command.patch \
>>> >             file://apic-fixup-fallthrough-to-PIC.patch \
>>> >
>>>  file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
>>> > -           file://memfd.patch \
>>> > -
>>>  file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
>>> >             "
>>> >  UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
>>> >
>>> > @@ -31,8 +29,8 @@ SRC_URI_append_class-native = " \
>>> >              file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
>>> >              "
>>> >
>>> > -SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
>>> > -SRC_URI[sha256sum] =
>>> "d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb"
>>> > +SRC_URI[md5sum] = "122fd7cdf241ff7eb1e42c0b503b5d1b"
>>> > +SRC_URI[sha256sum] =
>>> "c9f4a147bc915d24df9784affc611a115f42d24720a89210b479f1ba7a3f679c"
>>> >
>>> >  COMPATIBLE_HOST_mipsarchn32 = "null"
>>> >  COMPATIBLE_HOST_mipsarchn64 = "null"
>>> > --
>>> > 2.17.0
>>> >
>>> > --
>>> > _______________________________________________
>>> > Openembedded-core mailing list
>>> > Openembedded-core@lists.openembedded.org
>>> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>>
>>

[-- Attachment #2: Type: text/html, Size: 35637 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 2/3] qemu: upgrade to 2.12.0
  2018-05-29 20:40         ` Martin Jansa
@ 2018-05-29 23:14           ` Alistair Francis
  2018-05-30  2:16             ` Khem Raj
  2018-05-31 15:41           ` Martin Jansa
  1 sibling, 1 reply; 29+ messages in thread
From: Alistair Francis @ 2018-05-29 23:14 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On Tue, May 29, 2018 at 1:40 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> After removing ld-is-gold I was able to reproduce the issue.
>
> Unfortunately removing the
> meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
> doesn't help with the hang, then I've tried to upgrade to latest SRCREV in
> qemu master (currently 5a5c383b1373aeb6c87a0d6060f6c3dc7c53082b)
>
> Will try to bisect where it started to hang between 2.11.0 and 2.12.0, but
> it might be faster if Alistair Francis can chime in as the author of this
> patch, he might have better idea why it stopped working.

I'm not sure why it would stop working between the two releases.

I can't reproduce the hang, I just see this compilation error when
buidling webkitgtk with musl:

/scratch/alistair/yocto/oe-master/build/tmp-musl/work/core2-64-oe-linux-musl/webkitgtk/2.20.2-r0/webkitgtk-2.20.2/Source/WebCore/platform/graphics/OpenGLShims.h:23:10:
fatal error: GL/gl.h: No such file or directory
 #include <GL/gl.h>

Alistair

>
> Cheers,
>
> On Tue, May 29, 2018 at 2:56 PM Martin Jansa <martin.jansa@gmail.com> wrote:
>>
>> I've tried to reproduce it locally, but g-ir-scanner-qemuwrapper is
>> failing for me in various recipes and I never got as far as webkitgtk
>>
>> pango:
>> Error relocating
>> TOPDIR/tmp-musl/work/i586-oe-linux-musl/pango/1.40.14-r0/recipe-sysroot//usr/lib/libGL.so.1:
>> __glX_tls_Context: symbol not found
>> http://errors.yoctoproject.org/Errors/Details/178988/
>>
>> after disabling GI for pango (GI_DATA_ENABLED_pn-pango = "False") it
>> failed in
>> librsvg:
>> Error relocating
>> TOPDIR/tmp-musl/work/i586-oe-linux-musl/librsvg/2.40.20-r0/recipe-sysroot//usr/lib/libGL.so.1:
>> __glX_tls_Context: symbol not found
>> http://errors.yoctoproject.org/Errors/Details/178991/
>>
>> gstreamer1.0-plugins-base:
>> Error relocating
>> TOPDIR/tmp-musl/work/i586-oe-linux-musl/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot//usr/lib/libEGL.so.1:
>> _egl_TLS: symbol not found
>> http://errors.yoctoproject.org/Errors/Details/178993/
>>
>> and gtk+3 as well, because of disabled GI for pango:
>> Couldn't find include 'Pango-1.0.gir' (search path:
>> '['TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gir-1.0',
>> '../gdk',
>> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gir-1.0',
>> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot-native/usr/share/gir-1.0',
>> '/usr/share/gir-1.0',
>> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot-native/usr/share/gir-1.0']')
>>
>> TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gobject-introspection-1.0/Makefile.introspection:159:
>> recipe for target 'Gdk-3.0.gir' failed
>> http://errors.yoctoproject.org/Errors/Details/178992/
>>
>> I'm not sure how exactly AB is doing this qemux86 musl build, it might be
>> some more changes I have locally or missing/superfluous something in my
>> config.
>>
>> On Tue, May 29, 2018 at 11:10 AM Martin Jansa <martin.jansa@gmail.com>
>> wrote:
>>>
>>> This hang should have been fixed by:
>>>
>>> meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
>>>
>>> which was added with previous upgrade to 2.11.0:
>>>
>>> commit d6d0d99569e0d8b62a61e27d389e7939af45bab9
>>> Author: Alistair Francis <alistair.francis@xilinx.com>
>>> Date:   Wed Jan 17 13:39:06 2018 -0800
>>>
>>>     qemu: Bump to version 2.11.0
>>>
>>> and my update only shifted the chunk by 2 lines in:
>>>
>>> commit a742584f253e25b97729abe19ca9e4fa2809ea2e
>>> Author: Martin Jansa <martin.jansa@gmail.com>
>>> Date:   Wed May 2 14:37:33 2018 +0000
>>>
>>>     qemu: refresh patches with devtool
>>>
>>> and the patch is still being applied. I was waiting for
>>> http://jenkins.nas-admin.org/view/OE/job/oe_world_qemux86/ to reproduce it,
>>> but it seems that Khem is working on some bigger overhaul of the jobs and
>>> it's not ready yet, I'll try to reproduce it locally now and if I can
>>> reproduce it, then I'll try to just remove this patch, because the upstream
>>> didn't accept it very well in:
>>> http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg04185.html
>>> and the discussion there died few months ago.
>>>
>>> Regards,
>>>
>>> On Fri, May 18, 2018 at 11:59 PM Burton, Ross <ross.burton@intel.com>
>>> wrote:
>>>>
>>>> This is causing the AB to hang when built for qemux86 with musl whilst
>>>> building webkitgtk during the gobject-introspection qemu-i386 calls,
>>>> qemu enters an infinite loop.
>>>>
>>>> I've not yet reproduced locally to try and get a log out of qemu, but
>>>> it has happened on the autobuilder repeatedly.
>>>>
>>>> Ross
>>>>
>>>> On 2 May 2018 at 15:37, Martin Jansa <martin.jansa@gmail.com> wrote:
>>>> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
>>>> > ---
>>>> >  meta/conf/distro/include/tcmode-default.inc   |  2 +-
>>>> >  ...4-treat-DISAS_UPDATE-as-variant-of-D.patch | 67
>>>> > -------------------
>>>> >  ...-connect-socket-to-a-spawned-command.patch | 52 +++++++-------
>>>> >  .../qemu/qemu/disable-grabs.patch             | 43 ++++++------
>>>> >  meta/recipes-devtools/qemu/qemu/memfd.patch   | 57 ----------------
>>>> >  .../qemu/qemu/qemu-2.5.0-cflags.patch         | 15 ++++-
>>>> >  .../qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}   |  6 +-
>>>> >  7 files changed, 65 insertions(+), 177 deletions(-)
>>>> >  delete mode 100644
>>>> > meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>>>> >  delete mode 100644 meta/recipes-devtools/qemu/qemu/memfd.patch
>>>> >  rename meta/recipes-devtools/qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}
>>>> > (87%)
>>>> >
>>>> > diff --git a/meta/conf/distro/include/tcmode-default.inc
>>>> > b/meta/conf/distro/include/tcmode-default.inc
>>>> > index 00399ae820..8b5214ed96 100644
>>>> > --- a/meta/conf/distro/include/tcmode-default.inc
>>>> > +++ b/meta/conf/distro/include/tcmode-default.inc
>>>> > @@ -28,7 +28,7 @@ BINUVERSION ?= "2.30%"
>>>> >  GDBVERSION ?= "8.0%"
>>>> >  GLIBCVERSION ?= "2.27%"
>>>> >  LINUXLIBCVERSION ?= "4.15%"
>>>> > -QEMUVERSION ?= "2.11%"
>>>> > +QEMUVERSION ?= "2.12%"
>>>> >
>>>> >  PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
>>>> >  PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
>>>> > diff --git
>>>> > a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>>>> > b/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>>>> > deleted file mode 100644
>>>> > index f90cae694c..0000000000
>>>> > ---
>>>> > a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>>>> > +++ /dev/null
>>>> > @@ -1,67 +0,0 @@
>>>> > -From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00
>>>> > 2001
>>>> > -From: Victor Kamensky <kamensky@cisco.com>
>>>> > -Date: Fri, 23 Mar 2018 18:26:45 +0000
>>>> > -Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of
>>>> > - DISAS_EXIT
>>>> > -MIME-Version: 1.0
>>>> > -Content-Type: text/plain; charset=UTF-8
>>>> > -Content-Transfer-Encoding: 8bit
>>>> > -
>>>> > -In OE project 4.15 linux kernel boot hang was observed under
>>>> > -single cpu aarch64 qemu. Kernel code was in a loop waiting for
>>>> > -vtimer arrival, spinning in TC generated blocks, while interrupt
>>>> > -was pending unprocessed. This happened because when qemu tried to
>>>> > -handle vtimer interrupt target had interrupts disabled, as
>>>> > -result flag indicating TCG exit, cpu->icount_decr.u16.high,
>>>> > -was cleared but arm_cpu_exec_interrupt function did not call
>>>> > -arm_cpu_do_interrupt to process interrupt. Later when target
>>>> > -reenabled interrupts, it happened without exit into main loop, so
>>>> > -following code that waited for result of interrupt execution
>>>> > -run in infinite loop.
>>>> > -
>>>> > -To solve the problem instructions that operate on CPU sys state
>>>> > -(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
>>>> > -should be considered as DISAS_EXIT variant, and should be
>>>> > -forced to exit back to main loop so qemu will have a chance
>>>> > -processing pending CPU state updates, including pending
>>>> > -interrupts.
>>>> > -
>>>> > -This change brings consistency with how DISAS_UPDATE is treated
>>>> > -in aarch32 case.
>>>> > -
>>>> > -CC: Peter Maydell <peter.maydell@linaro.org>
>>>> > -CC: Alex Bennée <alex.bennee@linaro.org>
>>>> > -CC: qemu-stable@nongnu.org
>>>> > -Suggested-by: Peter Maydell <peter.maydell@linaro.org>
>>>> > -Signed-off-by: Victor Kamensky <kamensky@cisco.com>
>>>> > -Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>>>> > -Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
>>>> > -Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>>>> > -Upstream-Status: Backport
>>>> > ----
>>>> > - target/arm/translate-a64.c | 6 +++---
>>>> > - 1 file changed, 3 insertions(+), 3 deletions(-)
>>>> > -
>>>> > -diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
>>>> > -index 31ff047..327513e 100644
>>>> > ---- a/target/arm/translate-a64.c
>>>> > -+++ b/target/arm/translate-a64.c
>>>> > -@@ -13378,12 +13378,12 @@ static void
>>>> > aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
>>>> > -         case DISAS_UPDATE:
>>>> > -             gen_a64_set_pc_im(dc->pc);
>>>> > -             /* fall through */
>>>> > --        case DISAS_JUMP:
>>>> > --            tcg_gen_lookup_and_goto_ptr();
>>>> > --            break;
>>>> > -         case DISAS_EXIT:
>>>> > -             tcg_gen_exit_tb(0);
>>>> > -             break;
>>>> > -+        case DISAS_JUMP:
>>>> > -+            tcg_gen_lookup_and_goto_ptr();
>>>> > -+            break;
>>>> > -         case DISAS_NORETURN:
>>>> > -         case DISAS_SWI:
>>>> > -             break;
>>>> > ---
>>>> > -2.7.4
>>>> > -
>>>> > diff --git
>>>> > a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>>>> > b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>>>> > index 6e6bf95c18..f1cf53a8c5 100644
>>>> > ---
>>>> > a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>>>> > +++
>>>> > b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>>>> > @@ -1,4 +1,4 @@
>>>> > -From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00
>>>> > 2001
>>>> > +From a7690b02df70e0d3957e6eaa1e1cf92595839fbb Mon Sep 17 00:00:00
>>>> > 2001
>>>> >  From: Alistair Francis <alistair.francis@xilinx.com>
>>>> >  Date: Thu, 21 Dec 2017 11:35:16 -0800
>>>> >  Subject: [PATCH] chardev: connect socket to a spawned command
>>>> > @@ -45,16 +45,16 @@ Upstream-Status: Inappropriate [embedded specific]
>>>> >
>>>> >  Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
>>>> >  ---
>>>> > - chardev/char-socket.c | 86
>>>> > ++++++++++++++++++++++++++++++++++++++++++++++++---
>>>> > - chardev/char.c        |  3 ++
>>>> > - qapi/char.json        |  5 +++
>>>> > - 3 files changed, 90 insertions(+), 4 deletions(-)
>>>> > + chardev/char-socket.c | 102
>>>> > ++++++++++++++++++++++++++++++++++++++++++
>>>> > + chardev/char.c        |   3 ++
>>>> > + qapi/char.json        |   5 +++
>>>> > + 3 files changed, 110 insertions(+)
>>>> >
>>>> >  diff --git a/chardev/char-socket.c b/chardev/char-socket.c
>>>> > -index 53eda8ef00..f566107c35 100644
>>>> > +index 159e69c3b1..84778cf31a 100644
>>>> >  --- a/chardev/char-socket.c
>>>> >  +++ b/chardev/char-socket.c
>>>> > -@@ -852,6 +852,68 @@ static gboolean
>>>> > socket_reconnect_timeout(gpointer opaque)
>>>> > +@@ -934,6 +934,68 @@ static gboolean
>>>> > socket_reconnect_timeout(gpointer opaque)
>>>> >       return false;
>>>> >   }
>>>> >
>>>> > @@ -123,7 +123,7 @@ index 53eda8ef00..f566107c35 100644
>>>> >   static void qmp_chardev_open_socket(Chardev *chr,
>>>> >                                       ChardevBackend *backend,
>>>> >                                       bool *be_opened,
>>>> > -@@ -859,6 +921,9 @@
>>>> > +@@ -941,6 +1003,9 @@ static void qmp_chardev_open_socket(Chardev
>>>> > *chr,
>>>> >   {
>>>> >       SocketChardev *s = SOCKET_CHARDEV(chr);
>>>> >       ChardevSocket *sock = backend->u.socket.data;
>>>> > @@ -133,11 +133,10 @@ index 53eda8ef00..f566107c35 100644
>>>> >       bool do_nodelay     = sock->has_nodelay ? sock->nodelay : false;
>>>> >       bool is_listen      = sock->has_server  ? sock->server  : true;
>>>> >       bool is_telnet      = sock->has_telnet  ? sock->telnet  : false;
>>>> > -@@ -925,7 +990,14 @@
>>>> > -     } else if (reconnect > 0) {
>>>> > +@@ -1008,6 +1073,14 @@ static void qmp_chardev_open_socket(Chardev
>>>> > *chr,
>>>> >           s->reconnect_time = reconnect;
>>>> >       }
>>>> > --
>>>> > +
>>>> >  +#ifndef _WIN32
>>>> >  +    if (cmd) {
>>>> >  +        chardev_open_socket_cmd(chr, cmd, errp);
>>>> > @@ -146,12 +145,12 @@ index 53eda8ef00..f566107c35 100644
>>>> >  +        *be_opened = true;
>>>> >  +    } else
>>>> >  +#endif
>>>> > -     if (s->reconnect_time) {
>>>> > -         sioc = qio_channel_socket_new();
>>>> > -         tcp_chr_set_client_ioc_name(chr, sioc);
>>>> > -@@ -985,10 +1057,26 @@
>>>> > -     const char *host = qemu_opt_get(opts, "host");
>>>> > +     /* If reconnect_time is set, will do that in chr_machine_done.
>>>> > */
>>>> > +     if (!s->reconnect_time) {
>>>> > +         if (s->is_listen) {
>>>> > +@@ -1065,9 +1138,26 @@ static void qemu_chr_parse_socket(QemuOpts
>>>> > *opts, ChardevBackend *backend,
>>>> >       const char *port = qemu_opt_get(opts, "port");
>>>> > +     const char *fd = qemu_opt_get(opts, "fd");
>>>> >       const char *tls_creds = qemu_opt_get(opts, "tls-creds");
>>>> >  +#ifndef _WIN32
>>>> >  +    const char *cmd = qemu_opt_get(opts, "cmd");
>>>> > @@ -159,7 +158,6 @@ index 53eda8ef00..f566107c35 100644
>>>> >       SocketAddressLegacy *addr;
>>>> >       ChardevSocket *sock;
>>>> >
>>>> > -     backend->type = CHARDEV_BACKEND_KIND_SOCKET;
>>>> >  +#ifndef _WIN32
>>>> >  +    if (cmd) {
>>>> >  +        /*
>>>> > @@ -173,17 +171,18 @@ index 53eda8ef00..f566107c35 100644
>>>> >  +        }
>>>> >  +    } else
>>>> >  +#endif
>>>> > -     if (!path) {
>>>> > -         if (!host) {
>>>> > -             error_setg(errp, "chardev: socket: no host given");
>>>> > -@@ -1021,13 +1109,24 @@
>>>> > -     sock->has_reconnect = true;
>>>> > ++
>>>> > +     if ((!!path + !!fd + !!host) != 1) {
>>>> > +         error_setg(errp,
>>>> > +                    "Exactly one of 'path', 'fd' or 'host'
>>>> > required");
>>>> > +@@ -1112,12 +1202,24 @@ static void qemu_chr_parse_socket(QemuOpts
>>>> > *opts, ChardevBackend *backend,
>>>> >       sock->reconnect = reconnect;
>>>> >       sock->tls_creds = g_strdup(tls_creds);
>>>> > +
>>>> >  +#ifndef _WIN32
>>>> >  +    sock->cmd = g_strdup(cmd);
>>>> >  +#endif
>>>> > -
>>>> > ++
>>>> >       addr = g_new0(SocketAddressLegacy, 1);
>>>> >  +#ifndef _WIN32
>>>> >  +    if (path || cmd) {
>>>> > @@ -198,11 +197,11 @@ index 53eda8ef00..f566107c35 100644
>>>> >  +#else
>>>> >           q_unix->path = g_strdup(path);
>>>> >  +#endif
>>>> > -     } else {
>>>> > +     } else if (host) {
>>>> >           addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
>>>> >           addr->u.inet.data = g_new(InetSocketAddress, 1);
>>>> >  diff --git a/chardev/char.c b/chardev/char.c
>>>> > -index 2ae4f465ec..5d52cd5de5 100644
>>>> > +index 76d866e6fe..9747d51d7c 100644
>>>> >  --- a/chardev/char.c
>>>> >  +++ b/chardev/char.c
>>>> >  @@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
>>>> > @@ -239,4 +238,5 @@ index ae19dcd1ed..6de0f29bcd 100644
>>>> >                                        '*server'    : 'bool',
>>>> >                                        '*wait'      : 'bool',
>>>> >  --
>>>> > -2.14.1
>>>> > +2.17.0
>>>> > +
>>>> > diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>>>> > b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>>>> > index 77117890f4..e29c011a6f 100644
>>>> > --- a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>>>> > +++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>>>> > @@ -1,3 +1,11 @@
>>>> > +From a31c5c695cb716310257f1fc60a06b821e74fe7f Mon Sep 17 00:00:00
>>>> > 2001
>>>> > +From: Ross Burton <ross.burton@intel.com>
>>>> > +Date: Wed, 18 Sep 2013 14:04:54 +0100
>>>> > +Subject: [PATCH] sdl.c: allow user to disable pointer grabs
>>>> > +MIME-Version: 1.0
>>>> > +Content-Type: text/plain; charset=UTF-8
>>>> > +Content-Transfer-Encoding: 8bit
>>>> > +
>>>> >  When the pointer enters the Qemu window it calls SDL_WM_GrabInput,
>>>> > which calls
>>>> >  XGrabPointer in a busyloop until it returns GrabSuccess. However if
>>>> > there's already
>>>> >  a pointer grab (screen is locked, a menu is open) then qemu will hang
>>>> > until the
>>>> > @@ -11,35 +19,30 @@ them in a conditional that can be set by the
>>>> > autobuilder environment, preserving
>>>> >  the current grabbing behaviour for everyone else.
>>>> >
>>>> >  Upstream-Status: Pending
>>>> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
>>>> > -
>>>> > -From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00
>>>> > 2001
>>>> > -From: Ross Burton <ross.burton@intel.com>
>>>> > -Date: Wed, 18 Sep 2013 14:04:54 +0100
>>>> > -Subject: [PATCH] sdl.c: allow user to disable pointer grabs
>>>> > -
>>>> >  Signed-off-by: Ross Burton <ross.burton@intel.com>
>>>> >  Signed-off-by: Eric Bénard <eric@eukrea.com>
>>>> > +
>>>> >  ---
>>>> > - ui/sdl.c | 12 ++++++++++--
>>>> > - 1 file changed, 10 insertions(+), 2 deletions(-)
>>>> > + ui/sdl.c | 13 +++++++++++--
>>>> > + 1 file changed, 11 insertions(+), 2 deletions(-)
>>>> >
>>>> > -Index: qemu-2.11.1/ui/sdl.c
>>>> > -===================================================================
>>>> > ---- qemu-2.11.1.orig/ui/sdl.c
>>>> > -+++ qemu-2.11.1/ui/sdl.c
>>>> > -@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
>>>> > - static int scaling_active = 0;
>>>> > - static Notifier mouse_mode_notifier;
>>>> > - static int idle_counter;
>>>> > +diff --git a/ui/sdl.c b/ui/sdl.c
>>>> > +index a5fd503..ab8d1b1 100644
>>>> > +--- a/ui/sdl.c
>>>> > ++++ b/ui/sdl.c
>>>> > +@@ -68,6 +68,11 @@ static int idle_counter;
>>>> > + static const guint16 *keycode_map;
>>>> > + static size_t keycode_maplen;
>>>> > +
>>>> >  +#ifndef True
>>>> >  +#define True 1
>>>> >  +#endif
>>>> >  +static doing_grabs = True;
>>>> > -
>>>> > ++
>>>> >   #define SDL_REFRESH_INTERVAL_BUSY 10
>>>> >   #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
>>>> > -@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
>>>> > +                             / SDL_REFRESH_INTERVAL_BUSY + 1)
>>>> > +@@ -398,14 +403,16 @@ static void sdl_grab_start(void)
>>>> >           }
>>>> >       } else
>>>> >           sdl_hide_cursor();
>>>> > @@ -58,7 +61,7 @@ Index: qemu-2.11.1/ui/sdl.c
>>>> >       gui_grab = 0;
>>>> >       sdl_show_cursor();
>>>> >       sdl_update_caption();
>>>> > -@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
>>>> > +@@ -945,6 +952,8 @@ static void sdl1_display_init(DisplayState *ds,
>>>> > DisplayOptions *o)
>>>> >        * This requires SDL >= 1.2.14. */
>>>> >       setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
>>>> >
>>>> > diff --git a/meta/recipes-devtools/qemu/qemu/memfd.patch
>>>> > b/meta/recipes-devtools/qemu/qemu/memfd.patch
>>>> > deleted file mode 100644
>>>> > index 62e8d3800b..0000000000
>>>> > --- a/meta/recipes-devtools/qemu/qemu/memfd.patch
>>>> > +++ /dev/null
>>>> > @@ -1,57 +0,0 @@
>>>> > -Upstream-Status: Backport
>>>> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
>>>> > -
>>>> > -From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00
>>>> > 2001
>>>> > -From: Paolo Bonzini <pbonzini@redhat.com>
>>>> > -Date: Tue, 28 Nov 2017 11:51:27 +0100
>>>> > -Subject: [PATCH] memfd: fix configure test
>>>> > -MIME-Version: 1.0
>>>> > -Content-Type: text/plain; charset=UTF-8
>>>> > -Content-Transfer-Encoding: 8bit
>>>> > -
>>>> > -Recent glibc added memfd_create in sys/mman.h.  This conflicts with
>>>> > -the definition in util/memfd.c:
>>>> > -
>>>> > -    /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error:
>>>> > static declaration of memfd_create follows non-static declaration
>>>> > -
>>>> > -Fix the configure test, and remove the sys/memfd.h inclusion since
>>>> > the
>>>> > -file actually does not exist---it is a typo in the memfd_create(2)
>>>> > man
>>>> > -page.
>>>> > -
>>>> > -Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
>>>> > -Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>>> > ----
>>>> > - configure    | 2 +-
>>>> > - util/memfd.c | 4 +---
>>>> > - 2 files changed, 2 insertions(+), 4 deletions(-)
>>>> > -
>>>> > -diff --git a/configure b/configure
>>>> > -index 9c8aa5a98b..99ccc1725a 100755
>>>> > ---- a/configure
>>>> > -+++ b/configure
>>>> > -@@ -3923,7 +3923,7 @@ fi
>>>> > - # check if memfd is supported
>>>> > - memfd=no
>>>> > - cat > $TMPC << EOF
>>>> > --#include <sys/memfd.h>
>>>> > -+#include <sys/mman.h>
>>>> > -
>>>> > - int main(void)
>>>> > - {
>>>> > -diff --git a/util/memfd.c b/util/memfd.c
>>>> > -index 4571d1aba8..412e94a405 100644
>>>> > ---- a/util/memfd.c
>>>> > -+++ b/util/memfd.c
>>>> > -@@ -31,9 +31,7 @@
>>>> > -
>>>> > - #include "qemu/memfd.h"
>>>> > -
>>>> > --#ifdef CONFIG_MEMFD
>>>> > --#include <sys/memfd.h>
>>>> > --#elif defined CONFIG_LINUX
>>>> > -+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
>>>> > - #include <sys/syscall.h>
>>>> > - #include <asm/unistd.h>
>>>> > -
>>>> > ---
>>>> > -2.11.0
>>>> > diff --git a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>>>> > b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>>>> > index eb99d14639..360519f1a1 100644
>>>> > --- a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>>>> > +++ b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>>>> > @@ -1,8 +1,19 @@
>>>> > +From 6702ec74a7ba90b99efedde260c9f08b75d5516d Mon Sep 17 00:00:00
>>>> > 2001
>>>> > +From: Stephen Arnold <sarnold@vctlabs.com>
>>>> > +Date: Sun, 12 Jun 2016 18:09:56 -0700
>>>> > +Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some
>>>> > environment
>>>> > +
>>>> >  Upstream-Status: Pending
>>>> >
>>>> > +---
>>>> > + configure | 4 ----
>>>> > + 1 file changed, 4 deletions(-)
>>>> > +
>>>> > +diff --git a/configure b/configure
>>>> > +index 69e05fb..12fc3d8 100755
>>>> >  --- a/configure
>>>> >  +++ b/configure
>>>> > -@@ -4468,10 +4468,6 @@ fi
>>>> > +@@ -5413,10 +5413,6 @@ write_c_skeleton
>>>> >   if test "$gcov" = "yes" ; then
>>>> >     CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
>>>> >     LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
>>>> > @@ -12,4 +23,4 @@ Upstream-Status: Pending
>>>> >  -  CFLAGS="-O2 $CFLAGS"
>>>> >   fi
>>>> >
>>>> > - ##########################################
>>>> > + if test "$have_asan" = "yes"; then
>>>> > diff --git a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
>>>> > b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
>>>> > similarity index 87%
>>>> > rename from meta/recipes-devtools/qemu/qemu_2.11.1.bb
>>>> > rename to meta/recipes-devtools/qemu/qemu_2.12.0.bb
>>>> > index f4b7d69fca..63590fc9eb 100644
>>>> > --- a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
>>>> > +++ b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
>>>> > @@ -20,8 +20,6 @@ SRC_URI =
>>>> > "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
>>>> >             file://chardev-connect-socket-to-a-spawned-command.patch \
>>>> >             file://apic-fixup-fallthrough-to-PIC.patch \
>>>> >
>>>> > file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
>>>> > -           file://memfd.patch \
>>>> > -
>>>> > file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
>>>> >             "
>>>> >  UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
>>>> >
>>>> > @@ -31,8 +29,8 @@ SRC_URI_append_class-native = " \
>>>> >              file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
>>>> >              "
>>>> >
>>>> > -SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
>>>> > -SRC_URI[sha256sum] =
>>>> > "d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb"
>>>> > +SRC_URI[md5sum] = "122fd7cdf241ff7eb1e42c0b503b5d1b"
>>>> > +SRC_URI[sha256sum] =
>>>> > "c9f4a147bc915d24df9784affc611a115f42d24720a89210b479f1ba7a3f679c"
>>>> >
>>>> >  COMPATIBLE_HOST_mipsarchn32 = "null"
>>>> >  COMPATIBLE_HOST_mipsarchn64 = "null"
>>>> > --
>>>> > 2.17.0
>>>> >
>>>> > --
>>>> > _______________________________________________
>>>> > Openembedded-core mailing list
>>>> > Openembedded-core@lists.openembedded.org
>>>> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 2/3] qemu: upgrade to 2.12.0
  2018-05-29 23:14           ` Alistair Francis
@ 2018-05-30  2:16             ` Khem Raj
  2018-05-30 16:35               ` Alistair Francis
  0 siblings, 1 reply; 29+ messages in thread
From: Khem Raj @ 2018-05-30  2:16 UTC (permalink / raw)
  To: Alistair Francis; +Cc: Patches and discussions about the oe-core layer

On Tue, May 29, 2018 at 4:14 PM, Alistair Francis <alistair23@gmail.com> wrote:
> On Tue, May 29, 2018 at 1:40 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
>> After removing ld-is-gold I was able to reproduce the issue.
>>
>> Unfortunately removing the
>> meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
>> doesn't help with the hang, then I've tried to upgrade to latest SRCREV in
>> qemu master (currently 5a5c383b1373aeb6c87a0d6060f6c3dc7c53082b)
>>
>> Will try to bisect where it started to hang between 2.11.0 and 2.12.0, but
>> it might be faster if Alistair Francis can chime in as the author of this
>> patch, he might have better idea why it stopped working.
>
> I'm not sure why it would stop working between the two releases.
>
> I can't reproduce the hang, I just see this compilation error when
> buidling webkitgtk with musl:
>
> /scratch/alistair/yocto/oe-master/build/tmp-musl/work/core2-64-oe-linux-musl/webkitgtk/2.20.2-r0/webkitgtk-2.20.2/Source/WebCore/platform/graphics/OpenGLShims.h:23:10:
> fatal error: GL/gl.h: No such file or directory
>  #include <GL/gl.h>
>
do you have opengl x11 in distro features ? these headers should come
from mesa-dev


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 2/3] qemu: upgrade to 2.12.0
  2018-05-30  2:16             ` Khem Raj
@ 2018-05-30 16:35               ` Alistair Francis
  0 siblings, 0 replies; 29+ messages in thread
From: Alistair Francis @ 2018-05-30 16:35 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On Tue, May 29, 2018 at 7:16 PM, Khem Raj <raj.khem@gmail.com> wrote:
> On Tue, May 29, 2018 at 4:14 PM, Alistair Francis <alistair23@gmail.com> wrote:
>> On Tue, May 29, 2018 at 1:40 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
>>> After removing ld-is-gold I was able to reproduce the issue.
>>>
>>> Unfortunately removing the
>>> meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
>>> doesn't help with the hang, then I've tried to upgrade to latest SRCREV in
>>> qemu master (currently 5a5c383b1373aeb6c87a0d6060f6c3dc7c53082b)
>>>
>>> Will try to bisect where it started to hang between 2.11.0 and 2.12.0, but
>>> it might be faster if Alistair Francis can chime in as the author of this
>>> patch, he might have better idea why it stopped working.
>>
>> I'm not sure why it would stop working between the two releases.
>>
>> I can't reproduce the hang, I just see this compilation error when
>> buidling webkitgtk with musl:
>>
>> /scratch/alistair/yocto/oe-master/build/tmp-musl/work/core2-64-oe-linux-musl/webkitgtk/2.20.2-r0/webkitgtk-2.20.2/Source/WebCore/platform/graphics/OpenGLShims.h:23:10:
>> fatal error: GL/gl.h: No such file or directory
>>  #include <GL/gl.h>
>>
> do you have opengl x11 in distro features ? these headers should come
> from mesa-dev

Yep, after adding opengl it builds. I can't reproduce any hangs with
QEMU 2.12 on top of master. Are there other patches as well that are
contributing?

Alistair


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 2/3] qemu: upgrade to 2.12.0
  2018-05-29 20:40         ` Martin Jansa
  2018-05-29 23:14           ` Alistair Francis
@ 2018-05-31 15:41           ` Martin Jansa
  2018-06-01  0:00             ` Alistair Francis
  1 sibling, 1 reply; 29+ messages in thread
From: Martin Jansa @ 2018-05-31 15:41 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 26924 bytes --]

I've finished the bisect today:

qemu$ git bisect log
git bisect start
# good: [9f750794985d7386f088da941c76b73880b2b6c4] sev/i386: add
sev_get_capabilities()
git bisect good 9f750794985d7386f088da941c76b73880b2b6c4
# bad: [91c60f124e682a78c9a2ef951e8e58ebab6441d0] target/ppc: fix tlbsync
to check privilege level depending on GTSE
git bisect bad 91c60f124e682a78c9a2ef951e8e58ebab6441d0
# bad: [a57946ff2acb9c0d95c9f127914540586b0b8c21] Merge remote-tracking
branch 'remotes/awilliam/tags/vfio-update-20180313.0' into staging
git bisect bad a57946ff2acb9c0d95c9f127914540586b0b8c21
# good: [5bdd374347b873ab59b356a284494a8bc1664008] Merge remote-tracking
branch 'remotes/bonzini/tags/for-upstream-sev' into staging
git bisect good 5bdd374347b873ab59b356a284494a8bc1664008
# bad: [55901900ec69d6fd6f332003d8ab81b2f8a38529] Merge remote-tracking
branch 'remotes/vivier2/tags/linux-user-for-2.12-pull-request' into staging
git bisect bad 55901900ec69d6fd6f332003d8ab81b2f8a38529
# bad: [d4090306c8079ca3df426f82c493314c3537064e] qemu-binfmt-conf.sh: add
qemu-xtensa
git bisect bad d4090306c8079ca3df426f82c493314c3537064e
# bad: [d4247ec2d79ef2477cb886fa688706b068119736] linux-user: Support
f_flags in statfs when available.
git bisect bad d4247ec2d79ef2477cb886fa688706b068119736
# good: [f8b985d65cf67004483816d5afcb7bf686e11702] linux-user: Remove the
unused "not implemented" signal handling stubs
git bisect good f8b985d65cf67004483816d5afcb7bf686e11702
# good: [3ff48453e894990ea6495574037e70ed9b91947e] linux-user: allows to
use "--systemd ALL" with qemu-binfmt-conf.sh
git bisect good 3ff48453e894990ea6495574037e70ed9b91947e
# first bad commit: [d4247ec2d79ef2477cb886fa688706b068119736] linux-user:
Support f_flags in statfs when available.


Unfortunately just revering "[d4247ec2d79ef2477cb886fa688706b068119736]
linux-user: Support f_flags in statfs when available" at the top of v2.12.0
still hangs.

I will try to dig a bit more, but any advice would be appreciated.

On Tue, May 29, 2018 at 10:40 PM Martin Jansa <martin.jansa@gmail.com>
wrote:

> After removing ld-is-gold I was able to reproduce the issue.
>
> Unfortunately removing the meta/recipes-devtools/qemu/qemu
> /linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch doesn't help
> with the hang, then I've tried to upgrade to latest SRCREV in qemu master
> (currently 5a5c383b1373aeb6c87a0d6060f6c3dc7c53082b)
>
> Will try to bisect where it started to hang between 2.11.0 and 2.12.0, but
> it might be faster if Alistair Francis can chime in as the author of this
> patch, he might have better idea why it stopped working.
>
> Cheers,
>
> On Tue, May 29, 2018 at 2:56 PM Martin Jansa <martin.jansa@gmail.com>
> wrote:
>
>> I've tried to reproduce it locally, but g-ir-scanner-qemuwrapper is
>> failing for me in various recipes and I never got as far as webkitgtk
>>
>> pango:
>> Error relocating
>> TOPDIR/tmp-musl/work/i586-oe-linux-musl/pango/1.40.14-r0/recipe-sysroot//usr/lib/libGL.so.1:
>> __glX_tls_Context: symbol not found
>> http://errors.yoctoproject.org/Errors/Details/178988/
>>
>> after disabling GI for pango (GI_DATA_ENABLED_pn-pango = "False") it
>> failed in
>> librsvg:
>> Error relocating
>> TOPDIR/tmp-musl/work/i586-oe-linux-musl/librsvg/2.40.20-r0/recipe-sysroot//usr/lib/libGL.so.1:
>> __glX_tls_Context: symbol not found
>> http://errors.yoctoproject.org/Errors/Details/178991/
>>
>> gstreamer1.0-plugins-base:
>> Error relocating
>> TOPDIR/tmp-musl/work/i586-oe-linux-musl/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot//usr/lib/libEGL.so.1:
>> _egl_TLS: symbol not found
>> http://errors.yoctoproject.org/Errors/Details/178993/
>>
>> and gtk+3 as well, because of disabled GI for pango:
>> Couldn't find include 'Pango-1.0.gir' (search path:
>> '['TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gir-1.0',
>> '../gdk',
>> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gir-1.0',
>> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot-native/usr/share/gir-1.0',
>> '/usr/share/gir-1.0',
>> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot-native/usr/share/gir-1.0']')
>> TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gobject-introspection-1.0/Makefile.introspection:159:
>> recipe for target 'Gdk-3.0.gir' failed
>> http://errors.yoctoproject.org/Errors/Details/178992/
>>
>> I'm not sure how exactly AB is doing this qemux86 musl build, it might be
>> some more changes I have locally or missing/superfluous something in my
>> config.
>>
>> On Tue, May 29, 2018 at 11:10 AM Martin Jansa <martin.jansa@gmail.com>
>> wrote:
>>
>>> This hang should have been fixed by:
>>>
>>> meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
>>>
>>> which was added with previous upgrade to 2.11.0:
>>>
>>> commit d6d0d99569e0d8b62a61e27d389e7939af45bab9
>>> Author: Alistair Francis <alistair.francis@xilinx.com>
>>> Date:   Wed Jan 17 13:39:06 2018 -0800
>>>
>>>     qemu: Bump to version 2.11.0
>>>
>>> and my update only shifted the chunk by 2 lines in:
>>>
>>> commit a742584f253e25b97729abe19ca9e4fa2809ea2e
>>> Author: Martin Jansa <martin.jansa@gmail.com>
>>> Date:   Wed May 2 14:37:33 2018 +0000
>>>
>>>     qemu: refresh patches with devtool
>>>
>>> and the patch is still being applied. I was waiting for
>>> http://jenkins.nas-admin.org/view/OE/job/oe_world_qemux86/ to reproduce
>>> it, but it seems that Khem is working on some bigger overhaul of the jobs
>>> and it's not ready yet, I'll try to reproduce it locally now and if I can
>>> reproduce it, then I'll try to just remove this patch, because the upstream
>>> didn't accept it very well in:
>>> http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg04185.html
>>> and the discussion there died few months ago.
>>>
>>> Regards,
>>>
>>> On Fri, May 18, 2018 at 11:59 PM Burton, Ross <ross.burton@intel.com>
>>> wrote:
>>>
>>>> This is causing the AB to hang when built for qemux86 with musl whilst
>>>> building webkitgtk during the gobject-introspection qemu-i386 calls,
>>>> qemu enters an infinite loop.
>>>>
>>>> I've not yet reproduced locally to try and get a log out of qemu, but
>>>> it has happened on the autobuilder repeatedly.
>>>>
>>>> Ross
>>>>
>>>> On 2 May 2018 at 15:37, Martin Jansa <martin.jansa@gmail.com> wrote:
>>>> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
>>>> > ---
>>>> >  meta/conf/distro/include/tcmode-default.inc   |  2 +-
>>>> >  ...4-treat-DISAS_UPDATE-as-variant-of-D.patch | 67
>>>> -------------------
>>>> >  ...-connect-socket-to-a-spawned-command.patch | 52 +++++++-------
>>>> >  .../qemu/qemu/disable-grabs.patch             | 43 ++++++------
>>>> >  meta/recipes-devtools/qemu/qemu/memfd.patch   | 57 ----------------
>>>> >  .../qemu/qemu/qemu-2.5.0-cflags.patch         | 15 ++++-
>>>> >  .../qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}   |  6 +-
>>>> >  7 files changed, 65 insertions(+), 177 deletions(-)
>>>> >  delete mode 100644
>>>> meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>>>> >  delete mode 100644 meta/recipes-devtools/qemu/qemu/memfd.patch
>>>> >  rename meta/recipes-devtools/qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}
>>>> (87%)
>>>> >
>>>> > diff --git a/meta/conf/distro/include/tcmode-default.inc
>>>> b/meta/conf/distro/include/tcmode-default.inc
>>>> > index 00399ae820..8b5214ed96 100644
>>>> > --- a/meta/conf/distro/include/tcmode-default.inc
>>>> > +++ b/meta/conf/distro/include/tcmode-default.inc
>>>> > @@ -28,7 +28,7 @@ BINUVERSION ?= "2.30%"
>>>> >  GDBVERSION ?= "8.0%"
>>>> >  GLIBCVERSION ?= "2.27%"
>>>> >  LINUXLIBCVERSION ?= "4.15%"
>>>> > -QEMUVERSION ?= "2.11%"
>>>> > +QEMUVERSION ?= "2.12%"
>>>> >
>>>> >  PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
>>>> >  PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
>>>> > diff --git
>>>> a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>>>> b/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>>>> > deleted file mode 100644
>>>> > index f90cae694c..0000000000
>>>> > ---
>>>> a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>>>> > +++ /dev/null
>>>> > @@ -1,67 +0,0 @@
>>>> > -From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00
>>>> 2001
>>>> > -From: Victor Kamensky <kamensky@cisco.com>
>>>> > -Date: Fri, 23 Mar 2018 18:26:45 +0000
>>>> > -Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of
>>>> > - DISAS_EXIT
>>>> > -MIME-Version: 1.0
>>>> > -Content-Type: text/plain; charset=UTF-8
>>>> > -Content-Transfer-Encoding: 8bit
>>>> > -
>>>> > -In OE project 4.15 linux kernel boot hang was observed under
>>>> > -single cpu aarch64 qemu. Kernel code was in a loop waiting for
>>>> > -vtimer arrival, spinning in TC generated blocks, while interrupt
>>>> > -was pending unprocessed. This happened because when qemu tried to
>>>> > -handle vtimer interrupt target had interrupts disabled, as
>>>> > -result flag indicating TCG exit, cpu->icount_decr.u16.high,
>>>> > -was cleared but arm_cpu_exec_interrupt function did not call
>>>> > -arm_cpu_do_interrupt to process interrupt. Later when target
>>>> > -reenabled interrupts, it happened without exit into main loop, so
>>>> > -following code that waited for result of interrupt execution
>>>> > -run in infinite loop.
>>>> > -
>>>> > -To solve the problem instructions that operate on CPU sys state
>>>> > -(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
>>>> > -should be considered as DISAS_EXIT variant, and should be
>>>> > -forced to exit back to main loop so qemu will have a chance
>>>> > -processing pending CPU state updates, including pending
>>>> > -interrupts.
>>>> > -
>>>> > -This change brings consistency with how DISAS_UPDATE is treated
>>>> > -in aarch32 case.
>>>> > -
>>>> > -CC: Peter Maydell <peter.maydell@linaro.org>
>>>> > -CC: Alex Bennée <alex.bennee@linaro.org>
>>>> > -CC: qemu-stable@nongnu.org
>>>> > -Suggested-by: Peter Maydell <peter.maydell@linaro.org>
>>>> > -Signed-off-by: Victor Kamensky <kamensky@cisco.com>
>>>> > -Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>>>> > -Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
>>>> > -Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>>>> > -Upstream-Status: Backport
>>>> > ----
>>>> > - target/arm/translate-a64.c | 6 +++---
>>>> > - 1 file changed, 3 insertions(+), 3 deletions(-)
>>>> > -
>>>> > -diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
>>>> > -index 31ff047..327513e 100644
>>>> > ---- a/target/arm/translate-a64.c
>>>> > -+++ b/target/arm/translate-a64.c
>>>> > -@@ -13378,12 +13378,12 @@ static void
>>>> aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
>>>> > -         case DISAS_UPDATE:
>>>> > -             gen_a64_set_pc_im(dc->pc);
>>>> > -             /* fall through */
>>>> > --        case DISAS_JUMP:
>>>> > --            tcg_gen_lookup_and_goto_ptr();
>>>> > --            break;
>>>> > -         case DISAS_EXIT:
>>>> > -             tcg_gen_exit_tb(0);
>>>> > -             break;
>>>> > -+        case DISAS_JUMP:
>>>> > -+            tcg_gen_lookup_and_goto_ptr();
>>>> > -+            break;
>>>> > -         case DISAS_NORETURN:
>>>> > -         case DISAS_SWI:
>>>> > -             break;
>>>> > ---
>>>> > -2.7.4
>>>> > -
>>>> > diff --git
>>>> a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>>>> b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>>>> > index 6e6bf95c18..f1cf53a8c5 100644
>>>> > ---
>>>> a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>>>> > +++
>>>> b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>>>> > @@ -1,4 +1,4 @@
>>>> > -From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00
>>>> 2001
>>>> > +From a7690b02df70e0d3957e6eaa1e1cf92595839fbb Mon Sep 17 00:00:00
>>>> 2001
>>>> >  From: Alistair Francis <alistair.francis@xilinx.com>
>>>> >  Date: Thu, 21 Dec 2017 11:35:16 -0800
>>>> >  Subject: [PATCH] chardev: connect socket to a spawned command
>>>> > @@ -45,16 +45,16 @@ Upstream-Status: Inappropriate [embedded specific]
>>>> >
>>>> >  Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
>>>> >  ---
>>>> > - chardev/char-socket.c | 86
>>>> ++++++++++++++++++++++++++++++++++++++++++++++++---
>>>> > - chardev/char.c        |  3 ++
>>>> > - qapi/char.json        |  5 +++
>>>> > - 3 files changed, 90 insertions(+), 4 deletions(-)
>>>> > + chardev/char-socket.c | 102
>>>> ++++++++++++++++++++++++++++++++++++++++++
>>>> > + chardev/char.c        |   3 ++
>>>> > + qapi/char.json        |   5 +++
>>>> > + 3 files changed, 110 insertions(+)
>>>> >
>>>> >  diff --git a/chardev/char-socket.c b/chardev/char-socket.c
>>>> > -index 53eda8ef00..f566107c35 100644
>>>> > +index 159e69c3b1..84778cf31a 100644
>>>> >  --- a/chardev/char-socket.c
>>>> >  +++ b/chardev/char-socket.c
>>>> > -@@ -852,6 +852,68 @@ static gboolean
>>>> socket_reconnect_timeout(gpointer opaque)
>>>> > +@@ -934,6 +934,68 @@ static gboolean
>>>> socket_reconnect_timeout(gpointer opaque)
>>>> >       return false;
>>>> >   }
>>>> >
>>>> > @@ -123,7 +123,7 @@ index 53eda8ef00..f566107c35 100644
>>>> >   static void qmp_chardev_open_socket(Chardev *chr,
>>>> >                                       ChardevBackend *backend,
>>>> >                                       bool *be_opened,
>>>> > -@@ -859,6 +921,9 @@
>>>> > +@@ -941,6 +1003,9 @@ static void qmp_chardev_open_socket(Chardev
>>>> *chr,
>>>> >   {
>>>> >       SocketChardev *s = SOCKET_CHARDEV(chr);
>>>> >       ChardevSocket *sock = backend->u.socket.data;
>>>> > @@ -133,11 +133,10 @@ index 53eda8ef00..f566107c35 100644
>>>> >       bool do_nodelay     = sock->has_nodelay ? sock->nodelay : false;
>>>> >       bool is_listen      = sock->has_server  ? sock->server  : true;
>>>> >       bool is_telnet      = sock->has_telnet  ? sock->telnet  : false;
>>>> > -@@ -925,7 +990,14 @@
>>>> > -     } else if (reconnect > 0) {
>>>> > +@@ -1008,6 +1073,14 @@ static void qmp_chardev_open_socket(Chardev
>>>> *chr,
>>>> >           s->reconnect_time = reconnect;
>>>> >       }
>>>> > --
>>>> > +
>>>> >  +#ifndef _WIN32
>>>> >  +    if (cmd) {
>>>> >  +        chardev_open_socket_cmd(chr, cmd, errp);
>>>> > @@ -146,12 +145,12 @@ index 53eda8ef00..f566107c35 100644
>>>> >  +        *be_opened = true;
>>>> >  +    } else
>>>> >  +#endif
>>>> > -     if (s->reconnect_time) {
>>>> > -         sioc = qio_channel_socket_new();
>>>> > -         tcp_chr_set_client_ioc_name(chr, sioc);
>>>> > -@@ -985,10 +1057,26 @@
>>>> > -     const char *host = qemu_opt_get(opts, "host");
>>>> > +     /* If reconnect_time is set, will do that in chr_machine_done.
>>>> */
>>>> > +     if (!s->reconnect_time) {
>>>> > +         if (s->is_listen) {
>>>> > +@@ -1065,9 +1138,26 @@ static void qemu_chr_parse_socket(QemuOpts
>>>> *opts, ChardevBackend *backend,
>>>> >       const char *port = qemu_opt_get(opts, "port");
>>>> > +     const char *fd = qemu_opt_get(opts, "fd");
>>>> >       const char *tls_creds = qemu_opt_get(opts, "tls-creds");
>>>> >  +#ifndef _WIN32
>>>> >  +    const char *cmd = qemu_opt_get(opts, "cmd");
>>>> > @@ -159,7 +158,6 @@ index 53eda8ef00..f566107c35 100644
>>>> >       SocketAddressLegacy *addr;
>>>> >       ChardevSocket *sock;
>>>> >
>>>> > -     backend->type = CHARDEV_BACKEND_KIND_SOCKET;
>>>> >  +#ifndef _WIN32
>>>> >  +    if (cmd) {
>>>> >  +        /*
>>>> > @@ -173,17 +171,18 @@ index 53eda8ef00..f566107c35 100644
>>>> >  +        }
>>>> >  +    } else
>>>> >  +#endif
>>>> > -     if (!path) {
>>>> > -         if (!host) {
>>>> > -             error_setg(errp, "chardev: socket: no host given");
>>>> > -@@ -1021,13 +1109,24 @@
>>>> > -     sock->has_reconnect = true;
>>>> > ++
>>>> > +     if ((!!path + !!fd + !!host) != 1) {
>>>> > +         error_setg(errp,
>>>> > +                    "Exactly one of 'path', 'fd' or 'host'
>>>> required");
>>>> > +@@ -1112,12 +1202,24 @@ static void qemu_chr_parse_socket(QemuOpts
>>>> *opts, ChardevBackend *backend,
>>>> >       sock->reconnect = reconnect;
>>>> >       sock->tls_creds = g_strdup(tls_creds);
>>>> > +
>>>> >  +#ifndef _WIN32
>>>> >  +    sock->cmd = g_strdup(cmd);
>>>> >  +#endif
>>>> > -
>>>> > ++
>>>> >       addr = g_new0(SocketAddressLegacy, 1);
>>>> >  +#ifndef _WIN32
>>>> >  +    if (path || cmd) {
>>>> > @@ -198,11 +197,11 @@ index 53eda8ef00..f566107c35 100644
>>>> >  +#else
>>>> >           q_unix->path = g_strdup(path);
>>>> >  +#endif
>>>> > -     } else {
>>>> > +     } else if (host) {
>>>> >           addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
>>>> >           addr->u.inet.data = g_new(InetSocketAddress, 1);
>>>> >  diff --git a/chardev/char.c b/chardev/char.c
>>>> > -index 2ae4f465ec..5d52cd5de5 100644
>>>> > +index 76d866e6fe..9747d51d7c 100644
>>>> >  --- a/chardev/char.c
>>>> >  +++ b/chardev/char.c
>>>> >  @@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
>>>> > @@ -239,4 +238,5 @@ index ae19dcd1ed..6de0f29bcd 100644
>>>> >                                        '*server'    : 'bool',
>>>> >                                        '*wait'      : 'bool',
>>>> >  --
>>>> > -2.14.1
>>>> > +2.17.0
>>>> > +
>>>> > diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>>>> b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>>>> > index 77117890f4..e29c011a6f 100644
>>>> > --- a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>>>> > +++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>>>> > @@ -1,3 +1,11 @@
>>>> > +From a31c5c695cb716310257f1fc60a06b821e74fe7f Mon Sep 17 00:00:00
>>>> 2001
>>>> > +From: Ross Burton <ross.burton@intel.com>
>>>> > +Date: Wed, 18 Sep 2013 14:04:54 +0100
>>>> > +Subject: [PATCH] sdl.c: allow user to disable pointer grabs
>>>> > +MIME-Version: 1.0
>>>> > +Content-Type: text/plain; charset=UTF-8
>>>> > +Content-Transfer-Encoding: 8bit
>>>> > +
>>>> >  When the pointer enters the Qemu window it calls SDL_WM_GrabInput,
>>>> which calls
>>>> >  XGrabPointer in a busyloop until it returns GrabSuccess. However if
>>>> there's already
>>>> >  a pointer grab (screen is locked, a menu is open) then qemu will
>>>> hang until the
>>>> > @@ -11,35 +19,30 @@ them in a conditional that can be set by the
>>>> autobuilder environment, preserving
>>>> >  the current grabbing behaviour for everyone else.
>>>> >
>>>> >  Upstream-Status: Pending
>>>> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
>>>> > -
>>>> > -From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00
>>>> 2001
>>>> > -From: Ross Burton <ross.burton@intel.com>
>>>> > -Date: Wed, 18 Sep 2013 14:04:54 +0100
>>>> > -Subject: [PATCH] sdl.c: allow user to disable pointer grabs
>>>> > -
>>>> >  Signed-off-by: Ross Burton <ross.burton@intel.com>
>>>> >  Signed-off-by: Eric Bénard <eric@eukrea.com>
>>>> > +
>>>> >  ---
>>>> > - ui/sdl.c | 12 ++++++++++--
>>>> > - 1 file changed, 10 insertions(+), 2 deletions(-)
>>>> > + ui/sdl.c | 13 +++++++++++--
>>>> > + 1 file changed, 11 insertions(+), 2 deletions(-)
>>>> >
>>>> > -Index: qemu-2.11.1/ui/sdl.c
>>>> > -===================================================================
>>>> > ---- qemu-2.11.1.orig/ui/sdl.c
>>>> > -+++ qemu-2.11.1/ui/sdl.c
>>>> > -@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
>>>> > - static int scaling_active = 0;
>>>> > - static Notifier mouse_mode_notifier;
>>>> > - static int idle_counter;
>>>> > +diff --git a/ui/sdl.c b/ui/sdl.c
>>>> > +index a5fd503..ab8d1b1 100644
>>>> > +--- a/ui/sdl.c
>>>> > ++++ b/ui/sdl.c
>>>> > +@@ -68,6 +68,11 @@ static int idle_counter;
>>>> > + static const guint16 *keycode_map;
>>>> > + static size_t keycode_maplen;
>>>> > +
>>>> >  +#ifndef True
>>>> >  +#define True 1
>>>> >  +#endif
>>>> >  +static doing_grabs = True;
>>>> > -
>>>> > ++
>>>> >   #define SDL_REFRESH_INTERVAL_BUSY 10
>>>> >   #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
>>>> > -@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
>>>> > +                             / SDL_REFRESH_INTERVAL_BUSY + 1)
>>>> > +@@ -398,14 +403,16 @@ static void sdl_grab_start(void)
>>>> >           }
>>>> >       } else
>>>> >           sdl_hide_cursor();
>>>> > @@ -58,7 +61,7 @@ Index: qemu-2.11.1/ui/sdl.c
>>>> >       gui_grab = 0;
>>>> >       sdl_show_cursor();
>>>> >       sdl_update_caption();
>>>> > -@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
>>>> > +@@ -945,6 +952,8 @@ static void sdl1_display_init(DisplayState *ds,
>>>> DisplayOptions *o)
>>>> >        * This requires SDL >= 1.2.14. */
>>>> >       setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
>>>> >
>>>> > diff --git a/meta/recipes-devtools/qemu/qemu/memfd.patch
>>>> b/meta/recipes-devtools/qemu/qemu/memfd.patch
>>>> > deleted file mode 100644
>>>> > index 62e8d3800b..0000000000
>>>> > --- a/meta/recipes-devtools/qemu/qemu/memfd.patch
>>>> > +++ /dev/null
>>>> > @@ -1,57 +0,0 @@
>>>> > -Upstream-Status: Backport
>>>> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
>>>> > -
>>>> > -From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00
>>>> 2001
>>>> > -From: Paolo Bonzini <pbonzini@redhat.com>
>>>> > -Date: Tue, 28 Nov 2017 11:51:27 +0100
>>>> > -Subject: [PATCH] memfd: fix configure test
>>>> > -MIME-Version: 1.0
>>>> > -Content-Type: text/plain; charset=UTF-8
>>>> > -Content-Transfer-Encoding: 8bit
>>>> > -
>>>> > -Recent glibc added memfd_create in sys/mman.h.  This conflicts with
>>>> > -the definition in util/memfd.c:
>>>> > -
>>>> > -    /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error:
>>>> static declaration of memfd_create follows non-static declaration
>>>> > -
>>>> > -Fix the configure test, and remove the sys/memfd.h inclusion since
>>>> the
>>>> > -file actually does not exist---it is a typo in the memfd_create(2)
>>>> man
>>>> > -page.
>>>> > -
>>>> > -Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
>>>> > -Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>>> > ----
>>>> > - configure    | 2 +-
>>>> > - util/memfd.c | 4 +---
>>>> > - 2 files changed, 2 insertions(+), 4 deletions(-)
>>>> > -
>>>> > -diff --git a/configure b/configure
>>>> > -index 9c8aa5a98b..99ccc1725a 100755
>>>> > ---- a/configure
>>>> > -+++ b/configure
>>>> > -@@ -3923,7 +3923,7 @@ fi
>>>> > - # check if memfd is supported
>>>> > - memfd=no
>>>> > - cat > $TMPC << EOF
>>>> > --#include <sys/memfd.h>
>>>> > -+#include <sys/mman.h>
>>>> > -
>>>> > - int main(void)
>>>> > - {
>>>> > -diff --git a/util/memfd.c b/util/memfd.c
>>>> > -index 4571d1aba8..412e94a405 100644
>>>> > ---- a/util/memfd.c
>>>> > -+++ b/util/memfd.c
>>>> > -@@ -31,9 +31,7 @@
>>>> > -
>>>> > - #include "qemu/memfd.h"
>>>> > -
>>>> > --#ifdef CONFIG_MEMFD
>>>> > --#include <sys/memfd.h>
>>>> > --#elif defined CONFIG_LINUX
>>>> > -+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
>>>> > - #include <sys/syscall.h>
>>>> > - #include <asm/unistd.h>
>>>> > -
>>>> > ---
>>>> > -2.11.0
>>>> > diff --git a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>>>> b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>>>> > index eb99d14639..360519f1a1 100644
>>>> > --- a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>>>> > +++ b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>>>> > @@ -1,8 +1,19 @@
>>>> > +From 6702ec74a7ba90b99efedde260c9f08b75d5516d Mon Sep 17 00:00:00
>>>> 2001
>>>> > +From: Stephen Arnold <sarnold@vctlabs.com>
>>>> > +Date: Sun, 12 Jun 2016 18:09:56 -0700
>>>> > +Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some
>>>> environment
>>>> > +
>>>> >  Upstream-Status: Pending
>>>> >
>>>> > +---
>>>> > + configure | 4 ----
>>>> > + 1 file changed, 4 deletions(-)
>>>> > +
>>>> > +diff --git a/configure b/configure
>>>> > +index 69e05fb..12fc3d8 100755
>>>> >  --- a/configure
>>>> >  +++ b/configure
>>>> > -@@ -4468,10 +4468,6 @@ fi
>>>> > +@@ -5413,10 +5413,6 @@ write_c_skeleton
>>>> >   if test "$gcov" = "yes" ; then
>>>> >     CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
>>>> >     LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
>>>> > @@ -12,4 +23,4 @@ Upstream-Status: Pending
>>>> >  -  CFLAGS="-O2 $CFLAGS"
>>>> >   fi
>>>> >
>>>> > - ##########################################
>>>> > + if test "$have_asan" = "yes"; then
>>>> > diff --git a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
>>>> b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
>>>> > similarity index 87%
>>>> > rename from meta/recipes-devtools/qemu/qemu_2.11.1.bb
>>>> > rename to meta/recipes-devtools/qemu/qemu_2.12.0.bb
>>>> > index f4b7d69fca..63590fc9eb 100644
>>>> > --- a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
>>>> > +++ b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
>>>> > @@ -20,8 +20,6 @@ SRC_URI = "
>>>> http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
>>>> >             file://chardev-connect-socket-to-a-spawned-command.patch \
>>>> >             file://apic-fixup-fallthrough-to-PIC.patch \
>>>> >
>>>>  file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
>>>> > -           file://memfd.patch \
>>>> > -
>>>>  file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
>>>> >             "
>>>> >  UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
>>>> >
>>>> > @@ -31,8 +29,8 @@ SRC_URI_append_class-native = " \
>>>> >              file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
>>>> >              "
>>>> >
>>>> > -SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
>>>> > -SRC_URI[sha256sum] =
>>>> "d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb"
>>>> > +SRC_URI[md5sum] = "122fd7cdf241ff7eb1e42c0b503b5d1b"
>>>> > +SRC_URI[sha256sum] =
>>>> "c9f4a147bc915d24df9784affc611a115f42d24720a89210b479f1ba7a3f679c"
>>>> >
>>>> >  COMPATIBLE_HOST_mipsarchn32 = "null"
>>>> >  COMPATIBLE_HOST_mipsarchn64 = "null"
>>>> > --
>>>> > 2.17.0
>>>> >
>>>> > --
>>>> > _______________________________________________
>>>> > Openembedded-core mailing list
>>>> > Openembedded-core@lists.openembedded.org
>>>> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>>>
>>>

[-- Attachment #2: Type: text/html, Size: 39609 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 2/3] qemu: upgrade to 2.12.0
  2018-05-31 15:41           ` Martin Jansa
@ 2018-06-01  0:00             ` Alistair Francis
  2018-06-01  6:37               ` Martin Jansa
  0 siblings, 1 reply; 29+ messages in thread
From: Alistair Francis @ 2018-06-01  0:00 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On Thu, May 31, 2018 at 8:41 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
> I've finished the bisect today:
>
> qemu$ git bisect log
> git bisect start
> # good: [9f750794985d7386f088da941c76b73880b2b6c4] sev/i386: add
> sev_get_capabilities()
> git bisect good 9f750794985d7386f088da941c76b73880b2b6c4
> # bad: [91c60f124e682a78c9a2ef951e8e58ebab6441d0] target/ppc: fix tlbsync to
> check privilege level depending on GTSE
> git bisect bad 91c60f124e682a78c9a2ef951e8e58ebab6441d0
> # bad: [a57946ff2acb9c0d95c9f127914540586b0b8c21] Merge remote-tracking
> branch 'remotes/awilliam/tags/vfio-update-20180313.0' into staging
> git bisect bad a57946ff2acb9c0d95c9f127914540586b0b8c21
> # good: [5bdd374347b873ab59b356a284494a8bc1664008] Merge remote-tracking
> branch 'remotes/bonzini/tags/for-upstream-sev' into staging
> git bisect good 5bdd374347b873ab59b356a284494a8bc1664008
> # bad: [55901900ec69d6fd6f332003d8ab81b2f8a38529] Merge remote-tracking
> branch 'remotes/vivier2/tags/linux-user-for-2.12-pull-request' into staging
> git bisect bad 55901900ec69d6fd6f332003d8ab81b2f8a38529
> # bad: [d4090306c8079ca3df426f82c493314c3537064e] qemu-binfmt-conf.sh: add
> qemu-xtensa
> git bisect bad d4090306c8079ca3df426f82c493314c3537064e
> # bad: [d4247ec2d79ef2477cb886fa688706b068119736] linux-user: Support
> f_flags in statfs when available.
> git bisect bad d4247ec2d79ef2477cb886fa688706b068119736
> # good: [f8b985d65cf67004483816d5afcb7bf686e11702] linux-user: Remove the
> unused "not implemented" signal handling stubs
> git bisect good f8b985d65cf67004483816d5afcb7bf686e11702
> # good: [3ff48453e894990ea6495574037e70ed9b91947e] linux-user: allows to use
> "--systemd ALL" with qemu-binfmt-conf.sh
> git bisect good 3ff48453e894990ea6495574037e70ed9b91947e
> # first bad commit: [d4247ec2d79ef2477cb886fa688706b068119736] linux-user:
> Support f_flags in statfs when available.

Awesome! Thanks for this.

>
>
> Unfortunately just revering "[d4247ec2d79ef2477cb886fa688706b068119736]
> linux-user: Support f_flags in statfs when available" at the top of v2.12.0
> still hangs.
>
> I will try to dig a bit more, but any advice would be appreciated.

I managed to reproduce the hang today, so I'll investigate tomorrow.
I'm surprised reverting the commit doesn't work.

Alistair

>
> On Tue, May 29, 2018 at 10:40 PM Martin Jansa <martin.jansa@gmail.com>
> wrote:
>>
>> After removing ld-is-gold I was able to reproduce the issue.
>>
>> Unfortunately removing the
>> meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
>> doesn't help with the hang, then I've tried to upgrade to latest SRCREV in
>> qemu master (currently 5a5c383b1373aeb6c87a0d6060f6c3dc7c53082b)
>>
>> Will try to bisect where it started to hang between 2.11.0 and 2.12.0, but
>> it might be faster if Alistair Francis can chime in as the author of this
>> patch, he might have better idea why it stopped working.
>>
>> Cheers,
>>
>> On Tue, May 29, 2018 at 2:56 PM Martin Jansa <martin.jansa@gmail.com>
>> wrote:
>>>
>>> I've tried to reproduce it locally, but g-ir-scanner-qemuwrapper is
>>> failing for me in various recipes and I never got as far as webkitgtk
>>>
>>> pango:
>>> Error relocating
>>> TOPDIR/tmp-musl/work/i586-oe-linux-musl/pango/1.40.14-r0/recipe-sysroot//usr/lib/libGL.so.1:
>>> __glX_tls_Context: symbol not found
>>> http://errors.yoctoproject.org/Errors/Details/178988/
>>>
>>> after disabling GI for pango (GI_DATA_ENABLED_pn-pango = "False") it
>>> failed in
>>> librsvg:
>>> Error relocating
>>> TOPDIR/tmp-musl/work/i586-oe-linux-musl/librsvg/2.40.20-r0/recipe-sysroot//usr/lib/libGL.so.1:
>>> __glX_tls_Context: symbol not found
>>> http://errors.yoctoproject.org/Errors/Details/178991/
>>>
>>> gstreamer1.0-plugins-base:
>>> Error relocating
>>> TOPDIR/tmp-musl/work/i586-oe-linux-musl/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot//usr/lib/libEGL.so.1:
>>> _egl_TLS: symbol not found
>>> http://errors.yoctoproject.org/Errors/Details/178993/
>>>
>>> and gtk+3 as well, because of disabled GI for pango:
>>> Couldn't find include 'Pango-1.0.gir' (search path:
>>> '['TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gir-1.0',
>>> '../gdk',
>>> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gir-1.0',
>>> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot-native/usr/share/gir-1.0',
>>> '/usr/share/gir-1.0',
>>> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot-native/usr/share/gir-1.0']')
>>>
>>> TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gobject-introspection-1.0/Makefile.introspection:159:
>>> recipe for target 'Gdk-3.0.gir' failed
>>> http://errors.yoctoproject.org/Errors/Details/178992/
>>>
>>> I'm not sure how exactly AB is doing this qemux86 musl build, it might be
>>> some more changes I have locally or missing/superfluous something in my
>>> config.
>>>
>>> On Tue, May 29, 2018 at 11:10 AM Martin Jansa <martin.jansa@gmail.com>
>>> wrote:
>>>>
>>>> This hang should have been fixed by:
>>>>
>>>> meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
>>>>
>>>> which was added with previous upgrade to 2.11.0:
>>>>
>>>> commit d6d0d99569e0d8b62a61e27d389e7939af45bab9
>>>> Author: Alistair Francis <alistair.francis@xilinx.com>
>>>> Date:   Wed Jan 17 13:39:06 2018 -0800
>>>>
>>>>     qemu: Bump to version 2.11.0
>>>>
>>>> and my update only shifted the chunk by 2 lines in:
>>>>
>>>> commit a742584f253e25b97729abe19ca9e4fa2809ea2e
>>>> Author: Martin Jansa <martin.jansa@gmail.com>
>>>> Date:   Wed May 2 14:37:33 2018 +0000
>>>>
>>>>     qemu: refresh patches with devtool
>>>>
>>>> and the patch is still being applied. I was waiting for
>>>> http://jenkins.nas-admin.org/view/OE/job/oe_world_qemux86/ to reproduce it,
>>>> but it seems that Khem is working on some bigger overhaul of the jobs and
>>>> it's not ready yet, I'll try to reproduce it locally now and if I can
>>>> reproduce it, then I'll try to just remove this patch, because the upstream
>>>> didn't accept it very well in:
>>>> http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg04185.html
>>>> and the discussion there died few months ago.
>>>>
>>>> Regards,
>>>>
>>>> On Fri, May 18, 2018 at 11:59 PM Burton, Ross <ross.burton@intel.com>
>>>> wrote:
>>>>>
>>>>> This is causing the AB to hang when built for qemux86 with musl whilst
>>>>> building webkitgtk during the gobject-introspection qemu-i386 calls,
>>>>> qemu enters an infinite loop.
>>>>>
>>>>> I've not yet reproduced locally to try and get a log out of qemu, but
>>>>> it has happened on the autobuilder repeatedly.
>>>>>
>>>>> Ross
>>>>>
>>>>> On 2 May 2018 at 15:37, Martin Jansa <martin.jansa@gmail.com> wrote:
>>>>> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
>>>>> > ---
>>>>> >  meta/conf/distro/include/tcmode-default.inc   |  2 +-
>>>>> >  ...4-treat-DISAS_UPDATE-as-variant-of-D.patch | 67
>>>>> > -------------------
>>>>> >  ...-connect-socket-to-a-spawned-command.patch | 52 +++++++-------
>>>>> >  .../qemu/qemu/disable-grabs.patch             | 43 ++++++------
>>>>> >  meta/recipes-devtools/qemu/qemu/memfd.patch   | 57 ----------------
>>>>> >  .../qemu/qemu/qemu-2.5.0-cflags.patch         | 15 ++++-
>>>>> >  .../qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}   |  6 +-
>>>>> >  7 files changed, 65 insertions(+), 177 deletions(-)
>>>>> >  delete mode 100644
>>>>> > meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>>>>> >  delete mode 100644 meta/recipes-devtools/qemu/qemu/memfd.patch
>>>>> >  rename meta/recipes-devtools/qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}
>>>>> > (87%)
>>>>> >
>>>>> > diff --git a/meta/conf/distro/include/tcmode-default.inc
>>>>> > b/meta/conf/distro/include/tcmode-default.inc
>>>>> > index 00399ae820..8b5214ed96 100644
>>>>> > --- a/meta/conf/distro/include/tcmode-default.inc
>>>>> > +++ b/meta/conf/distro/include/tcmode-default.inc
>>>>> > @@ -28,7 +28,7 @@ BINUVERSION ?= "2.30%"
>>>>> >  GDBVERSION ?= "8.0%"
>>>>> >  GLIBCVERSION ?= "2.27%"
>>>>> >  LINUXLIBCVERSION ?= "4.15%"
>>>>> > -QEMUVERSION ?= "2.11%"
>>>>> > +QEMUVERSION ?= "2.12%"
>>>>> >
>>>>> >  PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
>>>>> >  PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
>>>>> > diff --git
>>>>> > a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>>>>> > b/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>>>>> > deleted file mode 100644
>>>>> > index f90cae694c..0000000000
>>>>> > ---
>>>>> > a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>>>>> > +++ /dev/null
>>>>> > @@ -1,67 +0,0 @@
>>>>> > -From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00
>>>>> > 2001
>>>>> > -From: Victor Kamensky <kamensky@cisco.com>
>>>>> > -Date: Fri, 23 Mar 2018 18:26:45 +0000
>>>>> > -Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant of
>>>>> > - DISAS_EXIT
>>>>> > -MIME-Version: 1.0
>>>>> > -Content-Type: text/plain; charset=UTF-8
>>>>> > -Content-Transfer-Encoding: 8bit
>>>>> > -
>>>>> > -In OE project 4.15 linux kernel boot hang was observed under
>>>>> > -single cpu aarch64 qemu. Kernel code was in a loop waiting for
>>>>> > -vtimer arrival, spinning in TC generated blocks, while interrupt
>>>>> > -was pending unprocessed. This happened because when qemu tried to
>>>>> > -handle vtimer interrupt target had interrupts disabled, as
>>>>> > -result flag indicating TCG exit, cpu->icount_decr.u16.high,
>>>>> > -was cleared but arm_cpu_exec_interrupt function did not call
>>>>> > -arm_cpu_do_interrupt to process interrupt. Later when target
>>>>> > -reenabled interrupts, it happened without exit into main loop, so
>>>>> > -following code that waited for result of interrupt execution
>>>>> > -run in infinite loop.
>>>>> > -
>>>>> > -To solve the problem instructions that operate on CPU sys state
>>>>> > -(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
>>>>> > -should be considered as DISAS_EXIT variant, and should be
>>>>> > -forced to exit back to main loop so qemu will have a chance
>>>>> > -processing pending CPU state updates, including pending
>>>>> > -interrupts.
>>>>> > -
>>>>> > -This change brings consistency with how DISAS_UPDATE is treated
>>>>> > -in aarch32 case.
>>>>> > -
>>>>> > -CC: Peter Maydell <peter.maydell@linaro.org>
>>>>> > -CC: Alex Bennée <alex.bennee@linaro.org>
>>>>> > -CC: qemu-stable@nongnu.org
>>>>> > -Suggested-by: Peter Maydell <peter.maydell@linaro.org>
>>>>> > -Signed-off-by: Victor Kamensky <kamensky@cisco.com>
>>>>> > -Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>>>>> > -Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
>>>>> > -Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>>>>> > -Upstream-Status: Backport
>>>>> > ----
>>>>> > - target/arm/translate-a64.c | 6 +++---
>>>>> > - 1 file changed, 3 insertions(+), 3 deletions(-)
>>>>> > -
>>>>> > -diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
>>>>> > -index 31ff047..327513e 100644
>>>>> > ---- a/target/arm/translate-a64.c
>>>>> > -+++ b/target/arm/translate-a64.c
>>>>> > -@@ -13378,12 +13378,12 @@ static void
>>>>> > aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
>>>>> > -         case DISAS_UPDATE:
>>>>> > -             gen_a64_set_pc_im(dc->pc);
>>>>> > -             /* fall through */
>>>>> > --        case DISAS_JUMP:
>>>>> > --            tcg_gen_lookup_and_goto_ptr();
>>>>> > --            break;
>>>>> > -         case DISAS_EXIT:
>>>>> > -             tcg_gen_exit_tb(0);
>>>>> > -             break;
>>>>> > -+        case DISAS_JUMP:
>>>>> > -+            tcg_gen_lookup_and_goto_ptr();
>>>>> > -+            break;
>>>>> > -         case DISAS_NORETURN:
>>>>> > -         case DISAS_SWI:
>>>>> > -             break;
>>>>> > ---
>>>>> > -2.7.4
>>>>> > -
>>>>> > diff --git
>>>>> > a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>>>>> > b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>>>>> > index 6e6bf95c18..f1cf53a8c5 100644
>>>>> > ---
>>>>> > a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>>>>> > +++
>>>>> > b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>>>>> > @@ -1,4 +1,4 @@
>>>>> > -From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00
>>>>> > 2001
>>>>> > +From a7690b02df70e0d3957e6eaa1e1cf92595839fbb Mon Sep 17 00:00:00
>>>>> > 2001
>>>>> >  From: Alistair Francis <alistair.francis@xilinx.com>
>>>>> >  Date: Thu, 21 Dec 2017 11:35:16 -0800
>>>>> >  Subject: [PATCH] chardev: connect socket to a spawned command
>>>>> > @@ -45,16 +45,16 @@ Upstream-Status: Inappropriate [embedded
>>>>> > specific]
>>>>> >
>>>>> >  Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
>>>>> >  ---
>>>>> > - chardev/char-socket.c | 86
>>>>> > ++++++++++++++++++++++++++++++++++++++++++++++++---
>>>>> > - chardev/char.c        |  3 ++
>>>>> > - qapi/char.json        |  5 +++
>>>>> > - 3 files changed, 90 insertions(+), 4 deletions(-)
>>>>> > + chardev/char-socket.c | 102
>>>>> > ++++++++++++++++++++++++++++++++++++++++++
>>>>> > + chardev/char.c        |   3 ++
>>>>> > + qapi/char.json        |   5 +++
>>>>> > + 3 files changed, 110 insertions(+)
>>>>> >
>>>>> >  diff --git a/chardev/char-socket.c b/chardev/char-socket.c
>>>>> > -index 53eda8ef00..f566107c35 100644
>>>>> > +index 159e69c3b1..84778cf31a 100644
>>>>> >  --- a/chardev/char-socket.c
>>>>> >  +++ b/chardev/char-socket.c
>>>>> > -@@ -852,6 +852,68 @@ static gboolean
>>>>> > socket_reconnect_timeout(gpointer opaque)
>>>>> > +@@ -934,6 +934,68 @@ static gboolean
>>>>> > socket_reconnect_timeout(gpointer opaque)
>>>>> >       return false;
>>>>> >   }
>>>>> >
>>>>> > @@ -123,7 +123,7 @@ index 53eda8ef00..f566107c35 100644
>>>>> >   static void qmp_chardev_open_socket(Chardev *chr,
>>>>> >                                       ChardevBackend *backend,
>>>>> >                                       bool *be_opened,
>>>>> > -@@ -859,6 +921,9 @@
>>>>> > +@@ -941,6 +1003,9 @@ static void qmp_chardev_open_socket(Chardev
>>>>> > *chr,
>>>>> >   {
>>>>> >       SocketChardev *s = SOCKET_CHARDEV(chr);
>>>>> >       ChardevSocket *sock = backend->u.socket.data;
>>>>> > @@ -133,11 +133,10 @@ index 53eda8ef00..f566107c35 100644
>>>>> >       bool do_nodelay     = sock->has_nodelay ? sock->nodelay :
>>>>> > false;
>>>>> >       bool is_listen      = sock->has_server  ? sock->server  : true;
>>>>> >       bool is_telnet      = sock->has_telnet  ? sock->telnet  :
>>>>> > false;
>>>>> > -@@ -925,7 +990,14 @@
>>>>> > -     } else if (reconnect > 0) {
>>>>> > +@@ -1008,6 +1073,14 @@ static void qmp_chardev_open_socket(Chardev
>>>>> > *chr,
>>>>> >           s->reconnect_time = reconnect;
>>>>> >       }
>>>>> > --
>>>>> > +
>>>>> >  +#ifndef _WIN32
>>>>> >  +    if (cmd) {
>>>>> >  +        chardev_open_socket_cmd(chr, cmd, errp);
>>>>> > @@ -146,12 +145,12 @@ index 53eda8ef00..f566107c35 100644
>>>>> >  +        *be_opened = true;
>>>>> >  +    } else
>>>>> >  +#endif
>>>>> > -     if (s->reconnect_time) {
>>>>> > -         sioc = qio_channel_socket_new();
>>>>> > -         tcp_chr_set_client_ioc_name(chr, sioc);
>>>>> > -@@ -985,10 +1057,26 @@
>>>>> > -     const char *host = qemu_opt_get(opts, "host");
>>>>> > +     /* If reconnect_time is set, will do that in chr_machine_done.
>>>>> > */
>>>>> > +     if (!s->reconnect_time) {
>>>>> > +         if (s->is_listen) {
>>>>> > +@@ -1065,9 +1138,26 @@ static void qemu_chr_parse_socket(QemuOpts
>>>>> > *opts, ChardevBackend *backend,
>>>>> >       const char *port = qemu_opt_get(opts, "port");
>>>>> > +     const char *fd = qemu_opt_get(opts, "fd");
>>>>> >       const char *tls_creds = qemu_opt_get(opts, "tls-creds");
>>>>> >  +#ifndef _WIN32
>>>>> >  +    const char *cmd = qemu_opt_get(opts, "cmd");
>>>>> > @@ -159,7 +158,6 @@ index 53eda8ef00..f566107c35 100644
>>>>> >       SocketAddressLegacy *addr;
>>>>> >       ChardevSocket *sock;
>>>>> >
>>>>> > -     backend->type = CHARDEV_BACKEND_KIND_SOCKET;
>>>>> >  +#ifndef _WIN32
>>>>> >  +    if (cmd) {
>>>>> >  +        /*
>>>>> > @@ -173,17 +171,18 @@ index 53eda8ef00..f566107c35 100644
>>>>> >  +        }
>>>>> >  +    } else
>>>>> >  +#endif
>>>>> > -     if (!path) {
>>>>> > -         if (!host) {
>>>>> > -             error_setg(errp, "chardev: socket: no host given");
>>>>> > -@@ -1021,13 +1109,24 @@
>>>>> > -     sock->has_reconnect = true;
>>>>> > ++
>>>>> > +     if ((!!path + !!fd + !!host) != 1) {
>>>>> > +         error_setg(errp,
>>>>> > +                    "Exactly one of 'path', 'fd' or 'host'
>>>>> > required");
>>>>> > +@@ -1112,12 +1202,24 @@ static void qemu_chr_parse_socket(QemuOpts
>>>>> > *opts, ChardevBackend *backend,
>>>>> >       sock->reconnect = reconnect;
>>>>> >       sock->tls_creds = g_strdup(tls_creds);
>>>>> > +
>>>>> >  +#ifndef _WIN32
>>>>> >  +    sock->cmd = g_strdup(cmd);
>>>>> >  +#endif
>>>>> > -
>>>>> > ++
>>>>> >       addr = g_new0(SocketAddressLegacy, 1);
>>>>> >  +#ifndef _WIN32
>>>>> >  +    if (path || cmd) {
>>>>> > @@ -198,11 +197,11 @@ index 53eda8ef00..f566107c35 100644
>>>>> >  +#else
>>>>> >           q_unix->path = g_strdup(path);
>>>>> >  +#endif
>>>>> > -     } else {
>>>>> > +     } else if (host) {
>>>>> >           addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
>>>>> >           addr->u.inet.data = g_new(InetSocketAddress, 1);
>>>>> >  diff --git a/chardev/char.c b/chardev/char.c
>>>>> > -index 2ae4f465ec..5d52cd5de5 100644
>>>>> > +index 76d866e6fe..9747d51d7c 100644
>>>>> >  --- a/chardev/char.c
>>>>> >  +++ b/chardev/char.c
>>>>> >  @@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
>>>>> > @@ -239,4 +238,5 @@ index ae19dcd1ed..6de0f29bcd 100644
>>>>> >                                        '*server'    : 'bool',
>>>>> >                                        '*wait'      : 'bool',
>>>>> >  --
>>>>> > -2.14.1
>>>>> > +2.17.0
>>>>> > +
>>>>> > diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>>>>> > b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>>>>> > index 77117890f4..e29c011a6f 100644
>>>>> > --- a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>>>>> > +++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>>>>> > @@ -1,3 +1,11 @@
>>>>> > +From a31c5c695cb716310257f1fc60a06b821e74fe7f Mon Sep 17 00:00:00
>>>>> > 2001
>>>>> > +From: Ross Burton <ross.burton@intel.com>
>>>>> > +Date: Wed, 18 Sep 2013 14:04:54 +0100
>>>>> > +Subject: [PATCH] sdl.c: allow user to disable pointer grabs
>>>>> > +MIME-Version: 1.0
>>>>> > +Content-Type: text/plain; charset=UTF-8
>>>>> > +Content-Transfer-Encoding: 8bit
>>>>> > +
>>>>> >  When the pointer enters the Qemu window it calls SDL_WM_GrabInput,
>>>>> > which calls
>>>>> >  XGrabPointer in a busyloop until it returns GrabSuccess. However if
>>>>> > there's already
>>>>> >  a pointer grab (screen is locked, a menu is open) then qemu will
>>>>> > hang until the
>>>>> > @@ -11,35 +19,30 @@ them in a conditional that can be set by the
>>>>> > autobuilder environment, preserving
>>>>> >  the current grabbing behaviour for everyone else.
>>>>> >
>>>>> >  Upstream-Status: Pending
>>>>> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
>>>>> > -
>>>>> > -From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00
>>>>> > 2001
>>>>> > -From: Ross Burton <ross.burton@intel.com>
>>>>> > -Date: Wed, 18 Sep 2013 14:04:54 +0100
>>>>> > -Subject: [PATCH] sdl.c: allow user to disable pointer grabs
>>>>> > -
>>>>> >  Signed-off-by: Ross Burton <ross.burton@intel.com>
>>>>> >  Signed-off-by: Eric Bénard <eric@eukrea.com>
>>>>> > +
>>>>> >  ---
>>>>> > - ui/sdl.c | 12 ++++++++++--
>>>>> > - 1 file changed, 10 insertions(+), 2 deletions(-)
>>>>> > + ui/sdl.c | 13 +++++++++++--
>>>>> > + 1 file changed, 11 insertions(+), 2 deletions(-)
>>>>> >
>>>>> > -Index: qemu-2.11.1/ui/sdl.c
>>>>> > -===================================================================
>>>>> > ---- qemu-2.11.1.orig/ui/sdl.c
>>>>> > -+++ qemu-2.11.1/ui/sdl.c
>>>>> > -@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
>>>>> > - static int scaling_active = 0;
>>>>> > - static Notifier mouse_mode_notifier;
>>>>> > - static int idle_counter;
>>>>> > +diff --git a/ui/sdl.c b/ui/sdl.c
>>>>> > +index a5fd503..ab8d1b1 100644
>>>>> > +--- a/ui/sdl.c
>>>>> > ++++ b/ui/sdl.c
>>>>> > +@@ -68,6 +68,11 @@ static int idle_counter;
>>>>> > + static const guint16 *keycode_map;
>>>>> > + static size_t keycode_maplen;
>>>>> > +
>>>>> >  +#ifndef True
>>>>> >  +#define True 1
>>>>> >  +#endif
>>>>> >  +static doing_grabs = True;
>>>>> > -
>>>>> > ++
>>>>> >   #define SDL_REFRESH_INTERVAL_BUSY 10
>>>>> >   #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
>>>>> > -@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
>>>>> > +                             / SDL_REFRESH_INTERVAL_BUSY + 1)
>>>>> > +@@ -398,14 +403,16 @@ static void sdl_grab_start(void)
>>>>> >           }
>>>>> >       } else
>>>>> >           sdl_hide_cursor();
>>>>> > @@ -58,7 +61,7 @@ Index: qemu-2.11.1/ui/sdl.c
>>>>> >       gui_grab = 0;
>>>>> >       sdl_show_cursor();
>>>>> >       sdl_update_caption();
>>>>> > -@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
>>>>> > +@@ -945,6 +952,8 @@ static void sdl1_display_init(DisplayState *ds,
>>>>> > DisplayOptions *o)
>>>>> >        * This requires SDL >= 1.2.14. */
>>>>> >       setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
>>>>> >
>>>>> > diff --git a/meta/recipes-devtools/qemu/qemu/memfd.patch
>>>>> > b/meta/recipes-devtools/qemu/qemu/memfd.patch
>>>>> > deleted file mode 100644
>>>>> > index 62e8d3800b..0000000000
>>>>> > --- a/meta/recipes-devtools/qemu/qemu/memfd.patch
>>>>> > +++ /dev/null
>>>>> > @@ -1,57 +0,0 @@
>>>>> > -Upstream-Status: Backport
>>>>> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
>>>>> > -
>>>>> > -From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00
>>>>> > 2001
>>>>> > -From: Paolo Bonzini <pbonzini@redhat.com>
>>>>> > -Date: Tue, 28 Nov 2017 11:51:27 +0100
>>>>> > -Subject: [PATCH] memfd: fix configure test
>>>>> > -MIME-Version: 1.0
>>>>> > -Content-Type: text/plain; charset=UTF-8
>>>>> > -Content-Transfer-Encoding: 8bit
>>>>> > -
>>>>> > -Recent glibc added memfd_create in sys/mman.h.  This conflicts with
>>>>> > -the definition in util/memfd.c:
>>>>> > -
>>>>> > -    /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error:
>>>>> > static declaration of memfd_create follows non-static declaration
>>>>> > -
>>>>> > -Fix the configure test, and remove the sys/memfd.h inclusion since
>>>>> > the
>>>>> > -file actually does not exist---it is a typo in the memfd_create(2)
>>>>> > man
>>>>> > -page.
>>>>> > -
>>>>> > -Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
>>>>> > -Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>>>> > ----
>>>>> > - configure    | 2 +-
>>>>> > - util/memfd.c | 4 +---
>>>>> > - 2 files changed, 2 insertions(+), 4 deletions(-)
>>>>> > -
>>>>> > -diff --git a/configure b/configure
>>>>> > -index 9c8aa5a98b..99ccc1725a 100755
>>>>> > ---- a/configure
>>>>> > -+++ b/configure
>>>>> > -@@ -3923,7 +3923,7 @@ fi
>>>>> > - # check if memfd is supported
>>>>> > - memfd=no
>>>>> > - cat > $TMPC << EOF
>>>>> > --#include <sys/memfd.h>
>>>>> > -+#include <sys/mman.h>
>>>>> > -
>>>>> > - int main(void)
>>>>> > - {
>>>>> > -diff --git a/util/memfd.c b/util/memfd.c
>>>>> > -index 4571d1aba8..412e94a405 100644
>>>>> > ---- a/util/memfd.c
>>>>> > -+++ b/util/memfd.c
>>>>> > -@@ -31,9 +31,7 @@
>>>>> > -
>>>>> > - #include "qemu/memfd.h"
>>>>> > -
>>>>> > --#ifdef CONFIG_MEMFD
>>>>> > --#include <sys/memfd.h>
>>>>> > --#elif defined CONFIG_LINUX
>>>>> > -+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
>>>>> > - #include <sys/syscall.h>
>>>>> > - #include <asm/unistd.h>
>>>>> > -
>>>>> > ---
>>>>> > -2.11.0
>>>>> > diff --git a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>>>>> > b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>>>>> > index eb99d14639..360519f1a1 100644
>>>>> > --- a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>>>>> > +++ b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>>>>> > @@ -1,8 +1,19 @@
>>>>> > +From 6702ec74a7ba90b99efedde260c9f08b75d5516d Mon Sep 17 00:00:00
>>>>> > 2001
>>>>> > +From: Stephen Arnold <sarnold@vctlabs.com>
>>>>> > +Date: Sun, 12 Jun 2016 18:09:56 -0700
>>>>> > +Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some
>>>>> > environment
>>>>> > +
>>>>> >  Upstream-Status: Pending
>>>>> >
>>>>> > +---
>>>>> > + configure | 4 ----
>>>>> > + 1 file changed, 4 deletions(-)
>>>>> > +
>>>>> > +diff --git a/configure b/configure
>>>>> > +index 69e05fb..12fc3d8 100755
>>>>> >  --- a/configure
>>>>> >  +++ b/configure
>>>>> > -@@ -4468,10 +4468,6 @@ fi
>>>>> > +@@ -5413,10 +5413,6 @@ write_c_skeleton
>>>>> >   if test "$gcov" = "yes" ; then
>>>>> >     CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
>>>>> >     LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
>>>>> > @@ -12,4 +23,4 @@ Upstream-Status: Pending
>>>>> >  -  CFLAGS="-O2 $CFLAGS"
>>>>> >   fi
>>>>> >
>>>>> > - ##########################################
>>>>> > + if test "$have_asan" = "yes"; then
>>>>> > diff --git a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
>>>>> > b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
>>>>> > similarity index 87%
>>>>> > rename from meta/recipes-devtools/qemu/qemu_2.11.1.bb
>>>>> > rename to meta/recipes-devtools/qemu/qemu_2.12.0.bb
>>>>> > index f4b7d69fca..63590fc9eb 100644
>>>>> > --- a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
>>>>> > +++ b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
>>>>> > @@ -20,8 +20,6 @@ SRC_URI =
>>>>> > "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
>>>>> >             file://chardev-connect-socket-to-a-spawned-command.patch
>>>>> > \
>>>>> >             file://apic-fixup-fallthrough-to-PIC.patch \
>>>>> >
>>>>> > file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
>>>>> > -           file://memfd.patch \
>>>>> > -
>>>>> > file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
>>>>> >             "
>>>>> >  UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
>>>>> >
>>>>> > @@ -31,8 +29,8 @@ SRC_URI_append_class-native = " \
>>>>> >              file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
>>>>> >              "
>>>>> >
>>>>> > -SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
>>>>> > -SRC_URI[sha256sum] =
>>>>> > "d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb"
>>>>> > +SRC_URI[md5sum] = "122fd7cdf241ff7eb1e42c0b503b5d1b"
>>>>> > +SRC_URI[sha256sum] =
>>>>> > "c9f4a147bc915d24df9784affc611a115f42d24720a89210b479f1ba7a3f679c"
>>>>> >
>>>>> >  COMPATIBLE_HOST_mipsarchn32 = "null"
>>>>> >  COMPATIBLE_HOST_mipsarchn64 = "null"
>>>>> > --
>>>>> > 2.17.0
>>>>> >
>>>>> > --
>>>>> > _______________________________________________
>>>>> > Openembedded-core mailing list
>>>>> > Openembedded-core@lists.openembedded.org
>>>>> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 2/3] qemu: upgrade to 2.12.0
  2018-06-01  0:00             ` Alistair Francis
@ 2018-06-01  6:37               ` Martin Jansa
  2018-06-01  9:08                 ` Martin Jansa
  0 siblings, 1 reply; 29+ messages in thread
From: Martin Jansa @ 2018-06-01  6:37 UTC (permalink / raw)
  To: Alistair Francis; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 30205 bytes --]

Yesterday I've tried to replay the end of the bisect and surprisingly I
wasn't seeing the hang with d4247ec2d79ef2477cb886fa688706b068119736.

With 2nd bad d4090306c8079ca3df426f82c493314c3537064e it hangs again.

So either I didn't wait long enough for qemu-i386 to finish (I mark it as
bad after it spends > 10mins inside qemu-i386 or the hang doesn't happen
reliably even with "bad" revision of qemu.

The revisions I'm trying are here:
http://git.openembedded.org/openembedded-core-contrib/log/?h=jansa/qemu-hang

On Fri, Jun 1, 2018 at 2:01 AM Alistair Francis <alistair23@gmail.com>
wrote:

> On Thu, May 31, 2018 at 8:41 AM, Martin Jansa <martin.jansa@gmail.com>
> wrote:
> > I've finished the bisect today:
> >
> > qemu$ git bisect log
> > git bisect start
> > # good: [9f750794985d7386f088da941c76b73880b2b6c4] sev/i386: add
> > sev_get_capabilities()
> > git bisect good 9f750794985d7386f088da941c76b73880b2b6c4
> > # bad: [91c60f124e682a78c9a2ef951e8e58ebab6441d0] target/ppc: fix
> tlbsync to
> > check privilege level depending on GTSE
> > git bisect bad 91c60f124e682a78c9a2ef951e8e58ebab6441d0
> > # bad: [a57946ff2acb9c0d95c9f127914540586b0b8c21] Merge remote-tracking
> > branch 'remotes/awilliam/tags/vfio-update-20180313.0' into staging
> > git bisect bad a57946ff2acb9c0d95c9f127914540586b0b8c21
> > # good: [5bdd374347b873ab59b356a284494a8bc1664008] Merge remote-tracking
> > branch 'remotes/bonzini/tags/for-upstream-sev' into staging
> > git bisect good 5bdd374347b873ab59b356a284494a8bc1664008
> > # bad: [55901900ec69d6fd6f332003d8ab81b2f8a38529] Merge remote-tracking
> > branch 'remotes/vivier2/tags/linux-user-for-2.12-pull-request' into
> staging
> > git bisect bad 55901900ec69d6fd6f332003d8ab81b2f8a38529
> > # bad: [d4090306c8079ca3df426f82c493314c3537064e] qemu-binfmt-conf.sh:
> add
> > qemu-xtensa
> > git bisect bad d4090306c8079ca3df426f82c493314c3537064e
> > # bad: [d4247ec2d79ef2477cb886fa688706b068119736] linux-user: Support
> > f_flags in statfs when available.
> > git bisect bad d4247ec2d79ef2477cb886fa688706b068119736
> > # good: [f8b985d65cf67004483816d5afcb7bf686e11702] linux-user: Remove the
> > unused "not implemented" signal handling stubs
> > git bisect good f8b985d65cf67004483816d5afcb7bf686e11702
> > # good: [3ff48453e894990ea6495574037e70ed9b91947e] linux-user: allows to
> use
> > "--systemd ALL" with qemu-binfmt-conf.sh
> > git bisect good 3ff48453e894990ea6495574037e70ed9b91947e
> > # first bad commit: [d4247ec2d79ef2477cb886fa688706b068119736]
> linux-user:
> > Support f_flags in statfs when available.
>
> Awesome! Thanks for this.
>
> >
> >
> > Unfortunately just revering "[d4247ec2d79ef2477cb886fa688706b068119736]
> > linux-user: Support f_flags in statfs when available" at the top of
> v2.12.0
> > still hangs.
> >
> > I will try to dig a bit more, but any advice would be appreciated.
>
> I managed to reproduce the hang today, so I'll investigate tomorrow.
> I'm surprised reverting the commit doesn't work.
>
> Alistair
>
> >
> > On Tue, May 29, 2018 at 10:40 PM Martin Jansa <martin.jansa@gmail.com>
> > wrote:
> >>
> >> After removing ld-is-gold I was able to reproduce the issue.
> >>
> >> Unfortunately removing the
> >>
> meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
> >> doesn't help with the hang, then I've tried to upgrade to latest SRCREV
> in
> >> qemu master (currently 5a5c383b1373aeb6c87a0d6060f6c3dc7c53082b)
> >>
> >> Will try to bisect where it started to hang between 2.11.0 and 2.12.0,
> but
> >> it might be faster if Alistair Francis can chime in as the author of
> this
> >> patch, he might have better idea why it stopped working.
> >>
> >> Cheers,
> >>
> >> On Tue, May 29, 2018 at 2:56 PM Martin Jansa <martin.jansa@gmail.com>
> >> wrote:
> >>>
> >>> I've tried to reproduce it locally, but g-ir-scanner-qemuwrapper is
> >>> failing for me in various recipes and I never got as far as webkitgtk
> >>>
> >>> pango:
> >>> Error relocating
> >>>
> TOPDIR/tmp-musl/work/i586-oe-linux-musl/pango/1.40.14-r0/recipe-sysroot//usr/lib/libGL.so.1:
> >>> __glX_tls_Context: symbol not found
> >>> http://errors.yoctoproject.org/Errors/Details/178988/
> >>>
> >>> after disabling GI for pango (GI_DATA_ENABLED_pn-pango = "False") it
> >>> failed in
> >>> librsvg:
> >>> Error relocating
> >>>
> TOPDIR/tmp-musl/work/i586-oe-linux-musl/librsvg/2.40.20-r0/recipe-sysroot//usr/lib/libGL.so.1:
> >>> __glX_tls_Context: symbol not found
> >>> http://errors.yoctoproject.org/Errors/Details/178991/
> >>>
> >>> gstreamer1.0-plugins-base:
> >>> Error relocating
> >>>
> TOPDIR/tmp-musl/work/i586-oe-linux-musl/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot//usr/lib/libEGL.so.1:
> >>> _egl_TLS: symbol not found
> >>> http://errors.yoctoproject.org/Errors/Details/178993/
> >>>
> >>> and gtk+3 as well, because of disabled GI for pango:
> >>> Couldn't find include 'Pango-1.0.gir' (search path:
> >>>
> '['TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gir-1.0',
> >>> '../gdk',
> >>>
> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gir-1.0',
> >>>
> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot-native/usr/share/gir-1.0',
> >>> '/usr/share/gir-1.0',
> >>>
> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot-native/usr/share/gir-1.0']')
> >>>
> >>>
> TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gobject-introspection-1.0/Makefile.introspection:159:
> >>> recipe for target 'Gdk-3.0.gir' failed
> >>> http://errors.yoctoproject.org/Errors/Details/178992/
> >>>
> >>> I'm not sure how exactly AB is doing this qemux86 musl build, it might
> be
> >>> some more changes I have locally or missing/superfluous something in my
> >>> config.
> >>>
> >>> On Tue, May 29, 2018 at 11:10 AM Martin Jansa <martin.jansa@gmail.com>
> >>> wrote:
> >>>>
> >>>> This hang should have been fixed by:
> >>>>
> >>>>
> meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
> >>>>
> >>>> which was added with previous upgrade to 2.11.0:
> >>>>
> >>>> commit d6d0d99569e0d8b62a61e27d389e7939af45bab9
> >>>> Author: Alistair Francis <alistair.francis@xilinx.com>
> >>>> Date:   Wed Jan 17 13:39:06 2018 -0800
> >>>>
> >>>>     qemu: Bump to version 2.11.0
> >>>>
> >>>> and my update only shifted the chunk by 2 lines in:
> >>>>
> >>>> commit a742584f253e25b97729abe19ca9e4fa2809ea2e
> >>>> Author: Martin Jansa <martin.jansa@gmail.com>
> >>>> Date:   Wed May 2 14:37:33 2018 +0000
> >>>>
> >>>>     qemu: refresh patches with devtool
> >>>>
> >>>> and the patch is still being applied. I was waiting for
> >>>> http://jenkins.nas-admin.org/view/OE/job/oe_world_qemux86/ to
> reproduce it,
> >>>> but it seems that Khem is working on some bigger overhaul of the jobs
> and
> >>>> it's not ready yet, I'll try to reproduce it locally now and if I can
> >>>> reproduce it, then I'll try to just remove this patch, because the
> upstream
> >>>> didn't accept it very well in:
> >>>> http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg04185.html
> >>>> and the discussion there died few months ago.
> >>>>
> >>>> Regards,
> >>>>
> >>>> On Fri, May 18, 2018 at 11:59 PM Burton, Ross <ross.burton@intel.com>
> >>>> wrote:
> >>>>>
> >>>>> This is causing the AB to hang when built for qemux86 with musl
> whilst
> >>>>> building webkitgtk during the gobject-introspection qemu-i386 calls,
> >>>>> qemu enters an infinite loop.
> >>>>>
> >>>>> I've not yet reproduced locally to try and get a log out of qemu, but
> >>>>> it has happened on the autobuilder repeatedly.
> >>>>>
> >>>>> Ross
> >>>>>
> >>>>> On 2 May 2018 at 15:37, Martin Jansa <martin.jansa@gmail.com> wrote:
> >>>>> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> >>>>> > ---
> >>>>> >  meta/conf/distro/include/tcmode-default.inc   |  2 +-
> >>>>> >  ...4-treat-DISAS_UPDATE-as-variant-of-D.patch | 67
> >>>>> > -------------------
> >>>>> >  ...-connect-socket-to-a-spawned-command.patch | 52 +++++++-------
> >>>>> >  .../qemu/qemu/disable-grabs.patch             | 43 ++++++------
> >>>>> >  meta/recipes-devtools/qemu/qemu/memfd.patch   | 57
> ----------------
> >>>>> >  .../qemu/qemu/qemu-2.5.0-cflags.patch         | 15 ++++-
> >>>>> >  .../qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}   |  6 +-
> >>>>> >  7 files changed, 65 insertions(+), 177 deletions(-)
> >>>>> >  delete mode 100644
> >>>>> >
> meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
> >>>>> >  delete mode 100644 meta/recipes-devtools/qemu/qemu/memfd.patch
> >>>>> >  rename meta/recipes-devtools/qemu/{qemu_2.11.1.bb =>
> qemu_2.12.0.bb}
> >>>>> > (87%)
> >>>>> >
> >>>>> > diff --git a/meta/conf/distro/include/tcmode-default.inc
> >>>>> > b/meta/conf/distro/include/tcmode-default.inc
> >>>>> > index 00399ae820..8b5214ed96 100644
> >>>>> > --- a/meta/conf/distro/include/tcmode-default.inc
> >>>>> > +++ b/meta/conf/distro/include/tcmode-default.inc
> >>>>> > @@ -28,7 +28,7 @@ BINUVERSION ?= "2.30%"
> >>>>> >  GDBVERSION ?= "8.0%"
> >>>>> >  GLIBCVERSION ?= "2.27%"
> >>>>> >  LINUXLIBCVERSION ?= "4.15%"
> >>>>> > -QEMUVERSION ?= "2.11%"
> >>>>> > +QEMUVERSION ?= "2.12%"
> >>>>> >
> >>>>> >  PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
> >>>>> >  PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
> >>>>> > diff --git
> >>>>> >
> a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
> >>>>> >
> b/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
> >>>>> > deleted file mode 100644
> >>>>> > index f90cae694c..0000000000
> >>>>> > ---
> >>>>> >
> a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
> >>>>> > +++ /dev/null
> >>>>> > @@ -1,67 +0,0 @@
> >>>>> > -From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00
> >>>>> > 2001
> >>>>> > -From: Victor Kamensky <kamensky@cisco.com>
> >>>>> > -Date: Fri, 23 Mar 2018 18:26:45 +0000
> >>>>> > -Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as variant
> of
> >>>>> > - DISAS_EXIT
> >>>>> > -MIME-Version: 1.0
> >>>>> > -Content-Type: text/plain; charset=UTF-8
> >>>>> > -Content-Transfer-Encoding: 8bit
> >>>>> > -
> >>>>> > -In OE project 4.15 linux kernel boot hang was observed under
> >>>>> > -single cpu aarch64 qemu. Kernel code was in a loop waiting for
> >>>>> > -vtimer arrival, spinning in TC generated blocks, while interrupt
> >>>>> > -was pending unprocessed. This happened because when qemu tried to
> >>>>> > -handle vtimer interrupt target had interrupts disabled, as
> >>>>> > -result flag indicating TCG exit, cpu->icount_decr.u16.high,
> >>>>> > -was cleared but arm_cpu_exec_interrupt function did not call
> >>>>> > -arm_cpu_do_interrupt to process interrupt. Later when target
> >>>>> > -reenabled interrupts, it happened without exit into main loop, so
> >>>>> > -following code that waited for result of interrupt execution
> >>>>> > -run in infinite loop.
> >>>>> > -
> >>>>> > -To solve the problem instructions that operate on CPU sys state
> >>>>> > -(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
> >>>>> > -should be considered as DISAS_EXIT variant, and should be
> >>>>> > -forced to exit back to main loop so qemu will have a chance
> >>>>> > -processing pending CPU state updates, including pending
> >>>>> > -interrupts.
> >>>>> > -
> >>>>> > -This change brings consistency with how DISAS_UPDATE is treated
> >>>>> > -in aarch32 case.
> >>>>> > -
> >>>>> > -CC: Peter Maydell <peter.maydell@linaro.org>
> >>>>> > -CC: Alex Bennée <alex.bennee@linaro.org>
> >>>>> > -CC: qemu-stable@nongnu.org
> >>>>> > -Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> >>>>> > -Signed-off-by: Victor Kamensky <kamensky@cisco.com>
> >>>>> > -Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> >>>>> > -Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
> >>>>> > -Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> >>>>> > -Upstream-Status: Backport
> >>>>> > ----
> >>>>> > - target/arm/translate-a64.c | 6 +++---
> >>>>> > - 1 file changed, 3 insertions(+), 3 deletions(-)
> >>>>> > -
> >>>>> > -diff --git a/target/arm/translate-a64.c
> b/target/arm/translate-a64.c
> >>>>> > -index 31ff047..327513e 100644
> >>>>> > ---- a/target/arm/translate-a64.c
> >>>>> > -+++ b/target/arm/translate-a64.c
> >>>>> > -@@ -13378,12 +13378,12 @@ static void
> >>>>> > aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
> >>>>> > -         case DISAS_UPDATE:
> >>>>> > -             gen_a64_set_pc_im(dc->pc);
> >>>>> > -             /* fall through */
> >>>>> > --        case DISAS_JUMP:
> >>>>> > --            tcg_gen_lookup_and_goto_ptr();
> >>>>> > --            break;
> >>>>> > -         case DISAS_EXIT:
> >>>>> > -             tcg_gen_exit_tb(0);
> >>>>> > -             break;
> >>>>> > -+        case DISAS_JUMP:
> >>>>> > -+            tcg_gen_lookup_and_goto_ptr();
> >>>>> > -+            break;
> >>>>> > -         case DISAS_NORETURN:
> >>>>> > -         case DISAS_SWI:
> >>>>> > -             break;
> >>>>> > ---
> >>>>> > -2.7.4
> >>>>> > -
> >>>>> > diff --git
> >>>>> >
> a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> >>>>> >
> b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> >>>>> > index 6e6bf95c18..f1cf53a8c5 100644
> >>>>> > ---
> >>>>> >
> a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> >>>>> > +++
> >>>>> >
> b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
> >>>>> > @@ -1,4 +1,4 @@
> >>>>> > -From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00
> >>>>> > 2001
> >>>>> > +From a7690b02df70e0d3957e6eaa1e1cf92595839fbb Mon Sep 17 00:00:00
> >>>>> > 2001
> >>>>> >  From: Alistair Francis <alistair.francis@xilinx.com>
> >>>>> >  Date: Thu, 21 Dec 2017 11:35:16 -0800
> >>>>> >  Subject: [PATCH] chardev: connect socket to a spawned command
> >>>>> > @@ -45,16 +45,16 @@ Upstream-Status: Inappropriate [embedded
> >>>>> > specific]
> >>>>> >
> >>>>> >  Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
> >>>>> >  ---
> >>>>> > - chardev/char-socket.c | 86
> >>>>> > ++++++++++++++++++++++++++++++++++++++++++++++++---
> >>>>> > - chardev/char.c        |  3 ++
> >>>>> > - qapi/char.json        |  5 +++
> >>>>> > - 3 files changed, 90 insertions(+), 4 deletions(-)
> >>>>> > + chardev/char-socket.c | 102
> >>>>> > ++++++++++++++++++++++++++++++++++++++++++
> >>>>> > + chardev/char.c        |   3 ++
> >>>>> > + qapi/char.json        |   5 +++
> >>>>> > + 3 files changed, 110 insertions(+)
> >>>>> >
> >>>>> >  diff --git a/chardev/char-socket.c b/chardev/char-socket.c
> >>>>> > -index 53eda8ef00..f566107c35 100644
> >>>>> > +index 159e69c3b1..84778cf31a 100644
> >>>>> >  --- a/chardev/char-socket.c
> >>>>> >  +++ b/chardev/char-socket.c
> >>>>> > -@@ -852,6 +852,68 @@ static gboolean
> >>>>> > socket_reconnect_timeout(gpointer opaque)
> >>>>> > +@@ -934,6 +934,68 @@ static gboolean
> >>>>> > socket_reconnect_timeout(gpointer opaque)
> >>>>> >       return false;
> >>>>> >   }
> >>>>> >
> >>>>> > @@ -123,7 +123,7 @@ index 53eda8ef00..f566107c35 100644
> >>>>> >   static void qmp_chardev_open_socket(Chardev *chr,
> >>>>> >                                       ChardevBackend *backend,
> >>>>> >                                       bool *be_opened,
> >>>>> > -@@ -859,6 +921,9 @@
> >>>>> > +@@ -941,6 +1003,9 @@ static void qmp_chardev_open_socket(Chardev
> >>>>> > *chr,
> >>>>> >   {
> >>>>> >       SocketChardev *s = SOCKET_CHARDEV(chr);
> >>>>> >       ChardevSocket *sock = backend->u.socket.data;
> >>>>> > @@ -133,11 +133,10 @@ index 53eda8ef00..f566107c35 100644
> >>>>> >       bool do_nodelay     = sock->has_nodelay ? sock->nodelay :
> >>>>> > false;
> >>>>> >       bool is_listen      = sock->has_server  ? sock->server  :
> true;
> >>>>> >       bool is_telnet      = sock->has_telnet  ? sock->telnet  :
> >>>>> > false;
> >>>>> > -@@ -925,7 +990,14 @@
> >>>>> > -     } else if (reconnect > 0) {
> >>>>> > +@@ -1008,6 +1073,14 @@ static void qmp_chardev_open_socket(Chardev
> >>>>> > *chr,
> >>>>> >           s->reconnect_time = reconnect;
> >>>>> >       }
> >>>>> > --
> >>>>> > +
> >>>>> >  +#ifndef _WIN32
> >>>>> >  +    if (cmd) {
> >>>>> >  +        chardev_open_socket_cmd(chr, cmd, errp);
> >>>>> > @@ -146,12 +145,12 @@ index 53eda8ef00..f566107c35 100644
> >>>>> >  +        *be_opened = true;
> >>>>> >  +    } else
> >>>>> >  +#endif
> >>>>> > -     if (s->reconnect_time) {
> >>>>> > -         sioc = qio_channel_socket_new();
> >>>>> > -         tcp_chr_set_client_ioc_name(chr, sioc);
> >>>>> > -@@ -985,10 +1057,26 @@
> >>>>> > -     const char *host = qemu_opt_get(opts, "host");
> >>>>> > +     /* If reconnect_time is set, will do that in
> chr_machine_done.
> >>>>> > */
> >>>>> > +     if (!s->reconnect_time) {
> >>>>> > +         if (s->is_listen) {
> >>>>> > +@@ -1065,9 +1138,26 @@ static void qemu_chr_parse_socket(QemuOpts
> >>>>> > *opts, ChardevBackend *backend,
> >>>>> >       const char *port = qemu_opt_get(opts, "port");
> >>>>> > +     const char *fd = qemu_opt_get(opts, "fd");
> >>>>> >       const char *tls_creds = qemu_opt_get(opts, "tls-creds");
> >>>>> >  +#ifndef _WIN32
> >>>>> >  +    const char *cmd = qemu_opt_get(opts, "cmd");
> >>>>> > @@ -159,7 +158,6 @@ index 53eda8ef00..f566107c35 100644
> >>>>> >       SocketAddressLegacy *addr;
> >>>>> >       ChardevSocket *sock;
> >>>>> >
> >>>>> > -     backend->type = CHARDEV_BACKEND_KIND_SOCKET;
> >>>>> >  +#ifndef _WIN32
> >>>>> >  +    if (cmd) {
> >>>>> >  +        /*
> >>>>> > @@ -173,17 +171,18 @@ index 53eda8ef00..f566107c35 100644
> >>>>> >  +        }
> >>>>> >  +    } else
> >>>>> >  +#endif
> >>>>> > -     if (!path) {
> >>>>> > -         if (!host) {
> >>>>> > -             error_setg(errp, "chardev: socket: no host given");
> >>>>> > -@@ -1021,13 +1109,24 @@
> >>>>> > -     sock->has_reconnect = true;
> >>>>> > ++
> >>>>> > +     if ((!!path + !!fd + !!host) != 1) {
> >>>>> > +         error_setg(errp,
> >>>>> > +                    "Exactly one of 'path', 'fd' or 'host'
> >>>>> > required");
> >>>>> > +@@ -1112,12 +1202,24 @@ static void qemu_chr_parse_socket(QemuOpts
> >>>>> > *opts, ChardevBackend *backend,
> >>>>> >       sock->reconnect = reconnect;
> >>>>> >       sock->tls_creds = g_strdup(tls_creds);
> >>>>> > +
> >>>>> >  +#ifndef _WIN32
> >>>>> >  +    sock->cmd = g_strdup(cmd);
> >>>>> >  +#endif
> >>>>> > -
> >>>>> > ++
> >>>>> >       addr = g_new0(SocketAddressLegacy, 1);
> >>>>> >  +#ifndef _WIN32
> >>>>> >  +    if (path || cmd) {
> >>>>> > @@ -198,11 +197,11 @@ index 53eda8ef00..f566107c35 100644
> >>>>> >  +#else
> >>>>> >           q_unix->path = g_strdup(path);
> >>>>> >  +#endif
> >>>>> > -     } else {
> >>>>> > +     } else if (host) {
> >>>>> >           addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
> >>>>> >           addr->u.inet.data = g_new(InetSocketAddress, 1);
> >>>>> >  diff --git a/chardev/char.c b/chardev/char.c
> >>>>> > -index 2ae4f465ec..5d52cd5de5 100644
> >>>>> > +index 76d866e6fe..9747d51d7c 100644
> >>>>> >  --- a/chardev/char.c
> >>>>> >  +++ b/chardev/char.c
> >>>>> >  @@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
> >>>>> > @@ -239,4 +238,5 @@ index ae19dcd1ed..6de0f29bcd 100644
> >>>>> >                                        '*server'    : 'bool',
> >>>>> >                                        '*wait'      : 'bool',
> >>>>> >  --
> >>>>> > -2.14.1
> >>>>> > +2.17.0
> >>>>> > +
> >>>>> > diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> >>>>> > b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> >>>>> > index 77117890f4..e29c011a6f 100644
> >>>>> > --- a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> >>>>> > +++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
> >>>>> > @@ -1,3 +1,11 @@
> >>>>> > +From a31c5c695cb716310257f1fc60a06b821e74fe7f Mon Sep 17 00:00:00
> >>>>> > 2001
> >>>>> > +From: Ross Burton <ross.burton@intel.com>
> >>>>> > +Date: Wed, 18 Sep 2013 14:04:54 +0100
> >>>>> > +Subject: [PATCH] sdl.c: allow user to disable pointer grabs
> >>>>> > +MIME-Version: 1.0
> >>>>> > +Content-Type: text/plain; charset=UTF-8
> >>>>> > +Content-Transfer-Encoding: 8bit
> >>>>> > +
> >>>>> >  When the pointer enters the Qemu window it calls SDL_WM_GrabInput,
> >>>>> > which calls
> >>>>> >  XGrabPointer in a busyloop until it returns GrabSuccess. However
> if
> >>>>> > there's already
> >>>>> >  a pointer grab (screen is locked, a menu is open) then qemu will
> >>>>> > hang until the
> >>>>> > @@ -11,35 +19,30 @@ them in a conditional that can be set by the
> >>>>> > autobuilder environment, preserving
> >>>>> >  the current grabbing behaviour for everyone else.
> >>>>> >
> >>>>> >  Upstream-Status: Pending
> >>>>> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
> >>>>> > -
> >>>>> > -From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00
> >>>>> > 2001
> >>>>> > -From: Ross Burton <ross.burton@intel.com>
> >>>>> > -Date: Wed, 18 Sep 2013 14:04:54 +0100
> >>>>> > -Subject: [PATCH] sdl.c: allow user to disable pointer grabs
> >>>>> > -
> >>>>> >  Signed-off-by: Ross Burton <ross.burton@intel.com>
> >>>>> >  Signed-off-by: Eric Bénard <eric@eukrea.com>
> >>>>> > +
> >>>>> >  ---
> >>>>> > - ui/sdl.c | 12 ++++++++++--
> >>>>> > - 1 file changed, 10 insertions(+), 2 deletions(-)
> >>>>> > + ui/sdl.c | 13 +++++++++++--
> >>>>> > + 1 file changed, 11 insertions(+), 2 deletions(-)
> >>>>> >
> >>>>> > -Index: qemu-2.11.1/ui/sdl.c
> >>>>> >
> -===================================================================
> >>>>> > ---- qemu-2.11.1.orig/ui/sdl.c
> >>>>> > -+++ qemu-2.11.1/ui/sdl.c
> >>>>> > -@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
> >>>>> > - static int scaling_active = 0;
> >>>>> > - static Notifier mouse_mode_notifier;
> >>>>> > - static int idle_counter;
> >>>>> > +diff --git a/ui/sdl.c b/ui/sdl.c
> >>>>> > +index a5fd503..ab8d1b1 100644
> >>>>> > +--- a/ui/sdl.c
> >>>>> > ++++ b/ui/sdl.c
> >>>>> > +@@ -68,6 +68,11 @@ static int idle_counter;
> >>>>> > + static const guint16 *keycode_map;
> >>>>> > + static size_t keycode_maplen;
> >>>>> > +
> >>>>> >  +#ifndef True
> >>>>> >  +#define True 1
> >>>>> >  +#endif
> >>>>> >  +static doing_grabs = True;
> >>>>> > -
> >>>>> > ++
> >>>>> >   #define SDL_REFRESH_INTERVAL_BUSY 10
> >>>>> >   #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
> >>>>> > -@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
> >>>>> > +                             / SDL_REFRESH_INTERVAL_BUSY + 1)
> >>>>> > +@@ -398,14 +403,16 @@ static void sdl_grab_start(void)
> >>>>> >           }
> >>>>> >       } else
> >>>>> >           sdl_hide_cursor();
> >>>>> > @@ -58,7 +61,7 @@ Index: qemu-2.11.1/ui/sdl.c
> >>>>> >       gui_grab = 0;
> >>>>> >       sdl_show_cursor();
> >>>>> >       sdl_update_caption();
> >>>>> > -@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
> >>>>> > +@@ -945,6 +952,8 @@ static void sdl1_display_init(DisplayState
> *ds,
> >>>>> > DisplayOptions *o)
> >>>>> >        * This requires SDL >= 1.2.14. */
> >>>>> >       setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
> >>>>> >
> >>>>> > diff --git a/meta/recipes-devtools/qemu/qemu/memfd.patch
> >>>>> > b/meta/recipes-devtools/qemu/qemu/memfd.patch
> >>>>> > deleted file mode 100644
> >>>>> > index 62e8d3800b..0000000000
> >>>>> > --- a/meta/recipes-devtools/qemu/qemu/memfd.patch
> >>>>> > +++ /dev/null
> >>>>> > @@ -1,57 +0,0 @@
> >>>>> > -Upstream-Status: Backport
> >>>>> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
> >>>>> > -
> >>>>> > -From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00
> >>>>> > 2001
> >>>>> > -From: Paolo Bonzini <pbonzini@redhat.com>
> >>>>> > -Date: Tue, 28 Nov 2017 11:51:27 +0100
> >>>>> > -Subject: [PATCH] memfd: fix configure test
> >>>>> > -MIME-Version: 1.0
> >>>>> > -Content-Type: text/plain; charset=UTF-8
> >>>>> > -Content-Transfer-Encoding: 8bit
> >>>>> > -
> >>>>> > -Recent glibc added memfd_create in sys/mman.h.  This conflicts
> with
> >>>>> > -the definition in util/memfd.c:
> >>>>> > -
> >>>>> > -    /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12:
> error:
> >>>>> > static declaration of memfd_create follows non-static declaration
> >>>>> > -
> >>>>> > -Fix the configure test, and remove the sys/memfd.h inclusion since
> >>>>> > the
> >>>>> > -file actually does not exist---it is a typo in the memfd_create(2)
> >>>>> > man
> >>>>> > -page.
> >>>>> > -
> >>>>> > -Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> >>>>> > -Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> >>>>> > ----
> >>>>> > - configure    | 2 +-
> >>>>> > - util/memfd.c | 4 +---
> >>>>> > - 2 files changed, 2 insertions(+), 4 deletions(-)
> >>>>> > -
> >>>>> > -diff --git a/configure b/configure
> >>>>> > -index 9c8aa5a98b..99ccc1725a 100755
> >>>>> > ---- a/configure
> >>>>> > -+++ b/configure
> >>>>> > -@@ -3923,7 +3923,7 @@ fi
> >>>>> > - # check if memfd is supported
> >>>>> > - memfd=no
> >>>>> > - cat > $TMPC << EOF
> >>>>> > --#include <sys/memfd.h>
> >>>>> > -+#include <sys/mman.h>
> >>>>> > -
> >>>>> > - int main(void)
> >>>>> > - {
> >>>>> > -diff --git a/util/memfd.c b/util/memfd.c
> >>>>> > -index 4571d1aba8..412e94a405 100644
> >>>>> > ---- a/util/memfd.c
> >>>>> > -+++ b/util/memfd.c
> >>>>> > -@@ -31,9 +31,7 @@
> >>>>> > -
> >>>>> > - #include "qemu/memfd.h"
> >>>>> > -
> >>>>> > --#ifdef CONFIG_MEMFD
> >>>>> > --#include <sys/memfd.h>
> >>>>> > --#elif defined CONFIG_LINUX
> >>>>> > -+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
> >>>>> > - #include <sys/syscall.h>
> >>>>> > - #include <asm/unistd.h>
> >>>>> > -
> >>>>> > ---
> >>>>> > -2.11.0
> >>>>> > diff --git
> a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> >>>>> > b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> >>>>> > index eb99d14639..360519f1a1 100644
> >>>>> > --- a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> >>>>> > +++ b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
> >>>>> > @@ -1,8 +1,19 @@
> >>>>> > +From 6702ec74a7ba90b99efedde260c9f08b75d5516d Mon Sep 17 00:00:00
> >>>>> > 2001
> >>>>> > +From: Stephen Arnold <sarnold@vctlabs.com>
> >>>>> > +Date: Sun, 12 Jun 2016 18:09:56 -0700
> >>>>> > +Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set some
> >>>>> > environment
> >>>>> > +
> >>>>> >  Upstream-Status: Pending
> >>>>> >
> >>>>> > +---
> >>>>> > + configure | 4 ----
> >>>>> > + 1 file changed, 4 deletions(-)
> >>>>> > +
> >>>>> > +diff --git a/configure b/configure
> >>>>> > +index 69e05fb..12fc3d8 100755
> >>>>> >  --- a/configure
> >>>>> >  +++ b/configure
> >>>>> > -@@ -4468,10 +4468,6 @@ fi
> >>>>> > +@@ -5413,10 +5413,6 @@ write_c_skeleton
> >>>>> >   if test "$gcov" = "yes" ; then
> >>>>> >     CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
> >>>>> >     LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
> >>>>> > @@ -12,4 +23,4 @@ Upstream-Status: Pending
> >>>>> >  -  CFLAGS="-O2 $CFLAGS"
> >>>>> >   fi
> >>>>> >
> >>>>> > - ##########################################
> >>>>> > + if test "$have_asan" = "yes"; then
> >>>>> > diff --git a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
> >>>>> > b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
> >>>>> > similarity index 87%
> >>>>> > rename from meta/recipes-devtools/qemu/qemu_2.11.1.bb
> >>>>> > rename to meta/recipes-devtools/qemu/qemu_2.12.0.bb
> >>>>> > index f4b7d69fca..63590fc9eb 100644
> >>>>> > --- a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
> >>>>> > +++ b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
> >>>>> > @@ -20,8 +20,6 @@ SRC_URI =
> >>>>> > "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
> >>>>> >
>  file://chardev-connect-socket-to-a-spawned-command.patch
> >>>>> > \
> >>>>> >             file://apic-fixup-fallthrough-to-PIC.patch \
> >>>>> >
> >>>>> > file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
> >>>>> > -           file://memfd.patch \
> >>>>> > -
> >>>>> >
> file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
> >>>>> >             "
> >>>>> >  UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
> >>>>> >
> >>>>> > @@ -31,8 +29,8 @@ SRC_URI_append_class-native = " \
> >>>>> >              file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
> >>>>> >              "
> >>>>> >
> >>>>> > -SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
> >>>>> > -SRC_URI[sha256sum] =
> >>>>> > "d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb"
> >>>>> > +SRC_URI[md5sum] = "122fd7cdf241ff7eb1e42c0b503b5d1b"
> >>>>> > +SRC_URI[sha256sum] =
> >>>>> > "c9f4a147bc915d24df9784affc611a115f42d24720a89210b479f1ba7a3f679c"
> >>>>> >
> >>>>> >  COMPATIBLE_HOST_mipsarchn32 = "null"
> >>>>> >  COMPATIBLE_HOST_mipsarchn64 = "null"
> >>>>> > --
> >>>>> > 2.17.0
> >>>>> >
> >>>>> > --
> >>>>> > _______________________________________________
> >>>>> > Openembedded-core mailing list
> >>>>> > Openembedded-core@lists.openembedded.org
> >>>>> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
> >
> >
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
> >
>

[-- Attachment #2: Type: text/html, Size: 46838 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 2/3] qemu: upgrade to 2.12.0
  2018-06-01  6:37               ` Martin Jansa
@ 2018-06-01  9:08                 ` Martin Jansa
  0 siblings, 0 replies; 29+ messages in thread
From: Martin Jansa @ 2018-06-01  9:08 UTC (permalink / raw)
  To: Alistair Francis; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 32927 bytes --]

Replaying the end of bisect got me a bit elsewhere:

git bisect start
# good: [9f750794985d7386f088da941c76b73880b2b6c4] sev/i386: add
sev_get_capabilities()
git bisect good 9f750794985d7386f088da941c76b73880b2b6c4
# bad: [91c60f124e682a78c9a2ef951e8e58ebab6441d0] target/ppc: fix tlbsync
to check privilege level depending on GTSE
git bisect bad 91c60f124e682a78c9a2ef951e8e58ebab6441d0
# bad: [a57946ff2acb9c0d95c9f127914540586b0b8c21] Merge remote-tracking
branch 'remotes/awilliam/tags/vfio-update-20180313.0' into staging
git bisect bad a57946ff2acb9c0d95c9f127914540586b0b8c21
# good: [5bdd374347b873ab59b356a284494a8bc1664008] Merge remote-tracking
branch 'remotes/bonzini/tags/for-upstream-sev' into staging
git bisect good 5bdd374347b873ab59b356a284494a8bc1664008
# bad: [55901900ec69d6fd6f332003d8ab81b2f8a38529] Merge remote-tracking
branch 'remotes/vivier2/tags/linux-user-for-2.12-pull-request' into staging
git bisect bad 55901900ec69d6fd6f332003d8ab81b2f8a38529
# bad: [d4090306c8079ca3df426f82c493314c3537064e] qemu-binfmt-conf.sh: add
qemu-xtensa
git bisect bad d4090306c8079ca3df426f82c493314c3537064e
# good: [d4247ec2d79ef2477cb886fa688706b068119736] linux-user: Support
f_flags in statfs when available.
git bisect good d4247ec2d79ef2477cb886fa688706b068119736
# bad: [3c5f6a5f888729f9fbc64211298f7c3e2fb42b64] linux-user: fix assertion
in shmdt
git bisect bad 3c5f6a5f888729f9fbc64211298f7c3e2fb42b64
# bad: [ebf9a3630c911d0cfc9c20f7cafe9ba4f88cf583] linux-user: fix
mmap/munmap/mprotect/mremap/shmat
git bisect bad ebf9a3630c911d0cfc9c20f7cafe9ba4f88cf583
# first bad commit: [ebf9a3630c911d0cfc9c20f7cafe9ba4f88cf583] linux-user:
fix mmap/munmap/mprotect/mremap/shmat

And this time reverting ebf9a3630c911d0cfc9c20f7cafe9ba4f88cf583 worked for
me. Sending v2 in few minutes for Ross to re-test it on AB.

On Fri, Jun 1, 2018 at 8:37 AM Martin Jansa <martin.jansa@gmail.com> wrote:

> Yesterday I've tried to replay the end of the bisect and surprisingly I
> wasn't seeing the hang with d4247ec2d79ef2477cb886fa688706b068119736.
>
> With 2nd bad d4090306c8079ca3df426f82c493314c3537064e it hangs again.
>
> So either I didn't wait long enough for qemu-i386 to finish (I mark it as
> bad after it spends > 10mins inside qemu-i386 or the hang doesn't happen
> reliably even with "bad" revision of qemu.
>
> The revisions I'm trying are here:
>
> http://git.openembedded.org/openembedded-core-contrib/log/?h=jansa/qemu-hang
>
> On Fri, Jun 1, 2018 at 2:01 AM Alistair Francis <alistair23@gmail.com>
> wrote:
>
>> On Thu, May 31, 2018 at 8:41 AM, Martin Jansa <martin.jansa@gmail.com>
>> wrote:
>> > I've finished the bisect today:
>> >
>> > qemu$ git bisect log
>> > git bisect start
>> > # good: [9f750794985d7386f088da941c76b73880b2b6c4] sev/i386: add
>> > sev_get_capabilities()
>> > git bisect good 9f750794985d7386f088da941c76b73880b2b6c4
>> > # bad: [91c60f124e682a78c9a2ef951e8e58ebab6441d0] target/ppc: fix
>> tlbsync to
>> > check privilege level depending on GTSE
>> > git bisect bad 91c60f124e682a78c9a2ef951e8e58ebab6441d0
>> > # bad: [a57946ff2acb9c0d95c9f127914540586b0b8c21] Merge remote-tracking
>> > branch 'remotes/awilliam/tags/vfio-update-20180313.0' into staging
>> > git bisect bad a57946ff2acb9c0d95c9f127914540586b0b8c21
>> > # good: [5bdd374347b873ab59b356a284494a8bc1664008] Merge remote-tracking
>> > branch 'remotes/bonzini/tags/for-upstream-sev' into staging
>> > git bisect good 5bdd374347b873ab59b356a284494a8bc1664008
>> > # bad: [55901900ec69d6fd6f332003d8ab81b2f8a38529] Merge remote-tracking
>> > branch 'remotes/vivier2/tags/linux-user-for-2.12-pull-request' into
>> staging
>> > git bisect bad 55901900ec69d6fd6f332003d8ab81b2f8a38529
>> > # bad: [d4090306c8079ca3df426f82c493314c3537064e] qemu-binfmt-conf.sh:
>> add
>> > qemu-xtensa
>> > git bisect bad d4090306c8079ca3df426f82c493314c3537064e
>> > # bad: [d4247ec2d79ef2477cb886fa688706b068119736] linux-user: Support
>> > f_flags in statfs when available.
>> > git bisect bad d4247ec2d79ef2477cb886fa688706b068119736
>> > # good: [f8b985d65cf67004483816d5afcb7bf686e11702] linux-user: Remove
>> the
>> > unused "not implemented" signal handling stubs
>> > git bisect good f8b985d65cf67004483816d5afcb7bf686e11702
>> > # good: [3ff48453e894990ea6495574037e70ed9b91947e] linux-user: allows
>> to use
>> > "--systemd ALL" with qemu-binfmt-conf.sh
>> > git bisect good 3ff48453e894990ea6495574037e70ed9b91947e
>> > # first bad commit: [d4247ec2d79ef2477cb886fa688706b068119736]
>> linux-user:
>> > Support f_flags in statfs when available.
>>
>> Awesome! Thanks for this.
>>
>> >
>> >
>> > Unfortunately just revering "[d4247ec2d79ef2477cb886fa688706b068119736]
>> > linux-user: Support f_flags in statfs when available" at the top of
>> v2.12.0
>> > still hangs.
>> >
>> > I will try to dig a bit more, but any advice would be appreciated.
>>
>> I managed to reproduce the hang today, so I'll investigate tomorrow.
>> I'm surprised reverting the commit doesn't work.
>>
>> Alistair
>>
>> >
>> > On Tue, May 29, 2018 at 10:40 PM Martin Jansa <martin.jansa@gmail.com>
>> > wrote:
>> >>
>> >> After removing ld-is-gold I was able to reproduce the issue.
>> >>
>> >> Unfortunately removing the
>> >>
>> meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
>> >> doesn't help with the hang, then I've tried to upgrade to latest
>> SRCREV in
>> >> qemu master (currently 5a5c383b1373aeb6c87a0d6060f6c3dc7c53082b)
>> >>
>> >> Will try to bisect where it started to hang between 2.11.0 and 2.12.0,
>> but
>> >> it might be faster if Alistair Francis can chime in as the author of
>> this
>> >> patch, he might have better idea why it stopped working.
>> >>
>> >> Cheers,
>> >>
>> >> On Tue, May 29, 2018 at 2:56 PM Martin Jansa <martin.jansa@gmail.com>
>> >> wrote:
>> >>>
>> >>> I've tried to reproduce it locally, but g-ir-scanner-qemuwrapper is
>> >>> failing for me in various recipes and I never got as far as webkitgtk
>> >>>
>> >>> pango:
>> >>> Error relocating
>> >>>
>> TOPDIR/tmp-musl/work/i586-oe-linux-musl/pango/1.40.14-r0/recipe-sysroot//usr/lib/libGL.so.1:
>> >>> __glX_tls_Context: symbol not found
>> >>> http://errors.yoctoproject.org/Errors/Details/178988/
>> >>>
>> >>> after disabling GI for pango (GI_DATA_ENABLED_pn-pango = "False") it
>> >>> failed in
>> >>> librsvg:
>> >>> Error relocating
>> >>>
>> TOPDIR/tmp-musl/work/i586-oe-linux-musl/librsvg/2.40.20-r0/recipe-sysroot//usr/lib/libGL.so.1:
>> >>> __glX_tls_Context: symbol not found
>> >>> http://errors.yoctoproject.org/Errors/Details/178991/
>> >>>
>> >>> gstreamer1.0-plugins-base:
>> >>> Error relocating
>> >>>
>> TOPDIR/tmp-musl/work/i586-oe-linux-musl/gstreamer1.0-plugins-base/1.14.0-r0/recipe-sysroot//usr/lib/libEGL.so.1:
>> >>> _egl_TLS: symbol not found
>> >>> http://errors.yoctoproject.org/Errors/Details/178993/
>> >>>
>> >>> and gtk+3 as well, because of disabled GI for pango:
>> >>> Couldn't find include 'Pango-1.0.gir' (search path:
>> >>>
>> '['TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gir-1.0',
>> >>> '../gdk',
>> >>>
>> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gir-1.0',
>> >>>
>> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot-native/usr/share/gir-1.0',
>> >>> '/usr/share/gir-1.0',
>> >>>
>> 'TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot-native/usr/share/gir-1.0']')
>> >>>
>> >>>
>> TOPDIR/tmp-musl/work/i586-oe-linux-musl/gtk+3/3.22.29-r0/recipe-sysroot/usr/share/gobject-introspection-1.0/Makefile.introspection:159:
>> >>> recipe for target 'Gdk-3.0.gir' failed
>> >>> http://errors.yoctoproject.org/Errors/Details/178992/
>> >>>
>> >>> I'm not sure how exactly AB is doing this qemux86 musl build, it
>> might be
>> >>> some more changes I have locally or missing/superfluous something in
>> my
>> >>> config.
>> >>>
>> >>> On Tue, May 29, 2018 at 11:10 AM Martin Jansa <martin.jansa@gmail.com
>> >
>> >>> wrote:
>> >>>>
>> >>>> This hang should have been fixed by:
>> >>>>
>> >>>>
>> meta/recipes-devtools/qemu/qemu/linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch
>> >>>>
>> >>>> which was added with previous upgrade to 2.11.0:
>> >>>>
>> >>>> commit d6d0d99569e0d8b62a61e27d389e7939af45bab9
>> >>>> Author: Alistair Francis <alistair.francis@xilinx.com>
>> >>>> Date:   Wed Jan 17 13:39:06 2018 -0800
>> >>>>
>> >>>>     qemu: Bump to version 2.11.0
>> >>>>
>> >>>> and my update only shifted the chunk by 2 lines in:
>> >>>>
>> >>>> commit a742584f253e25b97729abe19ca9e4fa2809ea2e
>> >>>> Author: Martin Jansa <martin.jansa@gmail.com>
>> >>>> Date:   Wed May 2 14:37:33 2018 +0000
>> >>>>
>> >>>>     qemu: refresh patches with devtool
>> >>>>
>> >>>> and the patch is still being applied. I was waiting for
>> >>>> http://jenkins.nas-admin.org/view/OE/job/oe_world_qemux86/ to
>> reproduce it,
>> >>>> but it seems that Khem is working on some bigger overhaul of the
>> jobs and
>> >>>> it's not ready yet, I'll try to reproduce it locally now and if I can
>> >>>> reproduce it, then I'll try to just remove this patch, because the
>> upstream
>> >>>> didn't accept it very well in:
>> >>>> http://lists.gnu.org/archive/html/qemu-devel/2018-01/msg04185.html
>> >>>> and the discussion there died few months ago.
>> >>>>
>> >>>> Regards,
>> >>>>
>> >>>> On Fri, May 18, 2018 at 11:59 PM Burton, Ross <ross.burton@intel.com
>> >
>> >>>> wrote:
>> >>>>>
>> >>>>> This is causing the AB to hang when built for qemux86 with musl
>> whilst
>> >>>>> building webkitgtk during the gobject-introspection qemu-i386 calls,
>> >>>>> qemu enters an infinite loop.
>> >>>>>
>> >>>>> I've not yet reproduced locally to try and get a log out of qemu,
>> but
>> >>>>> it has happened on the autobuilder repeatedly.
>> >>>>>
>> >>>>> Ross
>> >>>>>
>> >>>>> On 2 May 2018 at 15:37, Martin Jansa <martin.jansa@gmail.com>
>> wrote:
>> >>>>> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
>> >>>>> > ---
>> >>>>> >  meta/conf/distro/include/tcmode-default.inc   |  2 +-
>> >>>>> >  ...4-treat-DISAS_UPDATE-as-variant-of-D.patch | 67
>> >>>>> > -------------------
>> >>>>> >  ...-connect-socket-to-a-spawned-command.patch | 52 +++++++-------
>> >>>>> >  .../qemu/qemu/disable-grabs.patch             | 43 ++++++------
>> >>>>> >  meta/recipes-devtools/qemu/qemu/memfd.patch   | 57
>> ----------------
>> >>>>> >  .../qemu/qemu/qemu-2.5.0-cflags.patch         | 15 ++++-
>> >>>>> >  .../qemu/{qemu_2.11.1.bb => qemu_2.12.0.bb}   |  6 +-
>> >>>>> >  7 files changed, 65 insertions(+), 177 deletions(-)
>> >>>>> >  delete mode 100644
>> >>>>> >
>> meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>> >>>>> >  delete mode 100644 meta/recipes-devtools/qemu/qemu/memfd.patch
>> >>>>> >  rename meta/recipes-devtools/qemu/{qemu_2.11.1.bb =>
>> qemu_2.12.0.bb}
>> >>>>> > (87%)
>> >>>>> >
>> >>>>> > diff --git a/meta/conf/distro/include/tcmode-default.inc
>> >>>>> > b/meta/conf/distro/include/tcmode-default.inc
>> >>>>> > index 00399ae820..8b5214ed96 100644
>> >>>>> > --- a/meta/conf/distro/include/tcmode-default.inc
>> >>>>> > +++ b/meta/conf/distro/include/tcmode-default.inc
>> >>>>> > @@ -28,7 +28,7 @@ BINUVERSION ?= "2.30%"
>> >>>>> >  GDBVERSION ?= "8.0%"
>> >>>>> >  GLIBCVERSION ?= "2.27%"
>> >>>>> >  LINUXLIBCVERSION ?= "4.15%"
>> >>>>> > -QEMUVERSION ?= "2.11%"
>> >>>>> > +QEMUVERSION ?= "2.12%"
>> >>>>> >
>> >>>>> >  PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
>> >>>>> >  PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
>> >>>>> > diff --git
>> >>>>> >
>> a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>> >>>>> >
>> b/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>> >>>>> > deleted file mode 100644
>> >>>>> > index f90cae694c..0000000000
>> >>>>> > ---
>> >>>>> >
>> a/meta/recipes-devtools/qemu/qemu/0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch
>> >>>>> > +++ /dev/null
>> >>>>> > @@ -1,67 +0,0 @@
>> >>>>> > -From a75a52d62418dafe462be4fe30485501d1010bb9 Mon Sep 17 00:00:00
>> >>>>> > 2001
>> >>>>> > -From: Victor Kamensky <kamensky@cisco.com>
>> >>>>> > -Date: Fri, 23 Mar 2018 18:26:45 +0000
>> >>>>> > -Subject: [PATCH] arm/translate-a64: treat DISAS_UPDATE as
>> variant of
>> >>>>> > - DISAS_EXIT
>> >>>>> > -MIME-Version: 1.0
>> >>>>> > -Content-Type: text/plain; charset=UTF-8
>> >>>>> > -Content-Transfer-Encoding: 8bit
>> >>>>> > -
>> >>>>> > -In OE project 4.15 linux kernel boot hang was observed under
>> >>>>> > -single cpu aarch64 qemu. Kernel code was in a loop waiting for
>> >>>>> > -vtimer arrival, spinning in TC generated blocks, while interrupt
>> >>>>> > -was pending unprocessed. This happened because when qemu tried to
>> >>>>> > -handle vtimer interrupt target had interrupts disabled, as
>> >>>>> > -result flag indicating TCG exit, cpu->icount_decr.u16.high,
>> >>>>> > -was cleared but arm_cpu_exec_interrupt function did not call
>> >>>>> > -arm_cpu_do_interrupt to process interrupt. Later when target
>> >>>>> > -reenabled interrupts, it happened without exit into main loop, so
>> >>>>> > -following code that waited for result of interrupt execution
>> >>>>> > -run in infinite loop.
>> >>>>> > -
>> >>>>> > -To solve the problem instructions that operate on CPU sys state
>> >>>>> > -(i.e enable/disable interrupt), and marked as DISAS_UPDATE,
>> >>>>> > -should be considered as DISAS_EXIT variant, and should be
>> >>>>> > -forced to exit back to main loop so qemu will have a chance
>> >>>>> > -processing pending CPU state updates, including pending
>> >>>>> > -interrupts.
>> >>>>> > -
>> >>>>> > -This change brings consistency with how DISAS_UPDATE is treated
>> >>>>> > -in aarch32 case.
>> >>>>> > -
>> >>>>> > -CC: Peter Maydell <peter.maydell@linaro.org>
>> >>>>> > -CC: Alex Bennée <alex.bennee@linaro.org>
>> >>>>> > -CC: qemu-stable@nongnu.org
>> >>>>> > -Suggested-by: Peter Maydell <peter.maydell@linaro.org>
>> >>>>> > -Signed-off-by: Victor Kamensky <kamensky@cisco.com>
>> >>>>> > -Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>> >>>>> > -Message-id: 1521526368-1996-1-git-send-email-kamensky@cisco.com
>> >>>>> > -Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> >>>>> > -Upstream-Status: Backport
>> >>>>> > ----
>> >>>>> > - target/arm/translate-a64.c | 6 +++---
>> >>>>> > - 1 file changed, 3 insertions(+), 3 deletions(-)
>> >>>>> > -
>> >>>>> > -diff --git a/target/arm/translate-a64.c
>> b/target/arm/translate-a64.c
>> >>>>> > -index 31ff047..327513e 100644
>> >>>>> > ---- a/target/arm/translate-a64.c
>> >>>>> > -+++ b/target/arm/translate-a64.c
>> >>>>> > -@@ -13378,12 +13378,12 @@ static void
>> >>>>> > aarch64_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
>> >>>>> > -         case DISAS_UPDATE:
>> >>>>> > -             gen_a64_set_pc_im(dc->pc);
>> >>>>> > -             /* fall through */
>> >>>>> > --        case DISAS_JUMP:
>> >>>>> > --            tcg_gen_lookup_and_goto_ptr();
>> >>>>> > --            break;
>> >>>>> > -         case DISAS_EXIT:
>> >>>>> > -             tcg_gen_exit_tb(0);
>> >>>>> > -             break;
>> >>>>> > -+        case DISAS_JUMP:
>> >>>>> > -+            tcg_gen_lookup_and_goto_ptr();
>> >>>>> > -+            break;
>> >>>>> > -         case DISAS_NORETURN:
>> >>>>> > -         case DISAS_SWI:
>> >>>>> > -             break;
>> >>>>> > ---
>> >>>>> > -2.7.4
>> >>>>> > -
>> >>>>> > diff --git
>> >>>>> >
>> a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>> >>>>> >
>> b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>> >>>>> > index 6e6bf95c18..f1cf53a8c5 100644
>> >>>>> > ---
>> >>>>> >
>> a/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>> >>>>> > +++
>> >>>>> >
>> b/meta/recipes-devtools/qemu/qemu/chardev-connect-socket-to-a-spawned-command.patch
>> >>>>> > @@ -1,4 +1,4 @@
>> >>>>> > -From 3bb3100c22eb30146a69656480bdffeef8663575 Mon Sep 17 00:00:00
>> >>>>> > 2001
>> >>>>> > +From a7690b02df70e0d3957e6eaa1e1cf92595839fbb Mon Sep 17 00:00:00
>> >>>>> > 2001
>> >>>>> >  From: Alistair Francis <alistair.francis@xilinx.com>
>> >>>>> >  Date: Thu, 21 Dec 2017 11:35:16 -0800
>> >>>>> >  Subject: [PATCH] chardev: connect socket to a spawned command
>> >>>>> > @@ -45,16 +45,16 @@ Upstream-Status: Inappropriate [embedded
>> >>>>> > specific]
>> >>>>> >
>> >>>>> >  Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
>> >>>>> >  ---
>> >>>>> > - chardev/char-socket.c | 86
>> >>>>> > ++++++++++++++++++++++++++++++++++++++++++++++++---
>> >>>>> > - chardev/char.c        |  3 ++
>> >>>>> > - qapi/char.json        |  5 +++
>> >>>>> > - 3 files changed, 90 insertions(+), 4 deletions(-)
>> >>>>> > + chardev/char-socket.c | 102
>> >>>>> > ++++++++++++++++++++++++++++++++++++++++++
>> >>>>> > + chardev/char.c        |   3 ++
>> >>>>> > + qapi/char.json        |   5 +++
>> >>>>> > + 3 files changed, 110 insertions(+)
>> >>>>> >
>> >>>>> >  diff --git a/chardev/char-socket.c b/chardev/char-socket.c
>> >>>>> > -index 53eda8ef00..f566107c35 100644
>> >>>>> > +index 159e69c3b1..84778cf31a 100644
>> >>>>> >  --- a/chardev/char-socket.c
>> >>>>> >  +++ b/chardev/char-socket.c
>> >>>>> > -@@ -852,6 +852,68 @@ static gboolean
>> >>>>> > socket_reconnect_timeout(gpointer opaque)
>> >>>>> > +@@ -934,6 +934,68 @@ static gboolean
>> >>>>> > socket_reconnect_timeout(gpointer opaque)
>> >>>>> >       return false;
>> >>>>> >   }
>> >>>>> >
>> >>>>> > @@ -123,7 +123,7 @@ index 53eda8ef00..f566107c35 100644
>> >>>>> >   static void qmp_chardev_open_socket(Chardev *chr,
>> >>>>> >                                       ChardevBackend *backend,
>> >>>>> >                                       bool *be_opened,
>> >>>>> > -@@ -859,6 +921,9 @@
>> >>>>> > +@@ -941,6 +1003,9 @@ static void qmp_chardev_open_socket(Chardev
>> >>>>> > *chr,
>> >>>>> >   {
>> >>>>> >       SocketChardev *s = SOCKET_CHARDEV(chr);
>> >>>>> >       ChardevSocket *sock = backend->u.socket.data;
>> >>>>> > @@ -133,11 +133,10 @@ index 53eda8ef00..f566107c35 100644
>> >>>>> >       bool do_nodelay     = sock->has_nodelay ? sock->nodelay :
>> >>>>> > false;
>> >>>>> >       bool is_listen      = sock->has_server  ? sock->server  :
>> true;
>> >>>>> >       bool is_telnet      = sock->has_telnet  ? sock->telnet  :
>> >>>>> > false;
>> >>>>> > -@@ -925,7 +990,14 @@
>> >>>>> > -     } else if (reconnect > 0) {
>> >>>>> > +@@ -1008,6 +1073,14 @@ static void
>> qmp_chardev_open_socket(Chardev
>> >>>>> > *chr,
>> >>>>> >           s->reconnect_time = reconnect;
>> >>>>> >       }
>> >>>>> > --
>> >>>>> > +
>> >>>>> >  +#ifndef _WIN32
>> >>>>> >  +    if (cmd) {
>> >>>>> >  +        chardev_open_socket_cmd(chr, cmd, errp);
>> >>>>> > @@ -146,12 +145,12 @@ index 53eda8ef00..f566107c35 100644
>> >>>>> >  +        *be_opened = true;
>> >>>>> >  +    } else
>> >>>>> >  +#endif
>> >>>>> > -     if (s->reconnect_time) {
>> >>>>> > -         sioc = qio_channel_socket_new();
>> >>>>> > -         tcp_chr_set_client_ioc_name(chr, sioc);
>> >>>>> > -@@ -985,10 +1057,26 @@
>> >>>>> > -     const char *host = qemu_opt_get(opts, "host");
>> >>>>> > +     /* If reconnect_time is set, will do that in
>> chr_machine_done.
>> >>>>> > */
>> >>>>> > +     if (!s->reconnect_time) {
>> >>>>> > +         if (s->is_listen) {
>> >>>>> > +@@ -1065,9 +1138,26 @@ static void qemu_chr_parse_socket(QemuOpts
>> >>>>> > *opts, ChardevBackend *backend,
>> >>>>> >       const char *port = qemu_opt_get(opts, "port");
>> >>>>> > +     const char *fd = qemu_opt_get(opts, "fd");
>> >>>>> >       const char *tls_creds = qemu_opt_get(opts, "tls-creds");
>> >>>>> >  +#ifndef _WIN32
>> >>>>> >  +    const char *cmd = qemu_opt_get(opts, "cmd");
>> >>>>> > @@ -159,7 +158,6 @@ index 53eda8ef00..f566107c35 100644
>> >>>>> >       SocketAddressLegacy *addr;
>> >>>>> >       ChardevSocket *sock;
>> >>>>> >
>> >>>>> > -     backend->type = CHARDEV_BACKEND_KIND_SOCKET;
>> >>>>> >  +#ifndef _WIN32
>> >>>>> >  +    if (cmd) {
>> >>>>> >  +        /*
>> >>>>> > @@ -173,17 +171,18 @@ index 53eda8ef00..f566107c35 100644
>> >>>>> >  +        }
>> >>>>> >  +    } else
>> >>>>> >  +#endif
>> >>>>> > -     if (!path) {
>> >>>>> > -         if (!host) {
>> >>>>> > -             error_setg(errp, "chardev: socket: no host given");
>> >>>>> > -@@ -1021,13 +1109,24 @@
>> >>>>> > -     sock->has_reconnect = true;
>> >>>>> > ++
>> >>>>> > +     if ((!!path + !!fd + !!host) != 1) {
>> >>>>> > +         error_setg(errp,
>> >>>>> > +                    "Exactly one of 'path', 'fd' or 'host'
>> >>>>> > required");
>> >>>>> > +@@ -1112,12 +1202,24 @@ static void
>> qemu_chr_parse_socket(QemuOpts
>> >>>>> > *opts, ChardevBackend *backend,
>> >>>>> >       sock->reconnect = reconnect;
>> >>>>> >       sock->tls_creds = g_strdup(tls_creds);
>> >>>>> > +
>> >>>>> >  +#ifndef _WIN32
>> >>>>> >  +    sock->cmd = g_strdup(cmd);
>> >>>>> >  +#endif
>> >>>>> > -
>> >>>>> > ++
>> >>>>> >       addr = g_new0(SocketAddressLegacy, 1);
>> >>>>> >  +#ifndef _WIN32
>> >>>>> >  +    if (path || cmd) {
>> >>>>> > @@ -198,11 +197,11 @@ index 53eda8ef00..f566107c35 100644
>> >>>>> >  +#else
>> >>>>> >           q_unix->path = g_strdup(path);
>> >>>>> >  +#endif
>> >>>>> > -     } else {
>> >>>>> > +     } else if (host) {
>> >>>>> >           addr->type = SOCKET_ADDRESS_LEGACY_KIND_INET;
>> >>>>> >           addr->u.inet.data = g_new(InetSocketAddress, 1);
>> >>>>> >  diff --git a/chardev/char.c b/chardev/char.c
>> >>>>> > -index 2ae4f465ec..5d52cd5de5 100644
>> >>>>> > +index 76d866e6fe..9747d51d7c 100644
>> >>>>> >  --- a/chardev/char.c
>> >>>>> >  +++ b/chardev/char.c
>> >>>>> >  @@ -792,6 +792,9 @@ QemuOptsList qemu_chardev_opts = {
>> >>>>> > @@ -239,4 +238,5 @@ index ae19dcd1ed..6de0f29bcd 100644
>> >>>>> >                                        '*server'    : 'bool',
>> >>>>> >                                        '*wait'      : 'bool',
>> >>>>> >  --
>> >>>>> > -2.14.1
>> >>>>> > +2.17.0
>> >>>>> > +
>> >>>>> > diff --git a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>> >>>>> > b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>> >>>>> > index 77117890f4..e29c011a6f 100644
>> >>>>> > --- a/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>> >>>>> > +++ b/meta/recipes-devtools/qemu/qemu/disable-grabs.patch
>> >>>>> > @@ -1,3 +1,11 @@
>> >>>>> > +From a31c5c695cb716310257f1fc60a06b821e74fe7f Mon Sep 17 00:00:00
>> >>>>> > 2001
>> >>>>> > +From: Ross Burton <ross.burton@intel.com>
>> >>>>> > +Date: Wed, 18 Sep 2013 14:04:54 +0100
>> >>>>> > +Subject: [PATCH] sdl.c: allow user to disable pointer grabs
>> >>>>> > +MIME-Version: 1.0
>> >>>>> > +Content-Type: text/plain; charset=UTF-8
>> >>>>> > +Content-Transfer-Encoding: 8bit
>> >>>>> > +
>> >>>>> >  When the pointer enters the Qemu window it calls
>> SDL_WM_GrabInput,
>> >>>>> > which calls
>> >>>>> >  XGrabPointer in a busyloop until it returns GrabSuccess. However
>> if
>> >>>>> > there's already
>> >>>>> >  a pointer grab (screen is locked, a menu is open) then qemu will
>> >>>>> > hang until the
>> >>>>> > @@ -11,35 +19,30 @@ them in a conditional that can be set by the
>> >>>>> > autobuilder environment, preserving
>> >>>>> >  the current grabbing behaviour for everyone else.
>> >>>>> >
>> >>>>> >  Upstream-Status: Pending
>> >>>>> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
>> >>>>> > -
>> >>>>> > -From 4b1988ecb01a178269ec0513a75f2ec620c7ef6a Mon Sep 17 00:00:00
>> >>>>> > 2001
>> >>>>> > -From: Ross Burton <ross.burton@intel.com>
>> >>>>> > -Date: Wed, 18 Sep 2013 14:04:54 +0100
>> >>>>> > -Subject: [PATCH] sdl.c: allow user to disable pointer grabs
>> >>>>> > -
>> >>>>> >  Signed-off-by: Ross Burton <ross.burton@intel.com>
>> >>>>> >  Signed-off-by: Eric Bénard <eric@eukrea.com>
>> >>>>> > +
>> >>>>> >  ---
>> >>>>> > - ui/sdl.c | 12 ++++++++++--
>> >>>>> > - 1 file changed, 10 insertions(+), 2 deletions(-)
>> >>>>> > + ui/sdl.c | 13 +++++++++++--
>> >>>>> > + 1 file changed, 11 insertions(+), 2 deletions(-)
>> >>>>> >
>> >>>>> > -Index: qemu-2.11.1/ui/sdl.c
>> >>>>> >
>> -===================================================================
>> >>>>> > ---- qemu-2.11.1.orig/ui/sdl.c
>> >>>>> > -+++ qemu-2.11.1/ui/sdl.c
>> >>>>> > -@@ -63,6 +63,10 @@ static SDL_PixelFormat host_format;
>> >>>>> > - static int scaling_active = 0;
>> >>>>> > - static Notifier mouse_mode_notifier;
>> >>>>> > - static int idle_counter;
>> >>>>> > +diff --git a/ui/sdl.c b/ui/sdl.c
>> >>>>> > +index a5fd503..ab8d1b1 100644
>> >>>>> > +--- a/ui/sdl.c
>> >>>>> > ++++ b/ui/sdl.c
>> >>>>> > +@@ -68,6 +68,11 @@ static int idle_counter;
>> >>>>> > + static const guint16 *keycode_map;
>> >>>>> > + static size_t keycode_maplen;
>> >>>>> > +
>> >>>>> >  +#ifndef True
>> >>>>> >  +#define True 1
>> >>>>> >  +#endif
>> >>>>> >  +static doing_grabs = True;
>> >>>>> > -
>> >>>>> > ++
>> >>>>> >   #define SDL_REFRESH_INTERVAL_BUSY 10
>> >>>>> >   #define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
>> >>>>> > -@@ -431,14 +435,16 @@ static void sdl_grab_start(void)
>> >>>>> > +                             / SDL_REFRESH_INTERVAL_BUSY + 1)
>> >>>>> > +@@ -398,14 +403,16 @@ static void sdl_grab_start(void)
>> >>>>> >           }
>> >>>>> >       } else
>> >>>>> >           sdl_hide_cursor();
>> >>>>> > @@ -58,7 +61,7 @@ Index: qemu-2.11.1/ui/sdl.c
>> >>>>> >       gui_grab = 0;
>> >>>>> >       sdl_show_cursor();
>> >>>>> >       sdl_update_caption();
>> >>>>> > -@@ -986,6 +992,8 @@ void sdl_display_init(DisplayState *ds,
>> >>>>> > +@@ -945,6 +952,8 @@ static void sdl1_display_init(DisplayState
>> *ds,
>> >>>>> > DisplayOptions *o)
>> >>>>> >        * This requires SDL >= 1.2.14. */
>> >>>>> >       setenv("SDL_DISABLE_LOCK_KEYS", "1", 1);
>> >>>>> >
>> >>>>> > diff --git a/meta/recipes-devtools/qemu/qemu/memfd.patch
>> >>>>> > b/meta/recipes-devtools/qemu/qemu/memfd.patch
>> >>>>> > deleted file mode 100644
>> >>>>> > index 62e8d3800b..0000000000
>> >>>>> > --- a/meta/recipes-devtools/qemu/qemu/memfd.patch
>> >>>>> > +++ /dev/null
>> >>>>> > @@ -1,57 +0,0 @@
>> >>>>> > -Upstream-Status: Backport
>> >>>>> > -Signed-off-by: Ross Burton <ross.burton@intel.com>
>> >>>>> > -
>> >>>>> > -From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00
>> >>>>> > 2001
>> >>>>> > -From: Paolo Bonzini <pbonzini@redhat.com>
>> >>>>> > -Date: Tue, 28 Nov 2017 11:51:27 +0100
>> >>>>> > -Subject: [PATCH] memfd: fix configure test
>> >>>>> > -MIME-Version: 1.0
>> >>>>> > -Content-Type: text/plain; charset=UTF-8
>> >>>>> > -Content-Transfer-Encoding: 8bit
>> >>>>> > -
>> >>>>> > -Recent glibc added memfd_create in sys/mman.h.  This conflicts
>> with
>> >>>>> > -the definition in util/memfd.c:
>> >>>>> > -
>> >>>>> > -    /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12:
>> error:
>> >>>>> > static declaration of memfd_create follows non-static declaration
>> >>>>> > -
>> >>>>> > -Fix the configure test, and remove the sys/memfd.h inclusion
>> since
>> >>>>> > the
>> >>>>> > -file actually does not exist---it is a typo in the
>> memfd_create(2)
>> >>>>> > man
>> >>>>> > -page.
>> >>>>> > -
>> >>>>> > -Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
>> >>>>> > -Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> >>>>> > ----
>> >>>>> > - configure    | 2 +-
>> >>>>> > - util/memfd.c | 4 +---
>> >>>>> > - 2 files changed, 2 insertions(+), 4 deletions(-)
>> >>>>> > -
>> >>>>> > -diff --git a/configure b/configure
>> >>>>> > -index 9c8aa5a98b..99ccc1725a 100755
>> >>>>> > ---- a/configure
>> >>>>> > -+++ b/configure
>> >>>>> > -@@ -3923,7 +3923,7 @@ fi
>> >>>>> > - # check if memfd is supported
>> >>>>> > - memfd=no
>> >>>>> > - cat > $TMPC << EOF
>> >>>>> > --#include <sys/memfd.h>
>> >>>>> > -+#include <sys/mman.h>
>> >>>>> > -
>> >>>>> > - int main(void)
>> >>>>> > - {
>> >>>>> > -diff --git a/util/memfd.c b/util/memfd.c
>> >>>>> > -index 4571d1aba8..412e94a405 100644
>> >>>>> > ---- a/util/memfd.c
>> >>>>> > -+++ b/util/memfd.c
>> >>>>> > -@@ -31,9 +31,7 @@
>> >>>>> > -
>> >>>>> > - #include "qemu/memfd.h"
>> >>>>> > -
>> >>>>> > --#ifdef CONFIG_MEMFD
>> >>>>> > --#include <sys/memfd.h>
>> >>>>> > --#elif defined CONFIG_LINUX
>> >>>>> > -+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
>> >>>>> > - #include <sys/syscall.h>
>> >>>>> > - #include <asm/unistd.h>
>> >>>>> > -
>> >>>>> > ---
>> >>>>> > -2.11.0
>> >>>>> > diff --git
>> a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>> >>>>> > b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>> >>>>> > index eb99d14639..360519f1a1 100644
>> >>>>> > --- a/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>> >>>>> > +++ b/meta/recipes-devtools/qemu/qemu/qemu-2.5.0-cflags.patch
>> >>>>> > @@ -1,8 +1,19 @@
>> >>>>> > +From 6702ec74a7ba90b99efedde260c9f08b75d5516d Mon Sep 17 00:00:00
>> >>>>> > 2001
>> >>>>> > +From: Stephen Arnold <sarnold@vctlabs.com>
>> >>>>> > +Date: Sun, 12 Jun 2016 18:09:56 -0700
>> >>>>> > +Subject: [PATCH] qemu-native: set ld.bfd, fix cflags, and set
>> some
>> >>>>> > environment
>> >>>>> > +
>> >>>>> >  Upstream-Status: Pending
>> >>>>> >
>> >>>>> > +---
>> >>>>> > + configure | 4 ----
>> >>>>> > + 1 file changed, 4 deletions(-)
>> >>>>> > +
>> >>>>> > +diff --git a/configure b/configure
>> >>>>> > +index 69e05fb..12fc3d8 100755
>> >>>>> >  --- a/configure
>> >>>>> >  +++ b/configure
>> >>>>> > -@@ -4468,10 +4468,6 @@ fi
>> >>>>> > +@@ -5413,10 +5413,6 @@ write_c_skeleton
>> >>>>> >   if test "$gcov" = "yes" ; then
>> >>>>> >     CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
>> >>>>> >     LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
>> >>>>> > @@ -12,4 +23,4 @@ Upstream-Status: Pending
>> >>>>> >  -  CFLAGS="-O2 $CFLAGS"
>> >>>>> >   fi
>> >>>>> >
>> >>>>> > - ##########################################
>> >>>>> > + if test "$have_asan" = "yes"; then
>> >>>>> > diff --git a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
>> >>>>> > b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
>> >>>>> > similarity index 87%
>> >>>>> > rename from meta/recipes-devtools/qemu/qemu_2.11.1.bb
>> >>>>> > rename to meta/recipes-devtools/qemu/qemu_2.12.0.bb
>> >>>>> > index f4b7d69fca..63590fc9eb 100644
>> >>>>> > --- a/meta/recipes-devtools/qemu/qemu_2.11.1.bb
>> >>>>> > +++ b/meta/recipes-devtools/qemu/qemu_2.12.0.bb
>> >>>>> > @@ -20,8 +20,6 @@ SRC_URI =
>> >>>>> > "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
>> >>>>> >
>>  file://chardev-connect-socket-to-a-spawned-command.patch
>> >>>>> > \
>> >>>>> >             file://apic-fixup-fallthrough-to-PIC.patch \
>> >>>>> >
>> >>>>> > file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
>> >>>>> > -           file://memfd.patch \
>> >>>>> > -
>> >>>>> >
>> file://0001-arm-translate-a64-treat-DISAS_UPDATE-as-variant-of-D.patch \
>> >>>>> >             "
>> >>>>> >  UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+\..*)\.tar"
>> >>>>> >
>> >>>>> > @@ -31,8 +29,8 @@ SRC_URI_append_class-native = " \
>> >>>>> >              file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
>> >>>>> >              "
>> >>>>> >
>> >>>>> > -SRC_URI[md5sum] = "61cf862b6007eba4ac98247776af2e27"
>> >>>>> > -SRC_URI[sha256sum] =
>> >>>>> > "d9df2213ceed32e91dab7bc9dd19c1af83f91ba72c7aeef7605dfaaf81732ccb"
>> >>>>> > +SRC_URI[md5sum] = "122fd7cdf241ff7eb1e42c0b503b5d1b"
>> >>>>> > +SRC_URI[sha256sum] =
>> >>>>> > "c9f4a147bc915d24df9784affc611a115f42d24720a89210b479f1ba7a3f679c"
>> >>>>> >
>> >>>>> >  COMPATIBLE_HOST_mipsarchn32 = "null"
>> >>>>> >  COMPATIBLE_HOST_mipsarchn64 = "null"
>> >>>>> > --
>> >>>>> > 2.17.0
>> >>>>> >
>> >>>>> > --
>> >>>>> > _______________________________________________
>> >>>>> > Openembedded-core mailing list
>> >>>>> > Openembedded-core@lists.openembedded.org
>> >>>>> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>> >
>> >
>> > --
>> > _______________________________________________
>> > Openembedded-core mailing list
>> > Openembedded-core@lists.openembedded.org
>> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
>> >
>>
>

[-- Attachment #2: Type: text/html, Size: 49295 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2018-06-01  9:08 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-02 14:37 [PATCH 1/3] json-c: upgrade to 0.13.1 Martin Jansa
2018-05-02 14:37 ` [PATCH 2/3] qemu: upgrade to 2.12.0 Martin Jansa
2018-05-02 20:44   ` Alistair Francis
2018-05-09 15:38   ` Burton, Ross
2018-05-10 21:32     ` Alistair Francis
2018-05-11 19:20     ` [PATCHv2 1/5] libsdl2: allow to build native and nativesdk Martin Jansa
2018-05-11 19:21       ` [PATCHv2 2/5] qemu: upgrade to 2.12.0 Martin Jansa
2018-05-11 23:17         ` Alistair Francis
2018-05-11 19:21       ` [PATCHv2 3/5] qemu: refresh patches with devtool Martin Jansa
2018-05-11 23:18         ` Alistair Francis
2018-05-11 19:21       ` [PATCHv2 4/5] qemu: add PACKAGECONFIG for virglrenderer, sdl2, usb-redir and spice Martin Jansa
2018-05-13 20:05         ` Burton, Ross
2018-05-14 16:12           ` Martin Jansa
2018-05-11 19:21       ` [PATCHv2 5/5] qemu: use sdl2 instead of sdl1 Martin Jansa
2018-05-11 23:22         ` Alistair Francis
2018-05-11 23:20       ` [PATCHv2 1/5] libsdl2: allow to build native and nativesdk Alistair Francis
2018-05-18 21:58   ` [PATCH 2/3] qemu: upgrade to 2.12.0 Burton, Ross
2018-05-29  9:10     ` Martin Jansa
2018-05-29 12:56       ` Martin Jansa
2018-05-29 20:40         ` Martin Jansa
2018-05-29 23:14           ` Alistair Francis
2018-05-30  2:16             ` Khem Raj
2018-05-30 16:35               ` Alistair Francis
2018-05-31 15:41           ` Martin Jansa
2018-06-01  0:00             ` Alistair Francis
2018-06-01  6:37               ` Martin Jansa
2018-06-01  9:08                 ` Martin Jansa
2018-05-02 14:37 ` [PATCH 3/3] qemu: refresh patches with devtool Martin Jansa
2018-05-02 20:45   ` Alistair Francis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.