From: Ramakrishna Saripalli <rsaripal@amd.com>
To: <linux-kernel@vger.kernel.org>, <x86@kernel.org>,
Jonathan Corbet <corbet@lwn.net>
Cc: <rsaripal@amd.com>
Subject: [PATCH 5/5] x86/speculation: Add PSF mitigation kernel parameters
Date: Tue, 6 Apr 2021 10:50:04 -0500 [thread overview]
Message-ID: <20210406155004.230790-6-rsaripal@amd.com> (raw)
In-Reply-To: <20210406155004.230790-1-rsaripal@amd.com>
From: Ramakrishna Saripalli <rk.saripalli@amd.com>
PSF mitigation introduces new kernel parameters.
The kernel parameters for PSF mitigation are modeled
after spec_store_bypass_disable.
Signed-off-by: Ramakrishna Saripalli<rk.saripalli@amd.com>
---
.../admin-guide/kernel-parameters.txt | 45 +++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 04545725f187..68dfde77a87d 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -2876,6 +2876,7 @@
nospectre_v2 [X86,PPC,S390,ARM64]
spectre_v2_user=off [X86]
spec_store_bypass_disable=off [X86,PPC]
+ psfd=off [X86]
ssbd=force-off [ARM64]
l1tf=off [X86]
mds=off [X86]
@@ -3243,6 +3244,8 @@
nohugeiomap [KNL,X86,PPC,ARM64] Disable kernel huge I/O mappings.
+ nopsfd [HW,X86] Disable mitigation for Predictive Store Forwarding.
+
nosmt [KNL,S390] Disable symmetric multithreading (SMT).
Equivalent to smt=1.
@@ -4002,6 +4005,48 @@
that).
Format: <bool>
+ psfd= [HW,X86]
+ Predictive Store Forwarding Disable control
+
+ Certain AMD processors feature a new technology called Predictive
+ Store Forwarding. This feature is designed to improve the
+ performance of code execution by predicting dependencies
+ between loads and stores.
+
+ Modern processors implement techniques to optimize the
+ execution of a load instruction to an address that was
+ recently written by a store instruction.
+
+ PSF expands on the above by speculating on the relationship
+ between loads and stores without waiting for address
+ calculation to complete. With PSF, CPU learns over time the
+ relationship between loads and stores.
+
+ Incorrect PSF predictions can occur for various reasons.
+ Please see the AMD PSF whitepaper for more information.
+
+ All AMD processors that implement PSF also provide ability
+ to control mitigation of PSF.
+
+ Following options are provided to control PSF mitigation.
+
+ The options are:
+ on - Unconditionally disable Speculative Store Bypass
+ off - Unconditionally enable Speculative Store Bypass
+ auto - Kernel detects whether the CPU is vulnerable.
+ If the CPU is not vulnerable, off is selected.
+ If the CPU is vulnerable, default mitigation is
+ KConfig dependent.
+ prctl - Control Predictive Store Forwarding per thread
+ via prctl. Predictive Store Forwarding is enabled
+ per process by default. The state of the control
+ is inherited on fork.
+ seccomp - Same as prctl above but all seccomp threads will
+ disable PSF unless they opt out.
+
+ Default mitigations:
+ [X86] If CONFIG_SECCOMP=y "seccomp" else "prctl"
+
psi= [KNL] Enable or disable pressure stall information
tracking.
Format: <bool>
--
2.25.1
next prev parent reply other threads:[~2021-04-06 15:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-06 15:49 [PATCH 0/5] Introduce support for PSF mitigation Ramakrishna Saripalli
2021-04-06 15:50 ` [PATCH 1/5] x86/cpufeatures: Define feature bits to support mitigation of PSF Ramakrishna Saripalli
2021-04-09 17:41 ` Borislav Petkov
2021-04-09 18:22 ` Saripalli, RK
2021-04-09 19:39 ` Borislav Petkov
2021-04-09 19:45 ` Saripalli, RK
2021-04-09 20:19 ` Borislav Petkov
2021-04-09 20:29 ` Saripalli, RK
2021-04-06 15:50 ` [PATCH 2/5] x86/speculation: Implement support for PSFD detection and reporting Ramakrishna Saripalli
2021-04-06 15:50 ` [PATCH 3/5] x86/speculation: Introduce SPEC_CTRL_MSR bit for PSFD Ramakrishna Saripalli
2021-04-06 15:50 ` [PATCH 4/5] x86/speculation: Implement PSF mitigation support Ramakrishna Saripalli
2021-04-06 15:50 ` Ramakrishna Saripalli [this message]
2021-04-06 17:26 ` [PATCH 0/5] Introduce support for PSF mitigation Borislav Petkov
2021-04-07 22:39 ` Josh Poimboeuf
2021-04-08 14:56 ` Saripalli, RK
2021-04-09 9:07 ` Borislav Petkov
2021-04-09 16:45 ` Josh Poimboeuf
2021-04-09 16:50 ` Saripalli, RK
-- strict thread matches above, loose matches on Subject: below --
2021-04-07 12:50 [PATCH 5/5] x86/speculation: Add PSF mitigation kernel parameters Ramakrishna Saripalli
2021-04-09 3:43 ` Randy Dunlap
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=20210406155004.230790-6-rsaripal@amd.com \
--to=rsaripal@amd.com \
--cc=corbet@lwn.net \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.