public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] x86/fred: Fix SEV-ES/SNP guest boot failures
@ 2026-03-18  7:56 Nikunj A Dadhania
  2026-03-18  7:56 ` [PATCH v3 1/3] x86/cpu: Enable FSGSBASE early in cpu_init_exception_handling() Nikunj A Dadhania
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Nikunj A Dadhania @ 2026-03-18  7:56 UTC (permalink / raw)
  To: linux-kernel, kvm, bp, thomas.lendacky, dave.hansen
  Cc: tglx, mingo, hpa, xin, seanjc, pbonzini, x86, sohil.mehta,
	chang.seok.bae, jon.grimm, nikunj

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-03-18 16:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18  7:56 [PATCH v3 0/3] x86/fred: Fix SEV-ES/SNP guest boot failures Nikunj A Dadhania
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox