[EGS] EFI Specific Purpose Memory Support

Bug #1880458 reported by quanxian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
intel
Fix Released
Undecided
Unassigned
Ubuntu
New
Undecided
Unassigned

Bug Description

Description:

Clarify in the changelog that the policy decision of how to treat
  specific-purpose memory is x86 only until other archs grow a
  translation to IORES_DESC_APPLICATION_RESERVED. The EFI spec does not
  mandate a behavior for the EFI_MEMORY_SP attribute so the decision is
  kept out of the core EFI implementation. (prompted by Ard)
Merge the memregion ida into kernel/resource.c and provide a static
  inline wrappers around an exported 'struct ida memregion_ids'
  instance. (Willy)
Fix a set of compile errors in the CONFIG_EFI_FAKE_MEMMAP=n case.
  (0day)

Commit Ids:
0f847f8c0813 16993c0f0a43 199c84717612 262b45ae3ab4
33dd70752cd7 460370ab20b6 6950e31b35fd a6c7f4c6aea5
b617c5266eed c710fcc5d95a cf8741ac57ed fe3e5e65c06e

The EFI 2.8 Specification [2] introduces the EFI_MEMORY_SP ("specific
purpose") memory attribute. This attribute bit replaces the deprecated
ACPI HMAT "reservation hint" that was introduced in ACPI 6.2 and removed
in ACPI 6.3.

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
CONFIG_HMEM_REPORTING [3] facility.

In support of optionally allowing either application-exclusive and
core-kernel-mm managed access to differentiated memory, claim
EFI_MEMORY_SP ranges for exposure as device-dax instances by default.
Such instances can be directly owned / mapped by a
platform-topology-aware application. Alternatively, with the new kmem
facility [4], 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 specific-purpose memory to be made at runtime.

The patches build on the new HMAT+HMEM_REPORTING facilities merged
for v5.2-rc1. The implementation is tested with qemu emulation of HMAT
[5] plus the efi_fake_mem facility for applying the EFI_MEMORY_SP
attribute.

Target Release: 20.10
Target Kernel: 5.5

quanxian (quanxian-wang)
information type: Public → Private
quanxian (quanxian-wang)
information type: Private → Public
Changed in intel:
status: New → Fix Committed
quanxian (quanxian-wang)
Changed in intel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.