• Linus Torvalds's avatar
    Merge branch 'x86-tsx-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 004cc086
    Linus Torvalds authored
    Pull x86 tsx fixes from Thomas Gleixner:
     "This update provides kernel side handling for the TSX erratum of Intel
      Skylake (and later) CPUs.
    
      On these CPUs Intel Transactional Synchronization Extensions (TSX)
      functions can result in unpredictable system behavior under certain
      circumstances.
    
      The issue is mitigated with an microcode update which utilizes
      Performance Monitoring Counter (PMC) 3 when TSX functions are in use.
      This mitigation is enabled unconditionally by the updated microcode.
    
      As a consequence the usage of TSX functions can cause corrupted
      performance monitoring results for events which utilize PMC3. The
      corruption is silent on kernels which have no update for this issue.
    
      This update makes the kernel aware of the PMC3 utilization by the
      microcode:
    
      The microcode offers a possibility to enforce TSX abort which prevents
      the malfunction and frees up PMC3. The enforced TSX abort requires the
      TSX using application to have a software fallback path implemented;
      abort handlers which solely retry the transaction will fail over and
      over.
    
      The enforced TSX abort request is issued by the kernel when:
    
       - enforced TSX abort is enabled (PMU attribute)
    
       - A performance monitoring request needs PMC3
    
      When PMC3 is not longer used by the kernel the TSX force abort request
      is cleared.
    
      The enforced TSX abort mechanism is enabled by default and can be
      controlled by the administrator via the new PMU attribute
      'allow_tsx_force_abort'. This attribute is only visible when updated
      microcode is detected on affected systems. Writing '0' disables the
      enforced TSX abort mechanism, '1' enables it.
    
      As a result of disabling the enforced TSX abort mechanism, PMC3 is
      permanentely unavailable for performance monitoring which can cause
      performance monitoring requests to fail or switch to multiplexing
      mode"
    
    * branch 'x86-tsx-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      perf/x86/intel: Implement support for TSX Force Abort
      x86: Add TSX Force Abort CPUID/MSR
      perf/x86/intel: Generalize dynamic constraint creation
      perf/x86/intel: Make cpuc allocations consistent
    004cc086
perf_event.h 27.8 KB