--- old/src/hotspot/cpu/x86/vm_version_x86.cpp	2020-07-18 13:37:20.677533582 -0700
+++ new/src/hotspot/cpu/x86/vm_version_x86.cpp	2020-07-18 13:37:20.474533573 -0700
@@ -733,11 +733,11 @@
 
   char buf[512];
   int res = jio_snprintf(buf, sizeof(buf),
-              "(%u cores per cpu, %u threads per core) family %d model %d stepping %d"
+              "(%u cores per cpu, %u threads per core) family %d model %d stepping %d microcode 0x%x"
               "%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%s%s%s%s%s%s" "%s%s%s%s%s%s",
 
                cores_per_cpu(), threads_per_core(),
-               cpu_family(), _model, _stepping,
+               cpu_family(), _model, _stepping, os::cpu_microcode_revision(),
 
                (supports_cmov() ? ", cmov" : ""),
                (supports_cmpxchg8() ? ", cx8" : ""),
--- old/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp	2020-07-18 13:37:21.158533605 -0700
+++ new/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp	2020-07-18 13:37:20.958533596 -0700
@@ -801,6 +801,18 @@
 #endif // AMD64
 }
 
+juint os::cpu_microcode_revision() {
+  juint result = 0;
+  char data[8];
+  size_t sz = sizeof(data);
+  int ret = sysctlbyname("machdep.cpu.microcode_version", data, &sz, NULL, 0);
+  if (ret == 0) {
+    if (sz == 4) result = *((juint*)data);
+    if (sz == 8) result = *((juint*)data + 1); // upper 32-bits
+  }
+  return result;
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // thread stack
 
--- old/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.hpp	2020-07-18 13:37:21.606533627 -0700
+++ new/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.hpp	2020-07-18 13:37:21.408533617 -0700
@@ -27,6 +27,7 @@
 
   static void setup_fpu();
   static bool supports_sse();
+  static juint cpu_microcode_revision();
 
   static jlong rdtsc();
 
--- old/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp	2020-07-18 13:37:22.069533649 -0700
+++ new/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp	2020-07-18 13:37:21.865533639 -0700
@@ -620,6 +620,26 @@
 #endif // AMD64
 }
 
+juint os::cpu_microcode_revision() {
+  juint result = 0;
+  char data[2048] = {0}; // lines should fit in 2K buf
+  size_t len = sizeof(data);
+  FILE *fp = fopen("/proc/cpuinfo", "r");
+  if (fp) {
+    while (!feof(fp)) {
+      if (fgets(data, len, fp)) {
+        if (strstr(data, "microcode") != NULL) {
+          char* rev = strchr(data, ':');
+          if (rev != NULL) sscanf(rev + 1, "%x", &result);
+          break;
+        }
+      }
+    }
+    fclose(fp);
+  }
+  return result;
+}
+
 bool os::is_allocatable(size_t bytes) {
 #ifdef AMD64
   // unused on amd64?
--- old/src/hotspot/os_cpu/linux_x86/os_linux_x86.hpp	2020-07-18 13:37:22.552533673 -0700
+++ new/src/hotspot/os_cpu/linux_x86/os_linux_x86.hpp	2020-07-18 13:37:22.352533663 -0700
@@ -27,6 +27,7 @@
 
   static void setup_fpu();
   static bool supports_sse();
+  static juint cpu_microcode_revision();
 
   static jlong rdtsc();
 
--- old/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp	2020-07-18 13:37:23.024533695 -0700
+++ new/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp	2020-07-18 13:37:22.825533686 -0700
@@ -649,6 +649,23 @@
 #endif // AMD64
 }
 
+juint os::cpu_microcode_revision() {
+  juint result = 0;
+  BYTE data[8] = {0};
+  HKEY key;
+  DWORD status = RegOpenKey(HKEY_LOCAL_MACHINE,
+               "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", &key);
+  if (status == ERROR_SUCCESS) {
+    DWORD size = sizeof(data);
+    status = RegQueryValueEx(key, "Update Revision", NULL, NULL, data, &size);
+    if (status == ERROR_SUCCESS) {
+      if (size == 4) result = *((juint*)data);
+      if (size == 8) result = *((juint*)data + 1); // upper 32-bits
+    }
+    RegCloseKey(key);
+  }
+  return result;
+}
 
 void os::setup_fpu() {
 #ifndef AMD64
--- old/src/hotspot/os_cpu/windows_x86/os_windows_x86.hpp	2020-07-18 13:37:23.474533717 -0700
+++ new/src/hotspot/os_cpu/windows_x86/os_windows_x86.hpp	2020-07-18 13:37:23.275533707 -0700
@@ -59,6 +59,7 @@
 
   static void setup_fpu();
   static bool supports_sse() { return true; }
+  static juint cpu_microcode_revision();
 
   static jlong rdtsc();