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

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

  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 8 Sep 2021 12:43:21 +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; bh=6/VVPUxhJU9k+lxB/ME4qx3Y4zC/7I21qhXyIqu0Ua4=; b=TT4MbePL+EEW4g458+wRgUgLp/ObCRunsri7wpKn4uBPcNhn+EZW76tCuqQmy1d0n9HMUPk0ovA+QM8RczW7yhM+AlUaq5736UirYpNlvW3llyZyHdOyQuKEvtnPUjffDjdwkKIqMVdT5J4kLVwRZxvUoZ90Em6Ny7IKhnt7VmULC4033YZ1CB8jZsnCbYmCE6u22o8h3jWlgTN121j4pFwX4raLWGPdxJtRgx36RzR8679BK/MrrZPXdECizC+2NIO2jS52uR5g4LrmI9XPdIOm66VpuTmuhUKXyStYNFuHTiRmhZZojDPZ+l+bN4hhQESfrTlmO3IOXNLnkXgxdA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EtTJgrsJpdDKa96B5JuDxjoLX1wcsGZDK+9PWBGOvYrkxjyzFRrxzxJYWgVtxOowi5CYTTijJGJfuehsgeSbpvQYoalIQFZiLa+rYin7wTtkLndARr7ZFt2MVupxhBPtA839WRgR6IJ+jkKbQL/ObU9b90wf75vy8YNeEw580D8HVPoPDrC7xJWpgInhqeilHkrkzN6Ob0rsj4P9P3GK8yWSGYCipLR7nMGY06IpQjvPMCdU/jqUg2Bxu7QLqIqFzC42J8xbARMsA19tZsp7eGxNyO19uAEsQj8H65Kef8iwd9YYwz03XyKsSJb9dd8TBJuUdlut0AYt7JU5pGx9Bw==
  • 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: Wed, 08 Sep 2021 10:43:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.09.2021 18:19, Andrew Cooper wrote:
> The opencoded legacy Memory Disambiguation logic in init_amd() neglected
> Fam19h for the Zen3 microarchitecture.  In practice, all Zen2 based system
> have the architectural MSR_SPEC_CTRL and the SSBD bit within it.

Don't you mean Zen3 in the 2nd sentence? Otherwise there's a missing
connect between both sentences.

> 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 explicitly choosing `spec-ctrl=ssbd` will properly
> turn off Memory Disambiguation on Fam19h/Zen3 systems.
> This still remains a single system-wide setting (for now), and is not context
> switched between vCPUs.  As such, it doesn't interact with Intel's use of
> MSR_SPEC_CTRL and default_xen_spec_ctrl (yet).
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>




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