From: Nikunj A Dadhania <nikunj@amd.com>
To: <linux-kernel@vger.kernel.org>, <kvm@vger.kernel.org>,
<bp@alien8.de>, <thomas.lendacky@amd.com>,
<dave.hansen@linux.intel.com>
Cc: <tglx@kernel.org>, <mingo@redhat.com>, <hpa@zytor.com>,
<xin@zytor.com>, <seanjc@google.com>, <pbonzini@redhat.com>,
<x86@kernel.org>, <sohil.mehta@intel.com>,
<chang.seok.bae@intel.com>, <jon.grimm@amd.com>, <nikunj@amd.com>
Subject: [PATCH v3 0/3] x86/fred: Fix SEV-ES/SNP guest boot failures
Date: Wed, 18 Mar 2026 07:56:51 +0000 [thread overview]
Message-ID: <20260318075654.1792916-1-nikunj@amd.com> (raw)
SEV-ES and SNP guests fail to boot when FRED is enabled due to missing #VC
exception handling and a CR-pinning issue that prematurely enables FRED before
its MSRs are configured.
Patch 1 fixes the implicit FSGSBASE dependency by moving FSGSBASE enablement
to cpu_init_exception_handling(), ensuring it's enabled before exception
handling infrastructure is set up on both boot and secondary CPUs.
Patch 2 fixes the CR-pinning issue by deferring enforcement during secondary
CPU bringup, preventing FRED from being enabled before it is configured and
able to handle exceptions.
Patch 3 adds #VC exception handling to FRED and fixes early GHCB access to
use boot_ghcb before per-CPU GHCBs are initialized.
These fixes enable SEV-ES/SNP guests to boot successfully with FRED enabled.
Changelog:
v2 -> v3:
* Fix SNP guest boot failure reported by Borislav Petkov - the CR pinning
disable patch exposed an implicit FSGSBASE dependency that is now fixed
by moving FSGSBASE enablement to cpu_init_exception_handling() (Boris/Sohil)
v1 -> v2:
https://lore.kernel.org/kvm/20260226092349.803491-1-nikunj@amd.com/
* Instead of moving pr_info(), fix the root cause by disabling CR pinning
during secondary CPU bringup (Dave Hansen)
* Use unified #VC exception handler in fred_hwexc() (Dave Hansen)
* Collect RoB (Sohil Mehta)
v1: https://lore.kernel.org/kvm/20260205051030.1225975-1-nikunj@amd.com/
Dave Hansen (1):
x86/cpu: Disable CR pinning during CPU bringup
Nikunj A Dadhania (2):
x86/cpu: Enable FSGSBASE early in cpu_init_exception_handling()
x86/fred: Fix early boot failures on SEV-ES/SNP guests
arch/x86/coco/sev/noinstr.c | 6 ++++++
arch/x86/entry/entry_fred.c | 14 ++++++++++++
arch/x86/kernel/cpu/common.c | 41 +++++++++++++++++++++++++++---------
3 files changed, 51 insertions(+), 10 deletions(-)
base-commit: 270b06a2452b0a20b149591ee90e22e3d8d55358
--
2.48.1
next reply other threads:[~2026-03-18 7:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 7:56 Nikunj A Dadhania [this message]
2026-03-18 7:56 ` [PATCH v3 1/3] x86/cpu: Enable FSGSBASE early in cpu_init_exception_handling() Nikunj A Dadhania
2026-03-18 13:54 ` Sohil Mehta
2026-03-18 15:39 ` Borislav Petkov
2026-03-18 15:53 ` Dave Hansen
2026-03-18 16:49 ` Sohil Mehta
2026-03-18 7:56 ` [PATCH v3 2/3] x86/cpu: Disable CR pinning during CPU bringup Nikunj A Dadhania
2026-03-18 7:56 ` [PATCH v3 3/3] x86/fred: Fix early boot failures on SEV-ES/SNP guests Nikunj A Dadhania
2026-03-18 11:43 ` [PATCH v3 0/3] x86/fred: Fix SEV-ES/SNP guest boot failures Borislav Petkov
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=20260318075654.1792916-1-nikunj@amd.com \
--to=nikunj@amd.com \
--cc=bp@alien8.de \
--cc=chang.seok.bae@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jon.grimm@amd.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=sohil.mehta@intel.com \
--cc=tglx@kernel.org \
--cc=thomas.lendacky@amd.com \
--cc=x86@kernel.org \
--cc=xin@zytor.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox