public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/6] x86: Refactor and consolidate startup code
@ 2025-04-18 14:12 Ard Biesheuvel
  2025-04-18 14:12 ` [PATCH v5 1/6] vmlinux.lds: Include .data.rel[.local] into .data section Ard Biesheuvel
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Ard Biesheuvel @ 2025-04-18 14:12 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-efi, x86, mingo, Ard Biesheuvel, Tom Lendacky,
	Dionna Amalie Glaze, Kevin Loughlin

From: Ard Biesheuvel <ardb@kernel.org>

Reorganize C code that is used during early boot, either in the
decompressor/EFI stub or the kernel proper, but before the kernel
virtual mapping is up.

v5:
- add new patches #1 and #2 to address issues that were reported by Ingo
  for v4
- drop another couple of patches that have been queued up after v4
- rebase onto today's tip/x86/boot

v4:
- drop patches that were queued up
- fix address space error in patch #1
- add patches for SEV-SNP boot code - these cannot be applied yet, but
  are included for completeness

v3:
- keep rip_rel_ptr() around in PIC code - sadly, it is still needed in
  some cases
- remove RIP_REL_REF() uses in separate patches
- keep __head annotations for now, they will all be removed later
- disable objtool validation for library objects (i.e., pieces that are
  not linked into vmlinux)

I will follow up with a series that gets rid of .head.text altogether,
as it will no longer be needed at all once the startup code is checked
for absolute relocations.

Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Dionna Amalie Glaze <dionnaglaze@google.com>
Cc: Kevin Loughlin <kevinloughlin@google.com>

Ard Biesheuvel (6):
  vmlinux.lds: Include .data.rel[.local] into .data section
  x86/sev: Move noinstr NMI handling code into separate source file
  x86/sev: Split off startup code from core code
  x86/boot: Move SEV startup code into startup/
  x86/boot: Drop RIP_REL_REF() uses from early SEV code
  x86/asm: Retire RIP_REL_REF()

 arch/x86/boot/compressed/sev.c                            |    4 +-
 arch/x86/boot/startup/Makefile                            |    2 +-
 arch/x86/{coco/sev/shared.c => boot/startup/sev-shared.c} |  307 +---
 arch/x86/boot/startup/sev-startup.c                       | 1390 +++++++++++++++++
 arch/x86/coco/sev/Makefile                                |   23 +-
 arch/x86/coco/sev/core.c                                  | 1620 +++-----------------
 arch/x86/coco/sev/sev-nmi.c                               |  108 ++
 arch/x86/include/asm/asm.h                                |    5 -
 arch/x86/include/asm/sev-internal.h                       |   18 +-
 include/asm-generic/vmlinux.lds.h                         |    4 +-
 10 files changed, 1757 insertions(+), 1724 deletions(-)
 rename arch/x86/{coco/sev/shared.c => boot/startup/sev-shared.c} (81%)
 create mode 100644 arch/x86/boot/startup/sev-startup.c
 create mode 100644 arch/x86/coco/sev/sev-nmi.c


base-commit: 433bf33adc6605f3798cbf2b2c42d0b499233c7b
-- 
2.49.0.805.g082f7c87e0-goog


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

end of thread, other threads:[~2025-05-04  7:33 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-18 14:12 [PATCH v5 0/6] x86: Refactor and consolidate startup code Ard Biesheuvel
2025-04-18 14:12 ` [PATCH v5 1/6] vmlinux.lds: Include .data.rel[.local] into .data section Ard Biesheuvel
2025-04-18 14:12 ` [PATCH v5 2/6] x86/sev: Move noinstr NMI handling code into separate source file Ard Biesheuvel
2025-04-18 14:12 ` [PATCH v5 3/6] x86/sev: Split off startup code from core code Ard Biesheuvel
2025-04-23 15:22   ` Tom Lendacky
2025-04-23 15:50     ` Ard Biesheuvel
2025-04-24  9:37       ` Borislav Petkov
2025-04-24 15:34     ` [PATCH] x86/sev: Share the sev_secrets_pa value again Ingo Molnar
2025-04-24 16:04       ` Tom Lendacky
2025-04-18 14:12 ` [PATCH v5 4/6] x86/boot: Move SEV startup code into startup/ Ard Biesheuvel
2025-04-18 14:12 ` [PATCH v5 5/6] x86/boot: Drop RIP_REL_REF() uses from early SEV code Ard Biesheuvel
2025-04-18 14:13 ` [PATCH v5 6/6] x86/asm: Retire RIP_REL_REF() Ard Biesheuvel
2025-04-18 15:51   ` Uros Bizjak
2025-04-18 15:58     ` Ard Biesheuvel
2025-05-04  7:33       ` Uros Bizjak
2025-04-22 19:55 ` [PATCH v5 0/6] x86: Refactor and consolidate startup code Ingo Molnar
2025-04-22 21:09   ` Ard Biesheuvel

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