Linux kernel version 5.1 brings in support for the volatile-use of persistent memory as a hotplugged memory region (KMEM DAX). When this feature is enabled, persistent memory can be seen as a separate memory-only NUMA node(s). This newly-added memory can be selected by its unique NUMA node.
Add 'target-node' option for 'nvdimm' device to indicate this NUMA node. It can be extended to a new node after all existing NUMA nodes. Changelog: v2: - Per Igor's comments, adjust target node error handling, and make both 'node' and 'target-node' properties mutually exclusive. Create a callback of nvdimm_pre_plug() for checking whether the 'target-node' is correct. v1: - It's the initial version. Jingqi Liu (1): nvdimm: add 'target-node' option docs/nvdimm.txt | 93 +++++++++++++++++++++++++++++++++++++++++ hw/acpi/nvdimm.c | 18 ++++---- hw/i386/acpi-build.c | 12 +++++- hw/i386/pc.c | 4 ++ hw/mem/nvdimm.c | 43 ++++++++++++++++++- include/hw/mem/nvdimm.h | 17 +++++++- util/nvdimm-utils.c | 22 ++++++++++ 7 files changed, 198 insertions(+), 11 deletions(-) -- 2.21.3