Kconfig 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. menuconfig LIBNVDIMM
  3. tristate "NVDIMM (Non-Volatile Memory Device) Support"
  4. depends on PHYS_ADDR_T_64BIT
  5. depends on HAS_IOMEM
  6. depends on BLK_DEV
  7. select MEMREGION
  8. help
  9. Generic support for non-volatile memory devices including
  10. ACPI-6-NFIT defined resources. On platforms that define an
  11. NFIT, or otherwise can discover NVDIMM resources, a libnvdimm
  12. bus is registered to advertise PMEM (persistent memory)
  13. namespaces (/dev/pmemX). A PMEM namespace refers to a
  14. memory resource that may span multiple DIMMs and support DAX
  15. (see CONFIG_DAX).
  16. if LIBNVDIMM
  17. config BLK_DEV_PMEM
  18. tristate "PMEM: Persistent memory block device support"
  19. default LIBNVDIMM
  20. select DAX
  21. select ND_BTT if BTT
  22. select ND_PFN if NVDIMM_PFN
  23. help
  24. Memory ranges for PMEM are described by either an NFIT
  25. (NVDIMM Firmware Interface Table, see CONFIG_ACPI_NFIT), a
  26. non-standard OEM-specific E820 memory type (type-12, see
  27. CONFIG_X86_PMEM_LEGACY), or it is manually specified by the
  28. 'memmap=nn[KMG]!ss[KMG]' kernel command line (see
  29. Documentation/admin-guide/kernel-parameters.rst). This driver converts
  30. these persistent memory ranges into block devices that are
  31. capable of DAX (direct-access) file system mappings. See
  32. Documentation/driver-api/nvdimm/nvdimm.rst for more details.
  33. Say Y if you want to use an NVDIMM
  34. config ND_CLAIM
  35. bool
  36. config ND_BTT
  37. tristate
  38. config BTT
  39. bool "BTT: Block Translation Table (atomic sector updates)"
  40. default y if LIBNVDIMM
  41. select ND_CLAIM
  42. help
  43. The Block Translation Table (BTT) provides atomic sector
  44. update semantics for persistent memory devices, so that
  45. applications that rely on sector writes not being torn (a
  46. guarantee that typical disks provide) can continue to do so.
  47. The BTT manifests itself as an alternate personality for an
  48. NVDIMM namespace, i.e. a namespace can be in raw mode pmemX,
  49. or 'sectored' mode.
  50. Select Y if unsure
  51. config ND_PFN
  52. tristate
  53. config NVDIMM_PFN
  54. bool "PFN: Map persistent (device) memory"
  55. default LIBNVDIMM
  56. depends on ZONE_DEVICE
  57. select ND_CLAIM
  58. help
  59. Map persistent memory, i.e. advertise it to the memory
  60. management sub-system. By default persistent memory does
  61. not support direct I/O, RDMA, or any other usage that
  62. requires a 'struct page' to mediate an I/O request. This
  63. driver allocates and initializes the infrastructure needed
  64. to support those use cases.
  65. Select Y if unsure
  66. config NVDIMM_DAX
  67. bool "NVDIMM DAX: Raw access to persistent memory"
  68. default LIBNVDIMM
  69. depends on NVDIMM_PFN
  70. help
  71. Support raw device dax access to a persistent memory
  72. namespace. For environments that want to hard partition
  73. persistent memory, this capability provides a mechanism to
  74. sub-divide a namespace into character devices that can only be
  75. accessed via DAX (mmap(2)).
  76. Select Y if unsure
  77. config OF_PMEM
  78. tristate "Device-tree support for persistent memory regions"
  79. depends on OF
  80. default LIBNVDIMM
  81. help
  82. Allows regions of persistent memory to be described in the
  83. device-tree.
  84. Select Y if unsure.
  85. config RAMDAX
  86. tristate "Support persistent memory interfaces on RAM carveouts"
  87. depends on X86_PMEM_LEGACY || OF || COMPILE_TEST
  88. default LIBNVDIMM
  89. help
  90. Allows creation of DAX devices on RAM carveouts.
  91. Memory ranges that are manually specified by the
  92. 'memmap=nn[KMG]!ss[KMG]' kernel command line or defined by dummy
  93. pmem-region device tree nodes would be managed by this driver as DIMM
  94. devices with support for dynamic layout of namespaces.
  95. The driver steals 128K in the end of the memmap range for the
  96. namespace management. This allows supporting up to 509 namespaces
  97. (see 'ndctl create-namespace --help').
  98. The driver should be force bound to e820_pmem or pmem-region platform
  99. devices using 'driver_override' device attribute.
  100. Select N if unsure.
  101. config NVDIMM_KEYS
  102. def_bool y
  103. depends on ENCRYPTED_KEYS
  104. depends on (LIBNVDIMM=ENCRYPTED_KEYS) || LIBNVDIMM=m
  105. config NVDIMM_KMSAN
  106. bool
  107. depends on KMSAN
  108. help
  109. KMSAN, and other memory debug facilities, increase the size of
  110. 'struct page' to contain extra metadata. This collides with
  111. the NVDIMM capability to store a potentially
  112. larger-than-"System RAM" size 'struct page' array in a
  113. reservation of persistent memory rather than limited /
  114. precious DRAM. However, that reservation needs to persist for
  115. the life of the given NVDIMM namespace. If you are using KMSAN
  116. to debug an issue unrelated to NVDIMMs or DAX then say N to this
  117. option. Otherwise, say Y but understand that any namespaces
  118. (with the page array stored pmem) created with this build of
  119. the kernel will permanently reserve and strand excess
  120. capacity compared to the CONFIG_KMSAN=n case.
  121. Select N if unsure.
  122. config NVDIMM_TEST_BUILD
  123. tristate "Build the unit test core"
  124. depends on m
  125. depends on COMPILE_TEST && X86_64
  126. default m if COMPILE_TEST
  127. help
  128. Build the core of the unit test infrastructure. The result of
  129. this build is non-functional for unit test execution, but it
  130. otherwise helps catch build errors induced by changes to the
  131. core devm_memremap_pages() implementation and other
  132. infrastructure.
  133. config NVDIMM_SECURITY_TEST
  134. bool "Enable NVDIMM security unit tests"
  135. depends on NVDIMM_KEYS
  136. help
  137. The NVDIMM and CXL subsystems support unit testing of their device
  138. security state machines. The NVDIMM_SECURITY_TEST option disables CPU
  139. cache maintenance operations around events like secure erase and
  140. overwrite. Also, when enabled, the NVDIMM subsystem core helps the unit
  141. test implement a mock state machine.
  142. Select N if unsure.
  143. endif