]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Bug 403552 s390x: Fix vector facility bit number
authorAndreas Arnez <arnez@linux.ibm.com>
Mon, 21 Jan 2019 13:10:00 +0000 (14:10 +0100)
committerAndreas Arnez <arnez@linux.ibm.com>
Thu, 24 Jan 2019 10:11:51 +0000 (11:11 +0100)
The wrong bit number was used when checking for the vector facility.  This
can result in a fatal emulation error: "Encountered an instruction that
requires the vector facility.  That facility is not available on this
host."

In many cases the wrong facility bit was usually set as well, hence
nothing bad happened.  But when running Valgrind within a Qemu/KVM guest,
the wrong bit was not (always?) set and the emulation error occurred.

This fix simply corrects the vector facility bit number, changing it from
128 to 129.

NEWS
VEX/pub/libvex_s390x_common.h

diff --git a/NEWS b/NEWS
index 6ff9464238f1cd3c99d3ace78442366b90757726..fcd5ad9494457f928a769e2f7fa347b228f56cbd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -85,6 +85,7 @@ where XXXXXX is the bug number as listed below.
 402481  vbit-test fails on x86 for Iop_CmpEQ64 iselInt64Expr Sar64
 402515  Implement new option --show-error-list=no|yes / -s
 402519  POWER 3.0 addex instruction incorrectly implemented
+403552  s390x: wrong facility bit checked for vector facility
 
 n-i-bz  add syswrap for PTRACE_GET|SET_THREAD_AREA on amd64.
 
index a8a66b96b9c9985a40e02d9b6b67d0ad3bf0db0e..8723ee21d9f040fcdf286f7e71d35583de5731f3 100644 (file)
 #define S390_FAC_MSA5    57  // message-security-assist 5
 #define S390_FAC_TREXE   73  // transactional execution
 #define S390_FAC_MSA4    77  // message-security-assist 4
-#define S390_FAC_VX      128 // vector facility
+#define S390_FAC_VX      129 // vector facility
 
 
 /*--------------------------------------------------------------*/