Linux EFI development
 help / color / mirror / Atom feed
* query regarding SEV logic in early boot
@ 2025-03-24 17:28 Ard Biesheuvel
  2025-03-24 19:14 ` Tom Lendacky
  0 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2025-03-24 17:28 UTC (permalink / raw)
  To: linux-efi, linux-coco, Tom Lendacky
  Cc: Borislav Petkov, Dionna Amalie Glaze, Kevin Loughlin

L.S.,

As I am trying to disentangle the Linux early SEV boot code, the
legacy decompressor and the EFI stub, I noticed something that looks
broken to me, but I'm not quite sure how to fix it.

When booting via the EFI stub, the following call chain may occur:

setup_e820()
 process_unaccepted_memory()
  arch_accept_memory()
   snp_accept_memory()
    early_setup_ghcb()
     set_page_decrypted()
      set_clr_page_flags()

where the latter function relies on mapping_info to remap the GHCB
page as unencrypted. However, when entering via the EFI stub, this
struct is never initialized, and so I am struggling to see why this
works at all.

For context, I am looking into splitting/refactoring the decompressor
SEV startup code and the kernel proper's SEV startup code, in order to
a) use PIC codegen properly, and b) allow building a EFI-only bootable
image that does not include all the exception handling and demand
paging.

Any ideas?

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

end of thread, other threads:[~2025-03-25 17:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-24 17:28 query regarding SEV logic in early boot Ard Biesheuvel
2025-03-24 19:14 ` Tom Lendacky
2025-03-25  7:22   ` Ard Biesheuvel
2025-03-25 12:32     ` Kirill A. Shutemov
2025-03-25 17:03     ` Tom Lendacky

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