pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators/qemu Avoid an assertion when sparc %pc/%npc ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6f685c2d9e6f
branches:  trunk
changeset: 441392:6f685c2d9e6f
user:      martin <martin%pkgsrc.org@localhost>
date:      Mon Nov 02 17:17:15 2020 +0000

description:
Avoid an assertion when sparc %pc/%npc are set to invalid values (like
it happens in the NetBSD-current ATF test runs). Bump pkg revision.

diffstat:

 emulators/qemu/Makefile                               |   4 +-
 emulators/qemu/distinfo                               |   3 +-
 emulators/qemu/patches/patch-target_sparc_translate.c |  24 +++++++++++++++++++
 3 files changed, 28 insertions(+), 3 deletions(-)

diffs (55 lines):

diff -r 04e55df3ecde -r 6f685c2d9e6f emulators/qemu/Makefile
--- a/emulators/qemu/Makefile   Mon Nov 02 15:13:57 2020 +0000
+++ b/emulators/qemu/Makefile   Mon Nov 02 17:17:15 2020 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.255 2020/10/25 08:21:35 gson Exp $
+# $NetBSD: Makefile,v 1.256 2020/11/02 17:17:15 martin Exp $
 
 DISTNAME=      qemu-5.1.0
-PKGREVISION=   8
+PKGREVISION=   9
 CATEGORIES=    emulators
 MASTER_SITES=  https://download.qemu.org/
 EXTRACT_SUFX=  .tar.xz
diff -r 04e55df3ecde -r 6f685c2d9e6f emulators/qemu/distinfo
--- a/emulators/qemu/distinfo   Mon Nov 02 15:13:57 2020 +0000
+++ b/emulators/qemu/distinfo   Mon Nov 02 17:17:15 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.166 2020/10/25 08:21:35 gson Exp $
+$NetBSD: distinfo,v 1.167 2020/11/02 17:17:15 martin Exp $
 
 SHA1 (palcode-clipper) = e25ae10a10e0801e47b62b9ee2d10c8ccb4ee940
 RMD160 (palcode-clipper) = a637f1cc38dabfdff36e3f02b6dd02d7c63cb8db
@@ -51,3 +51,4 @@
 SHA1 (patch-target_i386_helper.c) = 54363fe53688ea4030665b3bbb3ee7aba7ba5348
 SHA1 (patch-target_i386_kvm-stub.c) = 4cd2b7a8d8d8a317829f982b5acff7fdf2479d9f
 SHA1 (patch-target_i386_nvmm-all.c) = 091c56c88c2366abef907ca99e5bfa9933a2b6ab
+SHA1 (patch-target_sparc_translate.c) = 7ec2add2fd808facb48b9a66ccc345599251bf76
diff -r 04e55df3ecde -r 6f685c2d9e6f emulators/qemu/patches/patch-target_sparc_translate.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-target_sparc_translate.c     Mon Nov 02 17:17:15 2020 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-target_sparc_translate.c,v 1.1 2020/11/02 17:17:15 martin Exp $
+
+Patch from upstream (not integrated there yet) to work around %pc/%npc
+being set to invalid values via ptrace, triggered by the NetBSD ptrace
+ATF tests. Real hardware seems to hardcode the lower bits to zero too.
+
+--- target/sparc/translate.c.orig      2020-08-11 21:17:15.000000000 +0200
++++ target/sparc/translate.c   2020-11-02 18:04:50.507211101 +0100
+@@ -4525,6 +4525,7 @@
+ 
+                                     r_tsptr = tcg_temp_new_ptr();
+                                     gen_load_trap_state_at_tl(r_tsptr, cpu_env);
++                                    tcg_gen_andi_tl(cpu_tmp0, cpu_tmp0, ~3);
+                                     tcg_gen_st_tl(cpu_tmp0, r_tsptr,
+                                                   offsetof(trap_state, tpc));
+                                     tcg_temp_free_ptr(r_tsptr);
+@@ -4536,6 +4537,7 @@
+ 
+                                     r_tsptr = tcg_temp_new_ptr();
+                                     gen_load_trap_state_at_tl(r_tsptr, cpu_env);
++                                    tcg_gen_andi_tl(cpu_tmp0, cpu_tmp0, ~3);
+                                     tcg_gen_st_tl(cpu_tmp0, r_tsptr,
+                                                   offsetof(trap_state, tnpc));
+                                     tcg_temp_free_ptr(r_tsptr);



Home | Main Index | Thread Index | Old Index