aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/include/x86_64/svm_util.h
diff options
context:
space:
mode:
authorGravatar Ard Biesheuvel <ardb@kernel.org> 2022-09-16 11:48:30 +0200
committerGravatar Ard Biesheuvel <ardb@kernel.org> 2022-09-27 13:26:16 +0200
commitd3549a938b73f203ef522562ae9f2d38aa43d234 (patch)
tree81ef0f148991c0e999bda5bd2d3342b86cb9d4c2 /tools/testing/selftests/kvm/include/x86_64/svm_util.h
parentefi: zboot: create MemoryMapped() device path for the parent if needed (diff)
downloadlinux-d3549a938b73f203ef522562ae9f2d38aa43d234.tar.gz
linux-d3549a938b73f203ef522562ae9f2d38aa43d234.tar.bz2
linux-d3549a938b73f203ef522562ae9f2d38aa43d234.zip
efi/arm64: libstub: avoid SetVirtualAddressMap() when possible
EFI's SetVirtualAddressMap() runtime service is a horrid hack that we'd like to avoid using, if possible. For 64-bit architectures such as arm64, the user and kernel mappings are entirely disjoint, and given that we use the user region for mapping the UEFI runtime regions when running under the OS, we don't rely on SetVirtualAddressMap() in the conventional way, i.e., to permit kernel mappings of the OS to coexist with kernel region mappings of the firmware regions. This means that, in principle, we should be able to avoid SetVirtualAddressMap() altogether, and simply use the 1:1 mapping that UEFI uses at boot time. (Note that omitting SetVirtualAddressMap() is explicitly permitted by the UEFI spec). However, there is a corner case on arm64, which, if configured for 3-level paging (or 2-level paging when using 64k pages), may not be able to cover the entire range of firmware mappings (which might contain both memory and MMIO peripheral mappings). So let's avoid SetVirtualAddressMap() on arm64, but only if the VA space is guaranteed to be of sufficient size. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'tools/testing/selftests/kvm/include/x86_64/svm_util.h')
0 files changed, 0 insertions, 0 deletions