[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intended behavior/usage of SSBD setting


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 20 Oct 2022 13:22:20 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SzHEfeN0eWADFmzOSEdVxajkOuBplALvwDC3lhdlDe8=; b=Ri6tS93IhKJKeKFNDaDvI6gYAaan761rpYbVOwyMnpvp78p+MJf8DS+oyW6FIymbSgTweWf4pC3dyINIoHNRse2ndPbqrzj2+O5iSjRxe3yw7kXCXBL4ZbBZ3rlwdFrcdsh1B9IWrotpWn0NVzR1Yx5JAHJxFcKXTAt5m6yKresJIoO53OC0TkHJYveZvOj6PoMPR73BKXE5ujw48oueJeP3J/Tj9GwtVSIqNVGofa2fWQePcQbEx1nVs/5bwMjlNKUJpDOFPusDmu1yOQMCbidltST8+UiAVl0oY33G2NM4kN3CTTAKKLv+PE4qPWDMGIGSj9ph/qQjyRL1Y9gEWw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O20KOlbyPRwfySBklhLspJls//aZTO0OqOyW8tV08c3hZQpI+hZnOc3C9YrV81Hsr05LLUsPJEc4uAHBx9Xw+nGNVyqxJ0hCEAZibw7a3lgd44O4Fx5ADp4s8TZCCS0N+iwVBM33MqJt62lmTIREirWc68dT6n/Zzdl1/KkbToetTfs1AsDXE4DLwRRmTzj/dfoNfkZGkuFqdskrjph9EttQdBPkQ9VEIIT5KIgAf7baQFGuxfOVSZH4bK0+R3Qn35IyEsy5r3WhTNPj8RWe8ATeEWamyoiSFkQ3supcfGPiPnU9reQHbynyDi6gfDjt1HE6FZ0j8FSXu9LD2oeuXA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 20 Oct 2022 11:22:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.