x86/fred: Fix SEV-ES/SNP guest boot failures
Status from this message: The following commit has been merged into the x86/urgent branch of tip:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest3 patches 12 repliesApplied
- v22 patches 33 repliesSuperseded
- v11 patch 24 repliesSuperseded
Changes in v3 from the cover letter
* 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)
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | x86/cpu: Enable FSGSBASE early in cpu_init_exception_handling()arch/ | +12 | 4 replies | |
| 2/3 | x86/cpu: Disable CR pinning during CPU bringuparch/ | +19 | 9 replies | |
| 3/3 | x86/fred: Fix early boot failures on SEV-ES/SNP guestsarch/ arch/ | +20 | 0 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Sohil Mehta | Tom Lendacky |
|---|---|---|
| 1/3 | R-b | |
| 2/3 | R-b | |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/3] x86/fred: Fix SEV-ES/SNP guest boot failures
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/[email protected]/
* 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/[email protected]/
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
Signature · 1 line
2.48.1