SPU/SYSINFO: Disable TSX by default for TSX-FA cpus #11105
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since stability and performance aren't ideal on cpus with TSX-FA, let's just disable it by default. It can be force enabled via the forced option, just like with haswell and TSX.
Additionally, support detecting the new RTM_ALWAYS_ABORT bit in cpuid. This is a new bit that only appears in new microcodes with disabled TSX. (see this commit for details torvalds/linux@1348924)
When TSX is disabled via this new microcode it can be re-enabled by writing 0x4 to the msr 0x0000010F. When enabled in this way, the performance of TSX seems to be the same as the pre TSX-FA microcodes. Intel has also removed the need for TSX to clobber the perfomance counters when TSX is in use (which perhaps indicates that intel removed their "workaround" for TSX bugs in this microcode?)
Intel says
This bit is intended to be used on developer systems. If this bit is set, transactional atomicity correctness is not certain.
So, expect bugs, and don't use it unless you're a "Developer".