x86/sev: Prepare for splitting off early SEV code
authorArd Biesheuvel <ardb@kernel.org>
Thu, 10 Apr 2025 13:41:25 +0000 (15:41 +0200)
committerIngo Molnar <mingo@kernel.org>
Sat, 12 Apr 2025 09:13:05 +0000 (11:13 +0200)
commit221df25fdf827b1fe5b904c6a396af06461a32f6
tree6bf451a45b75fa055249da6e5c2f359960a428aa
parentbee174b27e54462ef18b38f8377d27ac0ad14350
x86/sev: Prepare for splitting off early SEV code

Prepare for splitting off parts of the SEV core.c source file into a
file that carries code that must tolerate being called from the early
1:1 mapping. This will allow special build-time handling of thise code,
to ensure that it gets generated in a way that is compatible with the
early execution context.

So create a de-facto internal SEV API and put the definitions into
sev-internal.h. No attempt is made to allow this header file to be
included in arbitrary other sources - this is explicitly not the intent.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Dionna Amalie Glaze <dionnaglaze@google.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Kevin Loughlin <kevinloughlin@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: linux-efi@vger.kernel.org
Link: https://lore.kernel.org/r/20250410134117.3713574-20-ardb+git@google.com
arch/x86/boot/compressed/sev.c
arch/x86/coco/sev/core.c
arch/x86/coco/sev/shared.c
arch/x86/include/asm/sev-internal.h [new file with mode: 0644]
arch/x86/include/asm/sev.h