All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: Intended behavior/usage of SSBD setting
Date: Thu, 20 Oct 2022 13:22:20 +0200	[thread overview]
Message-ID: <2f5ec31e-2ac5-2b22-8801-9ebdc4946962@suse.com> (raw)
In-Reply-To: <Y1Eqk6D0dBDR4m4u@Air-de-Roger>

On 20.10.2022 13:01, Roger Pau Monné wrote:
> Hello,
> 
> As part of some follow up improvements to my VIRT_SPEC_CTRL series we
> have been discussing what the usage of SSBD should be for the
> hypervisor itself.  There's currently a `spec-ctrl=ssbd` option [0],
> that has an out of date description, as now SSBD is always offered to
> guests on AMD hardware, either using SPEC_CTRL or VIRT_SPEC_CTRL.
> 
> It has been pointed out by Andrew that toggling SSBD on AMD using
> VIRT_SPEC_CTRL or the non-architectural way (MSR_AMD64_LS_CFG) can
> have a high impact on performance, and hence switching it on every
> guest <-> hypervisor context switch is likely a very high
> performance penalty.
> 
> It's been suggested that it could be more appropriate to run Xen with
> the guest SSBD selection on those systems, however that clashes with
> the current intent of the `spec-ctrl=ssbd` option.
> 
> I hope I have captured the expressed opinions correctly in the text
> above.
> 
> I see two ways to solve this:
> 
>  * Keep the current logic for switching SSBD on guest <-> hypervisor
>    context switch, but only use it if `spec-ctrl=ssbd` is set on the
>    command line.
> 
>  * Remove the logic for switching SSBD on guest <-> hypervisor context
>    switch, ignore setting of `spec-ctrl=ssbd` on those systems and run
>    hypervisor code with the guest selection of SSBD.

* Give the guest the illusion of controlling the behavior, but run with
  SSBD always enabled when "spec-ctrl=ssbd" is in effect.

* Give the guest the illusion of controlling the behavior when
  "spec-ctrl=ssbd" is in effect, running with the OR of guest and host
  settings (switched, if necessary, as vCPU-s are context-switched).

Jan


  reply	other threads:[~2022-10-20 11:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20 11:01 Intended behavior/usage of SSBD setting Roger Pau Monné
2022-10-20 11:22 ` Jan Beulich [this message]
2022-10-20 12:37   ` Roger Pau Monné
2022-10-20 13:25     ` Jan Beulich
2022-10-20 13:56       ` Roger Pau Monné
2022-10-21 21:54 ` Andrew Cooper
2022-10-24  6:45   ` Jan Beulich
2022-10-24  9:32     ` Roger Pau Monné
2022-10-24 10:40       ` Jan Beulich

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=2f5ec31e-2ac5-2b22-8801-9ebdc4946962@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@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.