Skip to content

EFI runtime services virtual mapping, vN++

Borislav Petkov linux-efi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11efi: Simplify EFI_DEBUGarch/x86/platform/efi/efi.c+3 -60 replies
2/11x86, pageattr: Lookup address in an arbitrary PGDarch/x86/mm/pageattr.c+26 -100 replies
3/11x86, pageattr: Add a PGD pagetable populating functionarch/x86/mm/pageattr.c+39 -00 replies
4/11x86, pageattr: Add a PUD pagetable populating functionarch/x86/mm/pageattr.c+86 -10 replies
5/11x86, pageattr: Add a PMD pagetable populating functionarch/x86/mm/pageattr.c+81 -10 replies
6/11x86, pageattr: Add a PTE pagetable populating functionarch/x86/mm/pageattr.c+21 -10 replies
7/11x86, pageattr: Add a PUD error unwinding patharch/x86/mm/pageattr.c+58 -20 replies
8/11x86, pageattr: Add last levels of error patharch/x86/mm/pageattr.c+93 -10 replies
9/11x86, cpa: Map in an arbitrary pgdarch/x86/mm/pageattr.c+46 -70 replies
10/11EFI: Runtime services virtual mappingDocumentation/kernel-parameters.txt Documentation/x86/x86_64/mm.txt arch/x86/include/asm/efi.h +6 more+300 -476 replies
11/11efi: Check krealloc return valuearch/x86/platform/efi/efi.c+8 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/11] EFI runtime services virtual mapping, vN++

From: Borislav Petkov <[email protected]>

Hi all,

here's maybe the final version of the patchset, no major changes since the last time but cosmetic and cleanups and tidying as requested by Matt and others.

Patches also at:

git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git#efi

The previous announcement:

here's finally a new version of the runtime services VA mapping patchset which hopefully implements hpa's idea of statically mapping EFI runtime regions in a top-down manner starting at -4Gb virtual.

We're also using a different pagetable so as not to pollute kernel address space. For that, we switch to that table before doing an EFI call, and afterwards we switch back to the previous one.

To the patches:

1-2 are simple cleanups which Matt probably can take now

3-10 add the machinery to map regions into an arbitrary PGD. Those I've split deliberately into very small bites so that they can be reviewed more thoroughly and easily for my pagetable skills are pretty basic.

11 is the actual patch which implements that mapping so that we can use runtime services in kexec (which is the whole reason for this fuss :))

So please take a long hard look at those, hammer on them on your boxes and let me know. They boot fine on my Dell UEFI box and in OVMF (obviously :)).

Borislav Petkov (11):
efi: Simplify EFI_DEBUG
x86, pageattr: Lookup address in an arbitrary PGD x86, pageattr: Add a PGD pagetable populating function x86, pageattr: Add a PUD pagetable populating function x86, pageattr: Add a PMD pagetable populating function x86, pageattr: Add a PTE pagetable populating function x86, pageattr: Add a PUD error unwinding path x86, pageattr: Add last levels of error path x86, cpa: Map in an arbitrary pgd
EFI: Runtime services virtual mapping
efi: Check krealloc return value

 Documentation/kernel-parameters.txt  |   6 +
 Documentation/x86/x86_64/mm.txt      |   7 +
 arch/x86/include/asm/efi.h           |  64 +++--
 arch/x86/include/asm/pgtable_types.h |   3 +-
 arch/x86/mm/pageattr.c               | 461 +++++++++++++++++++++++++++++++++--
 arch/x86/platform/efi/efi.c          | 111 ++++++---
 arch/x86/platform/efi/efi_32.c       |   9 +-
 arch/x86/platform/efi/efi_64.c       | 109 +++++++++
 arch/x86/platform/efi/efi_stub_64.S  |  54 ++++
 include/linux/efi.h                  |   1 +
 10 files changed, 755 insertions(+), 70 deletions(-)
Signature · 1 line
1.8.4