Skip to content

RFC x86: Export information about hardware memory encryption to sysfs

Martin Fernandez linux-efi platform-driver-x86 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest5 patches 14 repliesIn review
  2. v1 RFC1 patch 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Extend memblock to support memory encryptioninclude/linux/memblock.h mm/memblock.c+80 -00 replies
2/5Extend pg_data_t to hold information about memory encryptioninclude/linux/mmzone.h mm/page_alloc.c+3 -00 replies
3/5Extend e820_table to hold information about memory encryptionarch/x86/include/asm/e820/api.h arch/x86/include/asm/e820/types.h arch/x86/kernel/e820.c+33 -20 replies
4/5Mark e820_entries as crypto capable from EFI memmaparch/x86/platform/efi/efi.c+109 -00 replies
5/5Show in sysfs if a memory node is able to do memory encryptionDocumentation/ABI/testing/sysfs-devices-node arch/x86/include/asm/numa.h arch/x86/mm/numa.c +3 more+97 -21 reply

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/5] [RFC] x86: Export information about hardware memory encryption to sysfs

Show for each NUMA node the value of EFI_MEMORY_CPU_CRYPTO in its memory.

This is a serie of patches for exporting the needed information to userspace to determine if a machine is using Intel's TME or MKTME.

In a next patch I'm going to export if TME/MKTME is activated by the BIOS to sysfs, since right now for the user, this information is only available in the kernel logs, and it's not appropriate for fwupd to scan the boot logs just to parse an integer. I'm looking for suggestions for where to store this value.

Changelog v2:

The value shown in each node now only corresponds to memory in that node in particular

Martin Fernandez (5):
Extend memblock to support memory encryption
Extend pg_data_t to hold information about memory encryption Extend e820_table to hold information about memory encryption Mark e820_entries as crypto capable from EFI memmap Show in sysfs if a memory node is able to do memory encryption

 Documentation/ABI/testing/sysfs-devices-node |  12 +++
 arch/x86/include/asm/e820/api.h              |   2 +
 arch/x86/include/asm/e820/types.h            |   1 +
 arch/x86/include/asm/numa.h                  |   7 ++
 arch/x86/kernel/e820.c                       |  32 +++++-
 arch/x86/mm/numa.c                           |   5 +
 arch/x86/mm/numa_emulation.c                 |   2 +-
 arch/x86/platform/efi/efi.c                  | 108 +++++++++++++++++++
 drivers/base/node.c                          |  72 ++++++++++++-
 include/linux/memblock.h                     |   6 ++
 include/linux/mmzone.h                       |   2 +
 include/linux/node.h                         |   1 +
 mm/memblock.c                                |  74 +++++++++++++
 mm/page_alloc.c                              |   1 +
 14 files changed, 321 insertions(+), 4 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-devices-node

base-commit: 3906fe9bb7f1a2c8667ae54e967dc8690824f4ea --
2.30.2