summaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/compressed/pgtable.h
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2023-08-07 18:27:11 +0200
committerBorislav Petkov (AMD) <bp@alien8.de>2023-08-07 20:49:26 +0200
commitcb83cece57e1889109dd73ea08ee338668c9d1b8 (patch)
treee2eed338ae1d091200375cc7803d41c01a237041 /arch/x86/boot/compressed/pgtable.h
parentx86/decompressor: Only call the trampoline when changing paging levels (diff)
downloadlinux-cb83cece57e1889109dd73ea08ee338668c9d1b8.tar.xz
linux-cb83cece57e1889109dd73ea08ee338668c9d1b8.zip
x86/decompressor: Pass pgtable address to trampoline directly
The only remaining use of the trampoline address by the trampoline itself is deriving the page table address from it, and this involves adding an offset of 0x0. So simplify this, and pass the new CR3 value directly. This makes the fact that the page table happens to be at the start of the trampoline allocation an implementation detail of the caller. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20230807162720.545787-15-ardb@kernel.org
Diffstat (limited to 'arch/x86/boot/compressed/pgtable.h')
-rw-r--r--arch/x86/boot/compressed/pgtable.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/boot/compressed/pgtable.h b/arch/x86/boot/compressed/pgtable.h
index c6b0903aded0..6d595abe06b3 100644
--- a/arch/x86/boot/compressed/pgtable.h
+++ b/arch/x86/boot/compressed/pgtable.h
@@ -3,8 +3,6 @@
#define TRAMPOLINE_32BIT_SIZE (2 * PAGE_SIZE)
-#define TRAMPOLINE_32BIT_PGTABLE_OFFSET 0
-
#define TRAMPOLINE_32BIT_CODE_OFFSET PAGE_SIZE
#define TRAMPOLINE_32BIT_CODE_SIZE 0xA0