changeset 58273:fcbf0839a86c

8240370: Provide Intel JCC Erratum opt-out Reviewed-by: redestad, vlivanov, thartmann
author eosterlund
date Thu, 05 Mar 2020 11:12:51 +0000
parents c4dea8e07b84
children 920a6239d61a
files src/hotspot/cpu/x86/globals_x86.hpp src/hotspot/cpu/x86/vm_version_x86.cpp
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/cpu/x86/globals_x86.hpp	Thu Mar 05 19:46:07 2020 +0900
+++ b/src/hotspot/cpu/x86/globals_x86.hpp	Thu Mar 05 11:12:51 2020 +0000
@@ -210,5 +210,10 @@
              "Minimum array size in bytes to use AVX512 intrinsics"         \
              "for copy, inflate and fill. When this value is set as zero"   \
              "compare operations can also use AVX512 intrinsics.")          \
-          range(0, max_jint)
+             range(0, max_jint)                                             \
+                                                                            \
+  diagnostic(bool, IntelJccErratumMitigation, true,                         \
+             "Turn off JVM mitigations related to Intel micro code "        \
+             "mitigations for the Intel JCC erratum")
+
 #endif // CPU_X86_GLOBALS_X86_HPP
--- a/src/hotspot/cpu/x86/vm_version_x86.cpp	Thu Mar 05 19:46:07 2020 +0900
+++ b/src/hotspot/cpu/x86/vm_version_x86.cpp	Thu Mar 05 11:12:51 2020 +0000
@@ -721,7 +721,11 @@
     }
   }
 
-  _has_intel_jcc_erratum = compute_has_intel_jcc_erratum();
+  if (FLAG_IS_DEFAULT(IntelJccErratumMitigation)) {
+    _has_intel_jcc_erratum = compute_has_intel_jcc_erratum();
+  } else {
+    _has_intel_jcc_erratum = IntelJccErratumMitigation;
+  }
 
   char buf[256];
   jio_snprintf(buf, sizeof(buf), "(%u cores per cpu, %u threads per core) family %d model %d stepping %d%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",