summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2017-01-31 16:10:24 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-05 09:22:16 +0000
commit8bf3f386f989ec9323c8399d1899d8b834e5ca94 (patch)
tree5d2f8e44a11e901e1173e36c6debcc1953d4507a /meta
parentf27ce57b99c5b12df8aca065769d114cf060c044 (diff)
downloadpoky-8bf3f386f989ec9323c8399d1899d8b834e5ca94.tar.gz
qemu: Upgrade to 2.8.0
Added patches: - target-ppc-fix-user-mode.patch Rebased patches: - exclude-some-arm-EABI-obsolete-syscalls.patc Removed patches (already in upstream): - 0003-fix-CVE-2016-7908.patch - 0004-fix-CVE-2016-7909.patch - 0001-target-mips-add-24KEc-CPU-definition.patch Changelog, http://wiki.qemu.org/ChangeLog/2.8 (From OE-Core rev: ab7eb1c896e4ba38b6c16acae3d25534296f62b8) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc1
-rw-r--r--meta/recipes-devtools/qemu/qemu/0001-target-mips-add-24KEc-CPU-definition.patch54
-rw-r--r--meta/recipes-devtools/qemu/qemu/0003-fix-CVE-2016-7908.patch62
-rw-r--r--meta/recipes-devtools/qemu/qemu/0004-fix-CVE-2016-7909.patch42
-rw-r--r--meta/recipes-devtools/qemu/qemu/Qemu-Arm-versatilepb-Add-memory-size-checking.patch46
-rw-r--r--meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch22
-rw-r--r--meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch48
-rw-r--r--meta/recipes-devtools/qemu/qemu_2.8.0.bb (renamed from meta/recipes-devtools/qemu/qemu_2.7.1.bb)8
8 files changed, 59 insertions, 224 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index ac5fcac83e..e3af5c21c0 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -19,7 +19,6 @@ SRC_URI = "\
19 file://wacom.patch \ 19 file://wacom.patch \
20 file://add-ptest-in-makefile.patch \ 20 file://add-ptest-in-makefile.patch \
21 file://run-ptest \ 21 file://run-ptest \
22 file://0001-target-mips-add-24KEc-CPU-definition.patch \
23 " 22 "
24 23
25SRC_URI_append_class-native = "\ 24SRC_URI_append_class-native = "\
diff --git a/meta/recipes-devtools/qemu/qemu/0001-target-mips-add-24KEc-CPU-definition.patch b/meta/recipes-devtools/qemu/qemu/0001-target-mips-add-24KEc-CPU-definition.patch
deleted file mode 100644
index c4dbee7d71..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-target-mips-add-24KEc-CPU-definition.patch
+++ /dev/null
@@ -1,54 +0,0 @@
1From 926bc194f918d46bd93557b15da8153b6a94a1d5 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net>
3Date: Mon, 25 Jul 2016 23:58:22 +0100
4Subject: [PATCH] target-mips: add 24KEc CPU definition
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Define a new CPU definition supporting 24KEc cores, similar to
10the existing 24Kc, but with added support for DSP instructions
11and MIPS16e (and without FPU).
12
13Signed-off-by: André Draszik <git@andred.net>
14---
15Upstream-Status: Submitted [http://lists.nongnu.org/archive/html/qemu-devel/2016-07/msg05778.html]
16 target-mips/translate_init.c | 22 ++++++++++++++++++++++
17 1 file changed, 22 insertions(+)
18
19diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c
20index 39ed5c4..6ae23e4 100644
21--- a/target-mips/translate_init.c
22+++ b/target-mips/translate_init.c
23@@ -256,6 +256,28 @@ static const mips_def_t mips_defs[] =
24 .mmu_type = MMU_TYPE_R4000,
25 },
26 {
27+ .name = "24KEc",
28+ .CP0_PRid = 0x00019600,
29+ .CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR) |
30+ (MMU_TYPE_R4000 << CP0C0_MT),
31+ .CP0_Config1 = MIPS_CONFIG1 | (15 << CP0C1_MMU) |
32+ (0 << CP0C1_IS) | (3 << CP0C1_IL) | (1 << CP0C1_IA) |
33+ (0 << CP0C1_DS) | (3 << CP0C1_DL) | (1 << CP0C1_DA) |
34+ (1 << CP0C1_CA),
35+ .CP0_Config2 = MIPS_CONFIG2,
36+ .CP0_Config3 = MIPS_CONFIG3 | (1 << CP0C3_DSPP) | (0 << CP0C3_VInt),
37+ .CP0_LLAddr_rw_bitmask = 0,
38+ .CP0_LLAddr_shift = 4,
39+ .SYNCI_Step = 32,
40+ .CCRes = 2,
41+ /* we have a DSP, but no FPU */
42+ .CP0_Status_rw_bitmask = 0x1378FF1F,
43+ .SEGBITS = 32,
44+ .PABITS = 32,
45+ .insn_flags = CPU_MIPS32R2 | ASE_MIPS16 | ASE_DSP,
46+ .mmu_type = MMU_TYPE_R4000,
47+ },
48+ {
49 .name = "24Kf",
50 .CP0_PRid = 0x00019300,
51 .CP0_Config0 = MIPS_CONFIG0 | (0x1 << CP0C0_AR) |
52--
532.8.1
54
diff --git a/meta/recipes-devtools/qemu/qemu/0003-fix-CVE-2016-7908.patch b/meta/recipes-devtools/qemu/qemu/0003-fix-CVE-2016-7908.patch
deleted file mode 100644
index 05cc3d9d13..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0003-fix-CVE-2016-7908.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1Upstream-Status: Backport
2
3Backport patch to fix CVE-2016-7908 from:
4
5http://git.qemu.org/?p=qemu.git;a=commit;h=070c4b92b8c
6
7CVE: CVE-2016-7908
8
9Signed-off-by: Kai Kang <kai.kang@windriver.com>
10---
11From 070c4b92b8cd5390889716677a0b92444d6e087a Mon Sep 17 00:00:00 2001
12From: Prasad J Pandit <pjp@fedoraproject.org>
13Date: Thu, 22 Sep 2016 16:02:37 +0530
14Subject: [PATCH] net: mcf: limit buffer descriptor count
15
16ColdFire Fast Ethernet Controller uses buffer descriptors to manage
17data flow to/fro receive & transmit queues. While transmitting
18packets, it could continue to read buffer descriptors if a buffer
19descriptor has length of zero and has crafted values in bd.flags.
20Set upper limit to number of buffer descriptors.
21
22Reported-by: Li Qiang <liqiang6-s@360.cn>
23Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
24Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
25Signed-off-by: Jason Wang <jasowang@redhat.com>
26---
27 hw/net/mcf_fec.c | 5 +++--
28 1 file changed, 3 insertions(+), 2 deletions(-)
29
30diff --git a/hw/net/mcf_fec.c b/hw/net/mcf_fec.c
31index 0ee8ad9..d31fea1 100644
32--- a/hw/net/mcf_fec.c
33+++ b/hw/net/mcf_fec.c
34@@ -23,6 +23,7 @@ do { printf("mcf_fec: " fmt , ## __VA_ARGS__); } while (0)
35 #define DPRINTF(fmt, ...) do {} while(0)
36 #endif
37
38+#define FEC_MAX_DESC 1024
39 #define FEC_MAX_FRAME_SIZE 2032
40
41 typedef struct {
42@@ -149,7 +150,7 @@ static void mcf_fec_do_tx(mcf_fec_state *s)
43 uint32_t addr;
44 mcf_fec_bd bd;
45 int frame_size;
46- int len;
47+ int len, descnt = 0;
48 uint8_t frame[FEC_MAX_FRAME_SIZE];
49 uint8_t *ptr;
50
51@@ -157,7 +158,7 @@ static void mcf_fec_do_tx(mcf_fec_state *s)
52 ptr = frame;
53 frame_size = 0;
54 addr = s->tx_descriptor;
55- while (1) {
56+ while (descnt++ < FEC_MAX_DESC) {
57 mcf_fec_read_bd(&bd, addr);
58 DPRINTF("tx_bd %x flags %04x len %d data %08x\n",
59 addr, bd.flags, bd.length, bd.data);
60--
612.9.3
62
diff --git a/meta/recipes-devtools/qemu/qemu/0004-fix-CVE-2016-7909.patch b/meta/recipes-devtools/qemu/qemu/0004-fix-CVE-2016-7909.patch
deleted file mode 100644
index e71bbf6205..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0004-fix-CVE-2016-7909.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1Upstream-Status: Backport [http://git.qemu.org/?p=qemu.git;a=commit;h=34e29ce]
2CVE: CVE-2016-7909
3
4Signed-off-by: Kai Kang <kai.kang@windriver.com>
5---
6From 34e29ce754c02bb6b3bdd244fbb85033460feaff Mon Sep 17 00:00:00 2001
7From: Prasad J Pandit <pjp@fedoraproject.org>
8Date: Fri, 30 Sep 2016 00:27:33 +0530
9Subject: [PATCH] net: pcnet: check rx/tx descriptor ring length
10
11The AMD PC-Net II emulator has set of control and status(CSR)
12registers. Of these, CSR76 and CSR78 hold receive and transmit
13descriptor ring length respectively. This ring length could range
14from 1 to 65535. Setting ring length to zero leads to an infinite
15loop in pcnet_rdra_addr() or pcnet_transmit(). Add check to avoid it.
16
17Reported-by: Li Qiang <liqiang6-s@360.cn>
18Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
19Signed-off-by: Jason Wang <jasowang@redhat.com>
20---
21 hw/net/pcnet.c | 3 +++
22 1 file changed, 3 insertions(+)
23
24diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c
25index 198a01f..3078de8 100644
26--- a/hw/net/pcnet.c
27+++ b/hw/net/pcnet.c
28@@ -1429,8 +1429,11 @@ static void pcnet_csr_writew(PCNetState *s, uint32_t rap, uint32_t new_value)
29 case 47: /* POLLINT */
30 case 72:
31 case 74:
32+ break;
33 case 76: /* RCVRL */
34 case 78: /* XMTRL */
35+ val = (val > 0) ? val : 512;
36+ break;
37 case 112:
38 if (CSR_STOP(s) || CSR_SPND(s))
39 break;
40--
412.10.1
42
diff --git a/meta/recipes-devtools/qemu/qemu/Qemu-Arm-versatilepb-Add-memory-size-checking.patch b/meta/recipes-devtools/qemu/qemu/Qemu-Arm-versatilepb-Add-memory-size-checking.patch
deleted file mode 100644
index 1a6cf5119b..0000000000
--- a/meta/recipes-devtools/qemu/qemu/Qemu-Arm-versatilepb-Add-memory-size-checking.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From 896fa02c24347e6e9259812cfda187b1d6ca6199 Mon Sep 17 00:00:00 2001
2From: Jiang Lu <lu.jiang@windriver.com>
3Date: Wed, 13 Nov 2013 10:38:08 +0800
4Subject: [PATCH] Qemu:Arm:versatilepb: Add memory size checking
5
6The machine can not work with memory over 256M, so add a checking
7at startup. If the memory size exceed 256M, just stop emulation then
8throw out warning about memory limitation.
9
10Upstream-Status: Pending
11
12Signed-off-by: Jiang Lu <lu.jiang@windriver.com>
13
14Updated it on 2014-01-15 for rebasing
15
16Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
17
18Update it when upgrade qemu to 2.2.0
19
20Signed-off-by: Kai Kang <kai.kang@windriver.com>
21Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
22---
23 hw/arm/versatilepb.c | 7 +++++++
24 1 file changed, 7 insertions(+)
25
26diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
27index 6c69f4e..9278d90 100644
28--- a/hw/arm/versatilepb.c
29+++ b/hw/arm/versatilepb.c
30@@ -204,6 +204,13 @@ static void versatile_init(MachineState *machine, int board_id)
31 exit(1);
32 }
33
34+ if (machine->ram_size > (256 << 20)) {
35+ fprintf(stderr,
36+ "qemu: Too much memory for this machine: %d MB, maximum 256 MB\n",
37+ ((unsigned int)ram_size / (1 << 20)));
38+ exit(1);
39+ }
40+
41 cpuobj = object_new(object_class_get_name(cpu_oc));
42
43 /* By default ARM1176 CPUs have EL3 enabled. This board does not
44--
452.1.0
46
diff --git a/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch b/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch
index 171bda7e95..f593cf9ae0 100644
--- a/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch
+++ b/meta/recipes-devtools/qemu/qemu/exclude-some-arm-EABI-obsolete-syscalls.patch
@@ -27,14 +27,14 @@ or kernel header:
27 27
28Signed-off-by: Roy.Li <rongqing.li@windriver.com> 28Signed-off-by: Roy.Li <rongqing.li@windriver.com>
29--- 29---
30 qemu-seccomp.c | 14 ++++++++------ 30 qemu-seccomp.c | 13 ++++++++-----
31 1 file changed, 8 insertions(+), 6 deletions(-) 31 1 file changed, 8 insertions(+), 5 deletions(-)
32 32
33diff --git a/qemu-seccomp.c b/qemu-seccomp.c 33diff --git a/qemu-seccomp.c b/qemu-seccomp.c
34index caa926e..5a78502 100644 34index df75d9c..0e577f8 100644
35--- a/qemu-seccomp.c 35--- a/qemu-seccomp.c
36+++ b/qemu-seccomp.c 36+++ b/qemu-seccomp.c
37@@ -25,15 +25,21 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { 37@@ -35,15 +35,21 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
38 { SCMP_SYS(timer_settime), 255 }, 38 { SCMP_SYS(timer_settime), 255 },
39 { SCMP_SYS(timer_gettime), 254 }, 39 { SCMP_SYS(timer_gettime), 254 },
40 { SCMP_SYS(futex), 253 }, 40 { SCMP_SYS(futex), 253 },
@@ -58,7 +58,7 @@ index caa926e..5a78502 100644
58 { SCMP_SYS(mprotect), 246 }, 58 { SCMP_SYS(mprotect), 246 },
59 { SCMP_SYS(execve), 245 }, 59 { SCMP_SYS(execve), 245 },
60 { SCMP_SYS(open), 245 }, 60 { SCMP_SYS(open), 245 },
61@@ -48,13 +54,11 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { 61@@ -58,7 +64,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
62 { SCMP_SYS(bind), 245 }, 62 { SCMP_SYS(bind), 245 },
63 { SCMP_SYS(listen), 245 }, 63 { SCMP_SYS(listen), 245 },
64 { SCMP_SYS(semget), 245 }, 64 { SCMP_SYS(semget), 245 },
@@ -66,13 +66,7 @@ index caa926e..5a78502 100644
66 { SCMP_SYS(gettimeofday), 245 }, 66 { SCMP_SYS(gettimeofday), 245 },
67 { SCMP_SYS(readlink), 245 }, 67 { SCMP_SYS(readlink), 245 },
68 { SCMP_SYS(access), 245 }, 68 { SCMP_SYS(access), 245 },
69 { SCMP_SYS(prctl), 245 }, 69@@ -104,7 +109,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
70 { SCMP_SYS(signalfd), 245 },
71- { SCMP_SYS(getrlimit), 245 },
72 { SCMP_SYS(set_tid_address), 245 },
73 { SCMP_SYS(statfs), 245 },
74 { SCMP_SYS(unlink), 245 },
75@@ -93,7 +97,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
76 { SCMP_SYS(times), 245 }, 70 { SCMP_SYS(times), 245 },
77 { SCMP_SYS(exit), 245 }, 71 { SCMP_SYS(exit), 245 },
78 { SCMP_SYS(clock_gettime), 245 }, 72 { SCMP_SYS(clock_gettime), 245 },
@@ -80,7 +74,7 @@ index caa926e..5a78502 100644
80 { SCMP_SYS(restart_syscall), 245 }, 74 { SCMP_SYS(restart_syscall), 245 },
81 { SCMP_SYS(pwrite64), 245 }, 75 { SCMP_SYS(pwrite64), 245 },
82 { SCMP_SYS(nanosleep), 245 }, 76 { SCMP_SYS(nanosleep), 245 },
83@@ -182,7 +185,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { 77@@ -194,7 +198,6 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
84 { SCMP_SYS(lstat64), 241 }, 78 { SCMP_SYS(lstat64), 241 },
85 { SCMP_SYS(sendfile64), 241 }, 79 { SCMP_SYS(sendfile64), 241 },
86 { SCMP_SYS(ugetrlimit), 241 }, 80 { SCMP_SYS(ugetrlimit), 241 },
@@ -89,5 +83,5 @@ index caa926e..5a78502 100644
89 { SCMP_SYS(rt_sigqueueinfo), 241 }, 83 { SCMP_SYS(rt_sigqueueinfo), 241 },
90 { SCMP_SYS(rt_tgsigqueueinfo), 241 }, 84 { SCMP_SYS(rt_tgsigqueueinfo), 241 },
91-- 85--
921.9.1 862.1.4
93 87
diff --git a/meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch b/meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch
new file mode 100644
index 0000000000..ba21e71b0f
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/target-ppc-fix-user-mode.patch
@@ -0,0 +1,48 @@
1[Qemu-ppc] [PATCH 1/1] target-ppc, tcg: fix usermode segfault with pthread
2
3From: Sam Bobroff
4Subject: [Qemu-ppc] [PATCH 1/1] target-ppc, tcg: fix usermode segfault with pthread_create()
5Date: Mon, 30 Jan 2017 16:08:07 +1100
6Programs run under qemu-ppc64 on an x86_64 host currently segfault
7if they use pthread_create() due to the adjustment made to the NIP in
8commit bd6fefe71cec5a0c7d2be4ac96307f25db56abf9.
9
10This patch changes cpu_loop() to set the NIP back to the
11pre-incremented value before calling do_syscall(), which causes the
12correct address to be used for the new thread and corrects the fault.
13
14Signed-off-by: Sam Bobroff <address@hidden>
15
16Upstream-Status: Backport
17
18---
19
20linux-user/main.c | 4 +++-
211 file changed, 3 insertions(+), 1 deletion(-)
22
23diff --git a/linux-user/main.c b/linux-user/main.c
24index 30049581ef..b5dee01541 100644
25--- a/linux-user/main.c
26+++ b/linux-user/main.c
27@@ -1712,18 +1712,20 @@ void cpu_loop(CPUPPCState *env)
28 * in syscalls.
29 */
30 env->crf[0] &= ~0x1;
31+ env->nip += 4;
32 ret = do_syscall(env, env->gpr[0], env->gpr[3], env->gpr[4],
33 env->gpr[5], env->gpr[6], env->gpr[7],
34 env->gpr[8], 0, 0);
35 if (ret == -TARGET_ERESTARTSYS) {
36+ env->nip -= 4;
37 break;
38 }
39 if (ret == (target_ulong)(-TARGET_QEMU_ESIGRETURN)) {
40+ env->nip -= 4;
41 /* Returning from a successful sigreturn syscall.
42 Avoid corrupting register state. */
43 break;
44 }
45- env->nip += 4;
46 if (ret > (target_ulong)(-515)) {
47 env->crf[0] |= 0x1;
48 ret = -ret;
diff --git a/meta/recipes-devtools/qemu/qemu_2.7.1.bb b/meta/recipes-devtools/qemu/qemu_2.8.0.bb
index 8180c5f75a..e0527a8fd9 100644
--- a/meta/recipes-devtools/qemu/qemu_2.7.1.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.8.0.bb
@@ -5,18 +5,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
5 5
6SRC_URI += "file://configure-fix-Darwin-target-detection.patch \ 6SRC_URI += "file://configure-fix-Darwin-target-detection.patch \
7 file://qemu-enlarge-env-entry-size.patch \ 7 file://qemu-enlarge-env-entry-size.patch \
8 file://Qemu-Arm-versatilepb-Add-memory-size-checking.patch \
9 file://no-valgrind.patch \ 8 file://no-valgrind.patch \
10 file://pathlimit.patch \ 9 file://pathlimit.patch \
11 file://qemu-2.5.0-cflags.patch \ 10 file://qemu-2.5.0-cflags.patch \
12 file://0003-fix-CVE-2016-7908.patch \ 11 file://target-ppc-fix-user-mode.patch \
13 file://0004-fix-CVE-2016-7909.patch \
14" 12"
15 13
16SRC_URI =+ "http://wiki.qemu-project.org/download/${BP}.tar.bz2" 14SRC_URI =+ "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
17 15
18SRC_URI[md5sum] = "a315bc51ed443a08d2cf1416d76b9ab4" 16SRC_URI[md5sum] = "17940dce063b6ce450a12e719a6c9c43"
19SRC_URI[sha256sum] = "68636788eb69bcb0b44ba220b32b50495d6bd5712a934c282217831c4822958f" 17SRC_URI[sha256sum] = "dafd5d7f649907b6b617b822692f4c82e60cf29bc0fc58bc2036219b591e5e62"
20 18
21COMPATIBLE_HOST_mipsarchn32 = "null" 19COMPATIBLE_HOST_mipsarchn32 = "null"
22COMPATIBLE_HOST_mipsarchn64 = "null" 20COMPATIBLE_HOST_mipsarchn64 = "null"