]> git.ipfire.org Git - thirdparty/glibc.git/commit
x86: Check RTM_ALWAYS_ABORT for RTM [BZ #28033]
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 30 Jun 2021 17:47:06 +0000 (10:47 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 1 Feb 2022 14:04:09 +0000 (06:04 -0800)
commit0a5f5e2dc1223c1defd6421c0cceb12883d5ad07
treef39e343c480934affc2846124e9e59c3276324d6
parent5cb6edb6cd193d4b0462c718f4b6071f8b84ff90
x86: Check RTM_ALWAYS_ABORT for RTM [BZ #28033]

From

https://www.intel.com/content/www/us/en/support/articles/000059422/processors.html

* Intel TSX will be disabled by default.
* The processor will force abort all Restricted Transactional Memory (RTM)
  transactions by default.
* A new CPUID bit CPUID.07H.0H.EDX[11](RTM_ALWAYS_ABORT) will be enumerated,
  which is set to indicate to updated software that the loaded microcode is
  forcing RTM abort.
* On processors that enumerate support for RTM, the CPUID enumeration bits
  for Intel TSX (CPUID.07H.0H.EBX[11] and CPUID.07H.0H.EBX[4]) continue to
  be set by default after microcode update.
* Workloads that were benefited from Intel TSX might experience a change
  in performance.
* System software may use a new bit in Model-Specific Register (MSR) 0x10F
  TSX_FORCE_ABORT[TSX_CPUID_CLEAR] functionality to clear the Hardware Lock
  Elision (HLE) and RTM bits to indicate to software that Intel TSX is
  disabled.

1. Add RTM_ALWAYS_ABORT to CPUID features.
2. Set RTM usable only if RTM_ALWAYS_ABORT isn't set.  This skips the
string/tst-memchr-rtm etc. testcases on the affected processors, which
always fail after a microcde update.
3. Check RTM feature, instead of usability, against /proc/cpuinfo.

This fixes BZ #28033.

(cherry picked from commit ea8e465a6b8d0f26c72bcbe453a854de3abf68ec)
manual/platform.texi
sysdeps/x86/bits/platform/x86.h
sysdeps/x86/cpu-features.c
sysdeps/x86/include/cpu-features.h
sysdeps/x86/tst-cpu-features-supports.c
sysdeps/x86/tst-get-cpu-features.c