public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] x86/boot: Clean up handling of boot_params pointer
@ 2023-04-12 18:44 Brian Gerst
  2023-04-12 18:44 ` [PATCH v2 1/6] x86/boot: Move sanitize_boot_params() Brian Gerst
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Brian Gerst @ 2023-04-12 18:44 UTC (permalink / raw)
  To: linux-kernel, x86
  Cc: Thomas Gleixner, Borislav Petkov, H . Peter Anvin, Peter Zijlstra,
	Ingo Molnar, Brian Gerst

On entry from the bootloader, RSI contains the pointer to the boot_params
data structure.  The pointer is passed to x86_64_start_kernel(), which
requires preserving RSI all the way though the early boot asm code.
Change it to copy the boot_params data as soon as possible, which also
has the benefit of not needing to remap the real mode data pages if
memory encryption is enabled.

Note: The memory encryption changes are untested due to lack of hardware.

Brian Gerst (6):
  x86/boot: Move sanitize_boot_params()
  x86/boot: Remove extra call to copy_bootdata()
  x86/boot: Clean up get_cmd_line_ptr()
  x86/boot: Move copy_bootdata() to very early boot.
  x86/boot: Use copied boot data in __startup_64()
  x86/boot: Use copied boot data in sme_enable()

 arch/x86/include/asm/mem_encrypt.h |  4 +-
 arch/x86/include/asm/setup.h       |  9 +++--
 arch/x86/kernel/head64.c           | 59 ++++++++++-------------------
 arch/x86/kernel/head_64.S          | 26 +++----------
 arch/x86/kernel/setup.c            |  2 +-
 arch/x86/mm/mem_encrypt_amd.c      | 61 ------------------------------
 arch/x86/mm/mem_encrypt_identity.c | 42 ++++++++++----------
 arch/x86/xen/enlighten_pv.c        |  2 +-
 8 files changed, 58 insertions(+), 147 deletions(-)

-- 
2.39.2


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

end of thread, other threads:[~2023-04-12 18:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-12 18:44 [PATCH v2 0/6] x86/boot: Clean up handling of boot_params pointer Brian Gerst
2023-04-12 18:44 ` [PATCH v2 1/6] x86/boot: Move sanitize_boot_params() Brian Gerst
2023-04-12 18:44 ` [PATCH v2 2/6] x86/boot: Remove extra call to copy_bootdata() Brian Gerst
2023-04-12 18:44 ` [PATCH v2 3/6] x86/boot: Clean up get_cmd_line_ptr() Brian Gerst
2023-04-12 18:45 ` [PATCH v2 4/6] x86/boot: Move copy_bootdata() to very early boot Brian Gerst
2023-04-12 18:45 ` [PATCH v2 5/6] x86/boot: Use copied boot data in __startup_64() Brian Gerst
2023-04-12 18:45 ` [PATCH v2 6/6] x86/boot: Use copied boot data in sme_enable() Brian Gerst

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