All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Wei Liu" <wei.liu2@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 3/3] x86/amd: Use newer SSBD mechanisms if they exist
Date: Tue, 24 Aug 2021 14:39:28 +0100	[thread overview]
Message-ID: <54ea3563-446d-8742-c99a-8eb2b0824ec2@citrix.com> (raw)
In-Reply-To: <35356c32-46a1-815e-0ecd-bd2b4b77519d@suse.com>

On 19/08/2021 15:59, Jan Beulich wrote:
> On 17.08.2021 16:30, Andrew Cooper wrote:
>> The opencoded legacy Memory Disambiguation logic in init_amd() neglected
>> Fam19h for the Zen3 microarchitecture.
>>
>> In practice, all Zen2 based system (AMD Fam17h Model >= 0x30 and Hygon Fam18h
>> Model >= 0x4) have the architectural MSR_SPEC_CTRL and the SSBD bit within it.
>>
>> Implement the algorithm given in AMD's SSBD whitepaper, and leave a
>> printk_once() behind in the case that no controls can be found.
>>
>> This now means that a user choosing `spec-ctrl=no-ssb` will actually turn off
>> Memory Disambiguation on Fam19h/Zen3 systems.
> Aiui you mean `spec-ctrl=no-ssbd` here? And the effect would then be
> to turn _on_ Memory Disambiguation, unless the original comment was
> the wrong way round? I'm also concerned by this behavioral change:
> I think opt_ssbd would want to become a tristate, such that not
> specifying the option at all will not also result in turning the bit
> off even if it was on for some reason (firmware?). Similarly
> "spec-ctrl=no" and "spec-ctrl=no-xen" imo shouldn't have this effect.

I messed that bit of the description up.  I means `spec-ctrl=ssb`, i.e.
the non-default value.

We do not disable Memory Disambiguation (the speculative feature which
causes the Speculative Store Bypass vulnerability) by default (due to
the perf hit), but if the user explicitly asks for it using the
available command line option, nothing currently happens on Fam19h.

~Andrew



  reply	other threads:[~2021-08-24 13:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 14:30 [PATCH 0/3] x86/amd: Hardware speculative controls Andrew Cooper
2021-08-17 14:30 ` [PATCH 1/3] x86/spec-ctrl: Split the "Hardware features" diagnostic line Andrew Cooper
2021-08-19 14:38   ` Jan Beulich
2021-08-24 12:57     ` Andrew Cooper
2021-08-24 13:15       ` Jan Beulich
2021-09-07 14:29         ` Andrew Cooper
2021-08-17 14:30 ` [PATCH 2/3] x86/amd: Enumeration for speculative features/hints Andrew Cooper
2021-08-19 14:47   ` Jan Beulich
2021-08-24 13:26     ` Andrew Cooper
2021-08-24 15:15       ` Jan Beulich
2021-09-07 16:12         ` Andrew Cooper
2021-08-17 14:30 ` [PATCH 3/3] x86/amd: Use newer SSBD mechanisms if they exist Andrew Cooper
2021-08-19 14:59   ` Jan Beulich
2021-08-24 13:39     ` Andrew Cooper [this message]
2021-08-24 15:17       ` Jan Beulich
2021-09-07 16:19   ` [PATCH v2 " Andrew Cooper
2021-09-08 10:43     ` Jan Beulich
2021-09-08 11:19       ` Andrew Cooper

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=54ea3563-446d-8742-c99a-8eb2b0824ec2@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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.