x86/decompressor: Call trampoline directly from C code
authorArd Biesheuvel <ardb@kernel.org>
Mon, 7 Aug 2023 16:27:09 +0000 (18:27 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 7 Aug 2023 18:46:57 +0000 (20:46 +0200)
commit64ef578b6b6866bec012544416946533444036c8
treee54dee903fb09b16c32a43caf8ecdc64bbf850a8
parentbd328aa01ff77a45aeffea5fc4521854291db11f
x86/decompressor: Call trampoline directly from C code

Instead of returning to the asm calling code to invoke the trampoline,
call it straight from the C code that sets it up. That way, the struct
return type is no longer needed for returning two values, and the call
can be made conditional more cleanly in a subsequent patch.

This means that all callee save 64-bit registers need to be preserved
and restored, as their contents may not survive the legacy mode switch.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Link: https://lore.kernel.org/r/20230807162720.545787-13-ardb@kernel.org
arch/x86/boot/compressed/head_64.S
arch/x86/boot/compressed/pgtable_64.c