All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Vallejo <alejandro.vallejo@cloud.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: "Alejandro Vallejo" <alejandro.vallejo@cloud.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	"Henry Wang" <Henry.Wang@arm.com>
Subject: [for-4.18][PATCH 0/2] Fix AMD erratum #1485 on AMD Zen4
Date: Thu, 12 Oct 2023 18:25:59 +0100	[thread overview]
Message-ID: <20231012172601.22600-1-alejandro.vallejo@cloud.com> (raw)

This patch should make it to 4.18, as it prevents random crashes on AMD
Zen4 running outdated microcode.

Under certain conditions Zen4 may corrupt its own code stream when SMT is
enabled and STIBP is not. The Linux thread in which this was highlighted is
in patch2's commit message.

NOTE: Still running in CI as of now, but tested locally. Pipeline here.
    https://gitlab.com/xen-project/people/agvallejo/xen/-/pipelines/1034895039

Patch 1: is just a minor refactor to ensure we don't get microarchitectures
         of different families mixed up now that we have 3 different
         families involved (Fam17h, Fam18h and Fam19h)
Patch 2: The actual fix. It involves setting a bit in an MSR if it's a non
         virtualized zen4. It's not a direct copy of the Linux patch, as we
         have started using macros to find out microarchitectures from
         CPUID bits, rather than relying on models.

Alejandro Vallejo (2):
  xen/x86: Add family guards to the is_zen[12]_uarch() macros
  x86/amd: Prevent potentially fetching wrong instruction bytes on Zen4

 xen/arch/x86/cpu/amd.c               | 16 +++++++++++++---
 xen/arch/x86/include/asm/amd.h       | 17 +++++++++++++----
 xen/arch/x86/include/asm/msr-index.h |  2 ++
 xen/arch/x86/spec_ctrl.c             |  3 ---
 4 files changed, 28 insertions(+), 10 deletions(-)

-- 
2.34.1



             reply	other threads:[~2023-10-12 17:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-12 17:25 Alejandro Vallejo [this message]
2023-10-12 17:26 ` [for-4.18][PATCH 1/2] xen/x86: Add family guards to the is_zen[12]_uarch() macros Alejandro Vallejo
2023-10-13  2:14   ` Andrew Cooper
2023-10-13 11:23     ` Alejandro Vallejo
2023-10-13 11:36       ` Roger Pau Monné
2023-10-13 14:00         ` Andrew Cooper
2023-10-12 17:26 ` [for-4.18][PATCH 2/2] x86/amd: Prevent potentially fetching wrong instruction bytes on Zen4 Alejandro Vallejo
2023-10-13  2:28   ` Andrew Cooper
2023-10-13  0:29 ` [for-4.18][PATCH 0/2] Fix AMD erratum #1485 on AMD Zen4 Henry Wang

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=20231012172601.22600-1-alejandro.vallejo@cloud.com \
    --to=alejandro.vallejo@cloud.com \
    --cc=Henry.Wang@arm.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --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.