x86/boot/64: Load the final kernel GDT during early boot directly, remove startup_gdt[]
authorBrian Gerst <brgerst@gmail.com>
Mon, 26 Feb 2024 22:05:44 +0000 (17:05 -0500)
committerIngo Molnar <mingo@kernel.org>
Wed, 28 Feb 2024 10:02:16 +0000 (11:02 +0100)
commit11e36b0f7c2150a6453872b79555767b43c846d0
tree0493b027909783638eef78ed5b28f5fd67b722b5
parent533568e06b157b175912a960efe5ebce8710b4f9
x86/boot/64: Load the final kernel GDT during early boot directly, remove startup_gdt[]

Instead of loading a duplicate GDT just for early boot, load the kernel
GDT from its physical address.

Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/r/20240226220544.70769-1-brgerst@gmail.com
arch/x86/include/asm/desc.h
arch/x86/kernel/head64.c