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

Re: [PATCH 3/3] x86/amd: Use newer SSBD mechanisms if they exist

  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 24 Aug 2021 17:17:10 +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-SenderADCheck; bh=IVpnzoeO9kAmwlgIXewPwuIUmruct/Hbifu48wW+1Ug=; b=SwqyZm8jYauVcs4HNtmv4cPUo09ViSBXAN2kCOiwk4MMtcGqR68LJcG07x/Tg14Yba4/TeaMbsd7xpFGiu36ntT/a8WJQvdwLsJ3ZSUMNlEb1TMMu/EqgDsbc1/BCDCE8uHR3TYliPz0yIf3wHUGJ/FhOVJEasTYzuGR2c2ePIU/3bLdX0sN0ZTh2SVrAeqiXkPDTb+RaX743JaydnaL6QcT4D+GEyvgFBouZ6W4QYduBtXcgv3h1QeLD+d8yuYcaq77Kf4iXNiaBwYpLuhJexpw8uFyYgxTZgmvO9+IhwWGQkX8ROOkvH80adp9w9XRA7SvRj3mYXopm3dmi4ms1Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gSnb0uzy+I6FnJmo/viVwernH7qCooTbzx8pI6DjpC6Aac0zHNUeo1QcOPTj7WjYM6ngbcIrOY5J/zx3CLDTz0dSrbL4xQwyyIvuDPt+WdaHqT6S29KG+qqhGRe4HpHWiqfJej7o0Ijq01A58zVOa18NbtHswaFQqCmVL9HTQjZ+rqU4nqJCLmkbf2FQnJ5PJ5xoXkiALetrGiXJQ1FYpmaqdifXAMGfbU574Aq5pKWM5tMX3sLeRbBFZe+UIZimD2E348elEapUqhIZwrgj8yrHp4C4tYwRifQsaCEFom0qUabttX37A3cDB8mqXfY3bGZFMpMtziXqsSQNia2tMA==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Wei Liu <wei.liu2@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 24 Aug 2021 15:17:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.08.2021 15:39, Andrew Cooper wrote:
> 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.

Oh, I see. Yet (nit) then still "spec-ctrl=ssbd".




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