summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu/0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-13 14:44:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-17 08:45:35 +0100
commit7e25a6b4d52a16e812dfd444d65283d2c75d2d77 (patch)
tree1f61c98c9d24ed35b685af62bcdb1d83a36b80f9 /meta/recipes-devtools/qemu/qemu/0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch
parent1bff01bda9741ad3a9b9e1937d73859636575c7c (diff)
downloadpoky-7e25a6b4d52a16e812dfd444d65283d2c75d2d77.tar.gz
qemu: Upgrade 5.0.0 -> 5.1.0
* Drop backported CVE fixes * Drop cpu backtrace patch from 2015 for debugging an issue which we no longer see (patch throws rejects, files have moved) * Update mips patch to account for file renames * Update chardev patch to match upstream code changes * Update webkitgtk patch, qemumips build works ok but qemux86 musl webkitgtk still fails. Need to figure out the correct fix and upstream it for this, current revert patch is not maintainable. Release notes for 5.1.0 mention slight qemumips performance improvements which would be valuable to us. My tests show no improvement in qemumips testimage execution time for core-image-sato-sdk. Fix a ptest issue for a file looking for /usr/bin/bash when we have /bin/bash. (From OE-Core rev: 686b770af67fdd2251f4ddab5b0eefc8fb0870ef) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch')
-rw-r--r--meta/recipes-devtools/qemu/qemu/0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch74
1 files changed, 0 insertions, 74 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch b/meta/recipes-devtools/qemu/qemu/0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch
deleted file mode 100644
index e5ebfc1267..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1From 0a53e906510cce1f32bc04a11e81ea40f834dac4 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
3Date: Wed, 12 Aug 2015 15:11:30 -0500
4Subject: [PATCH] cpus.c: Add error messages when qemi_cpu_kick_thread fails.
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Add custom_debug.h with function for print backtrace information.
10When pthread_kill fails in qemu_cpu_kick_thread display backtrace and
11current cpu information.
12
13Upstream-Status: Inappropriate
14Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
15
16---
17 cpus.c | 5 +++++
18 custom_debug.h | 24 ++++++++++++++++++++++++
19 2 files changed, 29 insertions(+)
20 create mode 100644 custom_debug.h
21
22diff --git a/cpus.c b/cpus.c
23index e83f72b4..e6e2576e 100644
24--- a/cpus.c
25+++ b/cpus.c
26@@ -1769,6 +1769,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
27 return NULL;
28 }
29
30+#include "custom_debug.h"
31+
32 static void qemu_cpu_kick_thread(CPUState *cpu)
33 {
34 #ifndef _WIN32
35@@ -1781,6 +1783,9 @@ static void qemu_cpu_kick_thread(CPUState *cpu)
36 err = pthread_kill(cpu->thread->thread, SIG_IPI);
37 if (err && err != ESRCH) {
38 fprintf(stderr, "qemu:%s: %s", __func__, strerror(err));
39+ fprintf(stderr, "CPU #%d:\n", cpu->cpu_index);
40+ cpu_dump_state(cpu, stderr, 0);
41+ backtrace_print();
42 exit(1);
43 }
44 #else /* _WIN32 */
45diff --git a/custom_debug.h b/custom_debug.h
46new file mode 100644
47index 00000000..f029e455
48--- /dev/null
49+++ b/custom_debug.h
50@@ -0,0 +1,24 @@
51+#include <execinfo.h>
52+#include <stdio.h>
53+#define BACKTRACE_MAX 128
54+static void backtrace_print(void)
55+{
56+ int nfuncs = 0;
57+ void *buf[BACKTRACE_MAX];
58+ char **symbols;
59+ int i;
60+
61+ nfuncs = backtrace(buf, BACKTRACE_MAX);
62+
63+ symbols = backtrace_symbols(buf, nfuncs);
64+ if (symbols == NULL) {
65+ fprintf(stderr, "backtrace_print failed to get symbols");
66+ return;
67+ }
68+
69+ fprintf(stderr, "Backtrace ...\n");
70+ for (i = 0; i < nfuncs; i++)
71+ fprintf(stderr, "%s\n", symbols[i]);
72+
73+ free(symbols);
74+}