[lkml]   [2019]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[RFC PATCH 0/5] EFI Special Purpose Memory Support
The EFI 2.8 Specification [1] introduces the EFI_MEMORY_SP ("special
purpose") memory attribute. This attribute bit replaces the deprecated
"reservation hint" that was introduced in ACPI 6.2 and removed in ACPI

Given the increasing diversity of memory types that might be advertised
to the operating system, there is a need for platform firmware to hint
which memory ranges are free for the OS to use as general purpose memory
and which ranges are intended for application specific usage. For
example, an application with prior knowledge of the platform may expect
to be able to exclusively allocate a precious / limited pool of high
bandwidth memory. Alternatively, for the general purpose case, the
operating system may want to make the memory available on a best effort
basis as a unique numa-node with performance properties by the new

In support of allowing for both exclusive and core-kernel-mm managed
access to differentiated memory, claim EFI_MEMORY_SP ranges for exposure
as device-dax instances by default. Those instances can be directly
owned / mapped by a platform-topology-aware application. However, with
the new kmem facility [3], the administrator has the option to instead
designate that those memory ranges be hot-added to the core-kernel-mm as
a unique memory numa-node. In short, allow for the decision about what
software agent manages special purpose memory to be made at runtime.

The patches are based on v8 of Keith's "HMEM" series currently in Greg's
driver-core-testing branch [4], and have not been tested. This is an RFC
proposal on how to handle the new EFI memory attribute.



Dan Williams (5):
efi: Detect UEFI 2.8 Special Purpose Memory
lib/memregion: Uplevel the pmem "region" ida to a global allocator
acpi/hmat: Track target address ranges
acpi/hmat: Register special purpose memory as a device
device-dax: Add a driver for "hmem" devices

arch/x86/Kconfig | 18 +++++
arch/x86/boot/compressed/eboot.c | 5 +
arch/x86/boot/compressed/kaslr.c | 2 -
arch/x86/include/asm/e820/types.h | 9 ++
arch/x86/kernel/e820.c | 9 ++
arch/x86/platform/efi/efi.c | 10 ++-
drivers/acpi/hmat/Kconfig | 1
drivers/acpi/hmat/hmat.c | 140 +++++++++++++++++++++++++++++++------
drivers/dax/Kconfig | 26 ++++++-
drivers/dax/Makefile | 2 +
drivers/dax/hmem.c | 58 +++++++++++++++
drivers/nvdimm/Kconfig | 1
drivers/nvdimm/core.c | 1
drivers/nvdimm/nd-core.h | 1
drivers/nvdimm/region_devs.c | 13 +--
include/linux/efi.h | 14 ++++
include/linux/ioport.h | 1
include/linux/memregion.h | 9 ++
lib/Kconfig | 6 ++
lib/Makefile | 1
lib/memregion.c | 22 ++++++
21 files changed, 304 insertions(+), 45 deletions(-)
create mode 100644 drivers/dax/hmem.c
create mode 100644 include/linux/memregion.h
create mode 100644 lib/memregion.c

 \ /
  Last update: 2019-04-04 21:22    [W:0.231 / U:4.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site