Mark Wielaard 0c3edc
commit 467c7c4c9665c0f8b41a4416722a027ebc05df2b
Mark Wielaard 0c3edc
Author: Andreas Arnez <arnez@linux.ibm.com>
Mark Wielaard 0c3edc
Date:   Mon Jan 21 14:10:00 2019 +0100
Mark Wielaard 0c3edc
Mark Wielaard 0c3edc
    Bug 403552 s390x: Fix vector facility bit number
Mark Wielaard 0c3edc
    
Mark Wielaard 0c3edc
    The wrong bit number was used when checking for the vector facility.  This
Mark Wielaard 0c3edc
    can result in a fatal emulation error: "Encountered an instruction that
Mark Wielaard 0c3edc
    requires the vector facility.  That facility is not available on this
Mark Wielaard 0c3edc
    host."
Mark Wielaard 0c3edc
    
Mark Wielaard 0c3edc
    In many cases the wrong facility bit was usually set as well, hence
Mark Wielaard 0c3edc
    nothing bad happened.  But when running Valgrind within a Qemu/KVM guest,
Mark Wielaard 0c3edc
    the wrong bit was not (always?) set and the emulation error occurred.
Mark Wielaard 0c3edc
    
Mark Wielaard 0c3edc
    This fix simply corrects the vector facility bit number, changing it from
Mark Wielaard 0c3edc
    128 to 129.
Mark Wielaard 0c3edc
Mark Wielaard 0c3edc
 
Mark Wielaard 0c3edc
diff --git a/VEX/pub/libvex_s390x_common.h b/VEX/pub/libvex_s390x_common.h
Mark Wielaard 0c3edc
index a8a66b96b..8723ee21d 100644
Mark Wielaard 0c3edc
--- a/VEX/pub/libvex_s390x_common.h
Mark Wielaard 0c3edc
+++ b/VEX/pub/libvex_s390x_common.h
Mark Wielaard 0c3edc
@@ -103,7 +103,7 @@
Mark Wielaard 0c3edc
 #define S390_FAC_MSA5    57  // message-security-assist 5
Mark Wielaard 0c3edc
 #define S390_FAC_TREXE   73  // transactional execution
Mark Wielaard 0c3edc
 #define S390_FAC_MSA4    77  // message-security-assist 4
Mark Wielaard 0c3edc
-#define S390_FAC_VX      128 // vector facility
Mark Wielaard 0c3edc
+#define S390_FAC_VX      129 // vector facility
Mark Wielaard 0c3edc
 
Mark Wielaard 0c3edc
 
Mark Wielaard 0c3edc
 /*--------------------------------------------------------------*/