From: "Saripalli, RK" <rsaripal@amd.com>
To: Randy Dunlap <rdunlap@infradead.org>,
linux-kernel@vger.kernel.org, x86@kernel.org, tglx@linutronix.de,
mingo@redhat.com, bp@alien8.de, hpa@zytor.com,
Jonathan Corbet <corbet@lwn.net>
Cc: bsd@redhat.com
Subject: Re: [v6 1/1] x86/bugs: Implement mitigation for Predictive Store Forwarding
Date: Tue, 18 May 2021 07:27:46 -0500 [thread overview]
Message-ID: <5fee3f12-27f3-3984-ce33-60734190ff0c@amd.com> (raw)
In-Reply-To: <20c6fa3d-949d-156a-6d74-89829e3bffdf@infradead.org>
On 5/17/2021 9:55 PM, Randy Dunlap wrote:
> Hi again,
>
> On 5/17/21 3:00 PM, Ramakrishna Saripalli wrote:
>> From: Ramakrishna Saripalli <rk.saripalli@amd.com>
>>
>> Certain AMD processors feature a new technology called Predictive Store
>> Forwarding (PSF).
>>
>> PSF is a micro-architectural optimization designed to improve the
>> performance of code execution by predicting dependencies between
>> loads and stores.
>>
>> Incorrect PSF predictions can occur due to two reasons.
>>
> ...
>
>>
>> Kernel parameter predictive_store_fwd_disable has the following values
>>
>> - on. Disable PSF on all CPUs.
>>
>> - off. Enable PSF on all CPUs.
>> This is also the default setting.
>>
>> Signed-off-by: Ramakrishna Saripalli<rk.saripalli@amd.com>
>> ---
>> .../admin-guide/kernel-parameters.txt | 5 +
>> arch/x86/include/asm/cpufeatures.h | 1 +
>> arch/x86/include/asm/msr-index.h | 2 +
>> arch/x86/include/asm/nospec-branch.h | 6 ++
>> arch/x86/kernel/cpu/bugs.c | 94 +++++++++++++++++++
>> 5 files changed, 108 insertions(+)
>>
>> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
>> index 04545725f187..a5f694dccb24 100644
>> --- a/Documentation/admin-guide/kernel-parameters.txt
>> +++ b/Documentation/admin-guide/kernel-parameters.txt
>> @@ -3940,6 +3940,11 @@
>> Format: {"off"}
>> Disable Hardware Transactional Memory
>>
>> + predictive_store_fwd_disable= [X86] This option controls PSF.
>> + off - Turns on PSF.
>> + on - Turns off PSF.
>> + default : off.
>
>
> and as I did earlier, I still object to "off" meaning PSF is on
> and "on" meaning that PSF is off.
>
> It's not at all user friendly.
>
> If it's done this way because that's how the h/w bit is defined/used,
> that's not a good excuse IMHO.
>
> Hm, it sorta seems to be a common "theme" when dealing with mitigations.
> And too late to fix that.
Based on previous feedback from Thomas Gleixner, I reworded this as a mitigation instead of as a "feature".
In that vein, all the mitigation code moved into bugs.c like other mitigations, similar to
spec_control_bypass_disable with an ON/OFF but no prctl/seccomp/auto.
>
> I look forward to h/w that doesn't need mitigations. ;)
>
next prev parent reply other threads:[~2021-05-18 12:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-17 22:00 [v6 0/1] Introduce support for PSF control Ramakrishna Saripalli
2021-05-17 22:00 ` [v6 1/1] x86/bugs: Implement mitigation for Predictive Store Forwarding Ramakrishna Saripalli
2021-05-18 2:55 ` Randy Dunlap
2021-05-18 12:27 ` Saripalli, RK [this message]
2021-05-18 20:35 ` Pawan Gupta
2021-05-19 5:38 ` Pawan Gupta
2021-05-19 13:19 ` Saripalli, RK
2021-05-19 5:50 ` Pawan Gupta
2021-09-01 20:20 ` [v6 1/1] x86/bugs: Implement mitigation for Predictive Store Babu Moger
2021-09-01 20:30 ` Babu Moger
2021-09-01 20:35 ` Babu Moger
2021-09-02 17:35 ` Pawan Gupta
2021-08-12 23:44 ` [v6 1/1] x86/bugs: Implement mitigation for Predictive Store Forwarding Josh Poimboeuf
2021-09-02 18:16 ` [v6 1/1] x86/bugs: Implement mitigation for Predictive Store Babu Moger
2021-09-03 0:07 ` Josh Poimboeuf
[not found] ` <dca004cf-bacc-1a1f-56d6-c06e8bec167a@amd.com>
2021-09-04 17:23 ` Josh Poimboeuf
2021-09-07 23:15 ` Babu Moger
2021-09-08 18:20 ` Josh Poimboeuf
2021-09-10 16:08 ` Babu Moger
2021-09-09 16:20 ` Bandan Das
2021-06-17 20:47 ` [v6 0/1] Introduce support for PSF control Saripalli, RK
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=5fee3f12-27f3-3984-ce33-60734190ff0c@amd.com \
--to=rsaripal@amd.com \
--cc=bp@alien8.de \
--cc=bsd@redhat.com \
--cc=corbet@lwn.net \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rdunlap@infradead.org \
--cc=tglx@linutronix.de \
--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).