stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
To: Borislav Petkov <bp@alien8.de>, Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Andi Kleen <ak@linux.intel.com>, Tony Luck <tony.luck@intel.com>,
	linux-kernel@vger.kernel.org,
	antonio.gomez.iglesias@linux.intel.com,
	neelima.krishnan@intel.com, stable@vger.kernel.org,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	Josh Poimboeuf <jpoimboe@redhat.com>
Subject: [PATCH v2 0/2] TSX update
Date: Thu, 10 Mar 2022 13:59:47 -0800	[thread overview]
Message-ID: <cover.1646943780.git.pawan.kumar.gupta@linux.intel.com> (raw)

v2:
- Added patch to disable TSX development mode (Andrew, Boris)
- Rebased to v5.17-rc7

v1: https://lore.kernel.org/lkml/5bd785a1d6ea0b572250add0c6617b4504bc24d1.1644440311.git.pawan.kumar.gupta@linux.intel.com/

Hi,

After a recent microcode update some Intel processors will always abort
Transactional Synchronization Extensions (TSX) transactions [*]. On
these processors a new CPUID bit,
CPUID.07H.0H.EDX[11](RTM_ALWAYS_ABORT), will be enumerated to indicate
that the loaded microcode is forcing Restricted Transactional Memory
(RTM) abort. If the processor enumerated support for RTM previously, the
CPUID enumeration bits for TSX (CPUID.RTM and CPUID.HLE) continue to be
set by default after the microcode update.

First patch in this series clears CPUID.RTM and CPUID.HLE so that
userspace doesn't enumerate TSX feature. 

Microcode also added support to re-enable TSX for development purpose,
doing so is not recommended for production deployments, because MD_CLEAR
flows for the mitigation of TSX Asynchronous Abort (TAA) may not be
effective on these processors when TSX is enabled with updated
microcode.

Second patch unconditionally disables this TSX development mode, in case
it was enabled by the software running before kernel boot.

Thanks,
Pawan

[*] Intel Transactional Synchronization Extension (Intel TSX) Disable Update for Selected Processors
    https://cdrdv2.intel.com/v1/dl/getContent/643557

Pawan Gupta (2):
  x86/tsx: Use MSR_TSX_CTRL to clear CPUID bits
  x86/tsx: Disable TSX development mode at boot

 arch/x86/include/asm/msr-index.h       |  4 +-
 arch/x86/kernel/cpu/cpu.h              |  1 +
 arch/x86/kernel/cpu/intel.c            |  5 ++
 arch/x86/kernel/cpu/tsx.c              | 88 ++++++++++++++++++++++++--
 tools/arch/x86/include/asm/msr-index.h |  4 +-
 5 files changed, 91 insertions(+), 11 deletions(-)


base-commit: ffb217a13a2eaf6d5bd974fc83036a53ca69f1e2
-- 
2.25.1


             reply	other threads:[~2022-03-10 21:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-10 21:59 Pawan Gupta [this message]
2022-03-10 22:00 ` [PATCH v2 1/2] x86/tsx: Use MSR_TSX_CTRL to clear CPUID bits Pawan Gupta
2022-03-10 22:02 ` [PATCH v2 2/2] x86/tsx: Disable TSX development mode at boot Pawan Gupta
2022-03-29 16:24   ` Borislav Petkov
2022-03-29 22:47     ` Pawan Gupta
2022-03-30  5:27     ` Pawan Gupta
2022-04-06 19:13       ` Krishnan, Neelima
2022-03-22 23:32 ` [PATCH v2 0/2] TSX update Pawan Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1646943780.git.pawan.kumar.gupta@linux.intel.com \
    --to=pawan.kumar.gupta@linux.intel.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=ak@linux.intel.com \
    --cc=antonio.gomez.iglesias@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=neelima.krishnan@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).