x86/sev: Move early startup code into .head.text section
authorArd Biesheuvel <ardb@kernel.org>
Tue, 27 Feb 2024 15:19:16 +0000 (16:19 +0100)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 4 Mar 2024 17:12:37 +0000 (18:12 +0100)
commit428080c9b19bfda37c478cd626dbd3851db1aff9
tree699df109a9062adc27d062d89d79fff4c626a347
parent48204aba801f1b512b3abed10b8e1a63e03f3dd1
x86/sev: Move early startup code into .head.text section

In preparation for implementing rigorous build time checks to enforce
that only code that can support it will be called from the early 1:1
mapping of memory, move SEV init code that is called in this manner to
the .head.text section.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/20240227151907.387873-19-ardb+git@google.com
arch/x86/boot/compressed/sev.c
arch/x86/include/asm/sev.h
arch/x86/kernel/sev-shared.c
arch/x86/kernel/sev.c