3.15.0-20 - - Add valgrind-3.15.0-z15.patch

This commit is contained in:
Mark Wielaard 2020-03-04 15:00:48 +01:00
parent fbde213007
commit 848b6a726b
2 changed files with 134 additions and 1 deletions

126
valgrind-3.15.0-z15.patch Normal file
View File

@ -0,0 +1,126 @@
commit 3a2711c659ac839934f13e0529e14d6c15325383
Author: Andreas Arnez <arnez@linux.ibm.com>
Date: Thu Feb 27 15:52:53 2020 +0100
s390x: Add CPU model for z15
Make the z15 CPU models known to Valgrind. Add test case output for z15
to the "ecag" test. Also ensure that the facility bits for CPU facilities
unsupported by Valgrind are unset, particularly for the new
deflate-conversion facility.
diff --git a/VEX/priv/guest_s390_helpers.c b/VEX/priv/guest_s390_helpers.c
index 525e7000c..a470d9f8d 100644
--- a/VEX/priv/guest_s390_helpers.c
+++ b/VEX/priv/guest_s390_helpers.c
@@ -377,6 +377,9 @@ s390x_dirtyhelper_STFLE(VexGuestS390XState *guest_state, ULong *addr)
s390_set_facility_bit(addr, S390_FAC_CTREXE, 0);
s390_set_facility_bit(addr, S390_FAC_TREXE, 0);
s390_set_facility_bit(addr, S390_FAC_MSA4, 0);
+ s390_set_facility_bit(addr, S390_FAC_VXE, 0);
+ s390_set_facility_bit(addr, S390_FAC_VXE2, 0);
+ s390_set_facility_bit(addr, S390_FAC_DFLT, 0);
return cc;
}
diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h
index 359d10809..6da26dcb5 100644
--- a/VEX/pub/libvex.h
+++ b/VEX/pub/libvex.h
@@ -147,7 +147,8 @@ typedef
#define VEX_S390X_MODEL_Z13S 13
#define VEX_S390X_MODEL_Z14 14
#define VEX_S390X_MODEL_Z14_ZR1 15
-#define VEX_S390X_MODEL_UNKNOWN 16 /* always last in list */
+#define VEX_S390X_MODEL_Z15 16
+#define VEX_S390X_MODEL_UNKNOWN 17 /* always last in list */
#define VEX_S390X_MODEL_MASK 0x3F
#define VEX_HWCAPS_S390X_LDISP (1<<6) /* Long-displacement facility */
diff --git a/VEX/pub/libvex_s390x_common.h b/VEX/pub/libvex_s390x_common.h
index d945a4472..289421677 100644
--- a/VEX/pub/libvex_s390x_common.h
+++ b/VEX/pub/libvex_s390x_common.h
@@ -103,6 +103,9 @@
#define S390_FAC_TREXE 73 // transactional execution
#define S390_FAC_MSA4 77 // message-security-assist 4
#define S390_FAC_VX 129 // vector facility
+#define S390_FAC_VXE 135 // vector enhancements facility 1
+#define S390_FAC_VXE2 148 // vector enhancements facility 2
+#define S390_FAC_DFLT 151 // deflate-conversion facility
/*--------------------------------------------------------------*/
diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c
index 672a02124..0fd1d21c7 100644
--- a/coregrind/m_machine.c
+++ b/coregrind/m_machine.c
@@ -581,6 +581,8 @@ static UInt VG_(get_machine_model)(void)
{ "2965", VEX_S390X_MODEL_Z13S },
{ "3906", VEX_S390X_MODEL_Z14 },
{ "3907", VEX_S390X_MODEL_Z14_ZR1 },
+ { "8561", VEX_S390X_MODEL_Z15 },
+ { "8562", VEX_S390X_MODEL_Z15 },
};
Int model, n, fh;
diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am
index c5b07f7a2..a0fb92ef5 100644
--- a/none/tests/s390x/Makefile.am
+++ b/none/tests/s390x/Makefile.am
@@ -39,7 +39,7 @@ EXTRA_DIST = \
$(addsuffix .stdout.exp,$(INSN_TESTS)) \
$(addsuffix .vgtest,$(INSN_TESTS)) \
ecag.stdout.exp-z10ec ecag.stdout.exp-z196 ecag.stdout.exp-zec12 \
- ecag.stdout.exp-z13 ecag.stdout.exp-z14 \
+ ecag.stdout.exp-z13 ecag.stdout.exp-z14 ecag.stdout.exp-z15 \
op00.stderr.exp1 op00.stderr.exp2 op00.vgtest \
fixbr.vgtest fixbr.stderr.exp fixbr.stdout.exp \
fpext.vgtest fpext.stderr.exp fpext.stdout.exp \
diff --git a/none/tests/s390x/ecag.stdout.exp-z15 b/none/tests/s390x/ecag.stdout.exp-z15
new file mode 100644
index 000000000..b98d81b78
--- /dev/null
+++ b/none/tests/s390x/ecag.stdout.exp-z15
@@ -0,0 +1,28 @@
+L1 topology: separate data and instruction; private
+L1 cache line size data: 256
+L1 cache line size insn: 256
+L1 total cachesize data: 131072
+L1 total cachesize insn: 131072
+L1 set. assoc. data: 8
+L1 set. assoc. insn: 8
+L2 topology: separate data and instruction; private
+L2 cache line size data: 256
+L2 cache line size insn: 256
+L2 total cachesize data: 4194304
+L2 total cachesize insn: 4194304
+L2 set. assoc. data: 8
+L2 set. assoc. insn: 8
+L3 topology: unified data and instruction; shared
+L3 cache line size data: 256
+L3 cache line size insn: 256
+L3 total cachesize data: 268435456
+L3 total cachesize insn: 268435456
+L3 set. assoc. data: 32
+L3 set. assoc. insn: 32
+L4 topology: unified data and instruction; shared
+L4 cache line size data: 256
+L4 cache line size insn: 256
+L4 total cachesize data: 1006632960
+L4 total cachesize insn: 1006632960
+L4 set. assoc. data: 60
+L4 set. assoc. insn: 60
diff --git a/tests/s390x_features.c b/tests/s390x_features.c
index baa349311..25b98f3a3 100644
--- a/tests/s390x_features.c
+++ b/tests/s390x_features.c
@@ -116,6 +116,8 @@ model_info models[] = {
{ "2965", "z13s" },
{ "3906", "z14" },
{ "3907", "z14 ZR1"},
+ { "8561", "z15" },
+ { "8562", "z15" },
};

View File

@ -3,7 +3,7 @@
Summary: Tool for finding memory management bugs in programs
Name: %{?scl_prefix}valgrind
Version: 3.15.0
Release: 19%{?dist}
Release: 20%{?dist}
Epoch: 1
License: GPLv2+
URL: http://www.valgrind.org/
@ -171,6 +171,9 @@ Patch30: valgrind-3.15.0-avx_estimate_insn-test.patch
# Upstream commit fe6805efc1b6db0cfa5f1cd5fb1854775cbfa31a
Patch31: valgrind-3.15.0-gcc-10-x86-amd64-asm-test.patch
# Upstream commit 3a2711c659ac839934f13e0529e14d6c15325383
Patch32: valgrind-3.15.0-z15.patch
BuildRequires: glibc-devel
%if %{build_openmpi}
@ -338,6 +341,7 @@ Valgrind User Manual for details.
%patch29 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
%build
@ -558,6 +562,9 @@ fi
%endif
%changelog
* Wed Mar 4 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-20
- Add valgrind-3.15.0-z15.patch
* Fri Feb 28 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-19
- Add valgrind-3.15.0-time64.patch
- Add valgrind-3.15.0-arm-preadv2-pwritev2.patch