1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 27b6be844SDan Williamsmenuconfig DAX 3ab68f262SDan Williams tristate "DAX: direct access to differentiated memory" 47b6be844SDan Williams default m if NVDIMM_DAX 57b6be844SDan Williams 67b6be844SDan Williamsif DAX 77b6be844SDan Williams 87b6be844SDan Williamsconfig DEV_DAX 97b6be844SDan Williams tristate "Device DAX: direct access mapping device" 107b6be844SDan Williams depends on TRANSPARENT_HUGEPAGE 11ab68f262SDan Williams help 12ab68f262SDan Williams Support raw access to differentiated (persistence, bandwidth, 13ab68f262SDan Williams latency...) memory via an mmap(2) capable character 14ab68f262SDan Williams device. Platform firmware or a device driver may identify a 15ab68f262SDan Williams platform memory resource that is differentiated from the 16ab68f262SDan Williams baseline memory pool. Mappings of a /dev/daxX.Y device impose 17ab68f262SDan Williams restrictions that make the mapping behavior deterministic. 18ab68f262SDan Williams 19ab68f262SDan Williamsconfig DEV_DAX_PMEM 20ab68f262SDan Williams tristate "PMEM DAX: direct access to persistent memory" 2174d71a01SMike Galbraith depends on LIBNVDIMM && NVDIMM_DAX && DEV_DAX 22ab68f262SDan Williams default DEV_DAX 23ab68f262SDan Williams help 24ab68f262SDan Williams Support raw access to persistent memory. Note that this 25ab68f262SDan Williams driver consumes memory ranges allocated and exported by the 26ab68f262SDan Williams libnvdimm sub-system. 27ab68f262SDan Williams 28730926c3SDan Williams Say M if unsure 29730926c3SDan Williams 30a6c7f4c6SDan Williamsconfig DEV_DAX_HMEM 31a6c7f4c6SDan Williams tristate "HMEM DAX: direct access to 'specific purpose' memory" 32a6c7f4c6SDan Williams depends on EFI_SOFT_RESERVE 331b5695b0SMike Rapoport (Microsoft) select NUMA_KEEP_MEMINFO if NUMA_MEMBLKS 34a6c7f4c6SDan Williams default DEV_DAX 35*1eaef15bSDan Williams depends on CXL_ACPI || !CXL_ACPI 36*1eaef15bSDan Williams depends on CXL_PCI || !CXL_PCI 37*1eaef15bSDan Williams depends on CXL_BUS || !CXL_BUS 38a6c7f4c6SDan Williams help 39a6c7f4c6SDan Williams EFI 2.8 platforms, and others, may advertise 'specific purpose' 40a6c7f4c6SDan Williams memory. For example, a high bandwidth memory pool. The 41a6c7f4c6SDan Williams indication from platform firmware is meant to reserve the 42a6c7f4c6SDan Williams memory from typical usage by default. This driver creates 43a6c7f4c6SDan Williams device-dax instances for these memory ranges, and that also 44a6c7f4c6SDan Williams enables the possibility to assign them to the DEV_DAX_KMEM 45a6c7f4c6SDan Williams driver to override the reservation and add them to kernel 46a6c7f4c6SDan Williams "System RAM" pool. 47a6c7f4c6SDan Williams 48a6c7f4c6SDan Williams Say M if unsure. 49a6c7f4c6SDan Williams 5009d09e04SDan Williamsconfig DEV_DAX_CXL 5109d09e04SDan Williams tristate "CXL DAX: direct access to CXL RAM regions" 520c16c83eSArnd Bergmann depends on CXL_BUS && CXL_REGION && DEV_DAX 5309d09e04SDan Williams default CXL_REGION && DEV_DAX 54*1eaef15bSDan Williams depends on DEV_DAX_HMEM || !DEV_DAX_HMEM 5509d09e04SDan Williams help 5609d09e04SDan Williams CXL RAM regions are either mapped by platform-firmware 5709d09e04SDan Williams and published in the initial system-memory map as "System RAM", mapped 5809d09e04SDan Williams by platform-firmware as "Soft Reserved", or dynamically provisioned 5909d09e04SDan Williams after boot by the CXL driver. In the latter two cases a device-dax 6009d09e04SDan Williams instance is created to access that unmapped-by-default address range. 6109d09e04SDan Williams Per usual it can remain as dedicated access via a device interface, or 6209d09e04SDan Williams converted to "System RAM" via the dax_kmem facility. 6309d09e04SDan Williams 64c01044ccSDan Williamsconfig DEV_DAX_HMEM_DEVICES 657dab174eSDan Williams depends on DEV_DAX_HMEM && DAX 66c01044ccSDan Williams def_bool y 67c01044ccSDan Williams 68d5406bd4SJohn Grovesconfig DEV_DAX_FSDEV 69d5406bd4SJohn Groves tristate 70d5406bd4SJohn Groves depends on DEV_DAX && FS_DAX 71d5406bd4SJohn Groves default DEV_DAX 72d5406bd4SJohn Groves 73c221c0b0SDave Hansenconfig DEV_DAX_KMEM 74e9ee9fe3SDan Williams tristate "KMEM DAX: map dax-devices as System-RAM" 75c221c0b0SDave Hansen default DEV_DAX 76c221c0b0SDave Hansen depends on DEV_DAX 77c221c0b0SDave Hansen depends on MEMORY_HOTPLUG # for add_memory() and friends 78c221c0b0SDave Hansen help 79a6c7f4c6SDan Williams Support access to persistent, or other performance 80a6c7f4c6SDan Williams differentiated memory as if it were System RAM. This allows 81a6c7f4c6SDan Williams easier use of persistent memory by unmodified applications, or 82a6c7f4c6SDan Williams adds core kernel memory services to heterogeneous memory types 83a6c7f4c6SDan Williams (HMEM) marked "reserved" by platform firmware. 84c221c0b0SDave Hansen 85c221c0b0SDave Hansen To use this feature, a DAX device must be unbound from the 86a6c7f4c6SDan Williams device_dax driver and bound to this kmem driver on each boot. 87c221c0b0SDave Hansen 88c221c0b0SDave Hansen Say N if unsure. 89c221c0b0SDave Hansen 90ab68f262SDan Williamsendif 91