mbox series

[0/2] efi/arm/gicv3: implement fix for memory reservation issue

Message ID 20190213132738.10294-1-ard.biesheuvel@linaro.org (mailing list archive)
Headers show
Series efi/arm/gicv3: implement fix for memory reservation issue | expand

Message

Ard Biesheuvel Feb. 13, 2019, 1:27 p.m. UTC
Another attempt at fixing the chicked-and-egg issue where the number of
memblock reservations for GICv3 LPI tables overflow the statically
allocated table, and reallocating it involves allocating memory pages
that may turn out to be the ones we were attempting to reserve in the
first place.

If this is accepted as an appropriate fix, something similar should be
backported to v4.19 as well, although there, we'll need to increase the
memblock reservation table size even more, given that it lacks a later
optimization to the EFI memreserve code to merge the linked list entries.

Cc: Catalin Marinas <catalin.marinas@arm.com> 
Cc: Will Deacon <will.deacon@arm.com> 
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Marc Zyngier <marc.zyngier@arm.com> 
Cc: James Morse <james.morse@arm.com>
Cc: linux-mm@kvack.org 

Ard Biesheuvel (2):
  arm64: account for GICv3 LPI tables in static memblock reserve table
  efi/arm: Revert "Defer persistent reservations until after
    paging_init()"

 arch/arm64/include/asm/memory.h         | 11 +++++++++++
 arch/arm64/kernel/setup.c               |  1 -
 drivers/firmware/efi/efi.c              |  4 ----
 drivers/firmware/efi/libstub/arm-stub.c |  3 ---
 include/linux/efi.h                     |  7 -------
 include/linux/memblock.h                |  3 ---
 mm/memblock.c                           | 10 ++++++++--
 7 files changed, 19 insertions(+), 20 deletions(-)