xref: /linux/drivers/dax/Kconfig (revision 5ea5880764cbb164afb17a62e76ca75dc371409d)
1# SPDX-License-Identifier: GPL-2.0-only
2menuconfig DAX
3	tristate "DAX: direct access to differentiated memory"
4	default m if NVDIMM_DAX
5
6if DAX
7
8config DEV_DAX
9	tristate "Device DAX: direct access mapping device"
10	depends on TRANSPARENT_HUGEPAGE
11	help
12	  Support raw access to differentiated (persistence, bandwidth,
13	  latency...) memory via an mmap(2) capable character
14	  device.  Platform firmware or a device driver may identify a
15	  platform memory resource that is differentiated from the
16	  baseline memory pool.  Mappings of a /dev/daxX.Y device impose
17	  restrictions that make the mapping behavior deterministic.
18
19config DEV_DAX_PMEM
20	tristate "PMEM DAX: direct access to persistent memory"
21	depends on LIBNVDIMM && NVDIMM_DAX && DEV_DAX
22	default DEV_DAX
23	help
24	  Support raw access to persistent memory.  Note that this
25	  driver consumes memory ranges allocated and exported by the
26	  libnvdimm sub-system.
27
28	  Say M if unsure
29
30config DEV_DAX_HMEM
31	tristate "HMEM DAX: direct access to 'specific purpose' memory"
32	depends on EFI_SOFT_RESERVE
33	select NUMA_KEEP_MEMINFO if NUMA_MEMBLKS
34	default DEV_DAX
35	depends on CXL_ACPI || !CXL_ACPI
36	depends on CXL_PCI || !CXL_PCI
37	depends on CXL_BUS || !CXL_BUS
38	help
39	  EFI 2.8 platforms, and others, may advertise 'specific purpose'
40	  memory. For example, a high bandwidth memory pool. The
41	  indication from platform firmware is meant to reserve the
42	  memory from typical usage by default. This driver creates
43	  device-dax instances for these memory ranges, and that also
44	  enables the possibility to assign them to the DEV_DAX_KMEM
45	  driver to override the reservation and add them to kernel
46	  "System RAM" pool.
47
48	  Say M if unsure.
49
50config DEV_DAX_CXL
51	tristate "CXL DAX: direct access to CXL RAM regions"
52	depends on CXL_BUS && CXL_REGION && DEV_DAX
53	default CXL_REGION && DEV_DAX
54	depends on DEV_DAX_HMEM || !DEV_DAX_HMEM
55	help
56	  CXL RAM regions are either mapped by platform-firmware
57	  and published in the initial system-memory map as "System RAM", mapped
58	  by platform-firmware as "Soft Reserved", or dynamically provisioned
59	  after boot by the CXL driver. In the latter two cases a device-dax
60	  instance is created to access that unmapped-by-default address range.
61	  Per usual it can remain as dedicated access via a device interface, or
62	  converted to "System RAM" via the dax_kmem facility.
63
64config DEV_DAX_HMEM_DEVICES
65	depends on DEV_DAX_HMEM && DAX
66	def_bool y
67
68config DEV_DAX_KMEM
69	tristate "KMEM DAX: map dax-devices as System-RAM"
70	default DEV_DAX
71	depends on DEV_DAX
72	depends on MEMORY_HOTPLUG # for add_memory() and friends
73	help
74	  Support access to persistent, or other performance
75	  differentiated memory as if it were System RAM. This allows
76	  easier use of persistent memory by unmodified applications, or
77	  adds core kernel memory services to heterogeneous memory types
78	  (HMEM) marked "reserved" by platform firmware.
79
80	  To use this feature, a DAX device must be unbound from the
81	  device_dax driver and bound to this kmem driver on each boot.
82
83	  Say N if unsure.
84
85endif
86