summaryrefslogtreecommitdiff
path: root/include/linux/fpga/fpga-mgr.h
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2024-02-27 18:19:11 +0300
committerBorislav Petkov (AMD) <bp@alien8.de>2024-03-04 20:12:16 +0300
commitd6a41f184dcea0814260af2780e147022c11dca8 (patch)
tree9e031b5b8a82e03dc1a071cf138a3e8ba5e14c3c /include/linux/fpga/fpga-mgr.h
parent63bed96604205fa0b23c91d268df5f1f1b26faf6 (diff)
downloadlinux-d6a41f184dcea0814260af2780e147022c11dca8.tar.xz
x86/startup_64: Simplify calculation of initial page table address
Determining the address of the initial page table to program into CR3 involves: - taking the physical address - adding the SME encryption mask On the primary entry path, the code is mapped using a 1:1 virtual to physical translation, so the physical address can be taken directly using a RIP-relative LEA instruction. On the secondary entry path, the address can be obtained by taking the offset from the virtual kernel base (__START_kernel_map) and adding the physical kernel base. This is implemented in a slightly confusing way, so clean this up. 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-14-ardb+git@google.com
Diffstat (limited to 'include/linux/fpga/fpga-mgr.h')
0 files changed, 0 insertions, 0 deletions