Re: [RFT PATCH v2 00/23] x86: strict separation of startup code

Borislav Petkov
2025-05-07T09:53:17Z

On Sun, May 04, 2025 at 11:52:30AM +0200, Ard Biesheuvel wrote:
> arch/x86/boot/compressed/Makefile | 6 +-
> arch/x86/boot/compressed/misc.h | 12 +-
> arch/x86/boot/compressed/pgtable_64.c | 12 -
> arch/x86/boot/compressed/sev-handle-vc.c | 134 +++
> arch/x86/boot/compressed/sev.c | 210 +---
> arch/x86/boot/compressed/sev.h | 21 +-
> arch/x86/boot/compressed/vmlinux.lds.S | 1 +
> arch/x86/boot/startup/Makefile | 21 +
> arch/x86/boot/startup/exports.h | 14 +
> arch/x86/boot/startup/gdt_idt.c | 17 +-
> arch/x86/boot/startup/map_kernel.c | 18 +-
> arch/x86/boot/startup/sev-shared.c | 804 +-------------
> arch/x86/boot/startup/sev-startup.c | 1169 +-------------------
> arch/x86/boot/startup/sme.c | 45 +-
> arch/x86/coco/core.c | 2 +
> arch/x86/coco/sev/Makefile | 6 +-
> arch/x86/coco/sev/core.c | 189 +++-
> arch/x86/coco/sev/{sev-nmi.c => sev-noinstr.c} | 74 ++

Can we drop the "sev-" prefix to filenames which are already in sev/
filepaths?

> arch/x86/coco/sev/vc-handle.c | 1060 ++++++++++++++++++
> arch/x86/coco/sev/vc-shared.c | 614 ++++++++++
> arch/x86/include/asm/init.h | 6 -
> arch/x86/include/asm/linkage.h | 10 +
> arch/x86/include/asm/pgtable_64_types.h | 43 +-
> arch/x86/include/asm/setup.h | 2 +
> arch/x86/include/asm/sev-internal.h | 30 +-
> arch/x86/include/asm/sev.h | 78 ++

Pfff, sev-internal and sev.

I guess I'll know how the new structure would look like once I go through this
but there are so many sev* files now.

Can we tone that down pls, through aggregation, moving up into headers and so
on?

Thx.

--
Regards/Gruss,
Boris.