[PATCH v2 0/2] x86/fred: Fix SEV-ES/SNP guest boot failures

From: Nikunj A Dadhania

Date: Thu Feb 26 2026 - 04:34:29 EST


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 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 2 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:
v1 -> v2:
* 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@xxxxxxx/

Dave Hansen (1):
x86/cpu: Disable CR pinning during CPU bringup

Nikunj A Dadhania (1):
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 | 23 +++++++++++++++++++----
3 files changed, 39 insertions(+), 4 deletions(-)


base-commit: 7e8eff12c150f3bc24f0faac42e3a62a8fad751d
--
2.48.1