Kconfig 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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_NFIT_ACPI), 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 NVDIMM_KEYS
  86. def_bool y
  87. depends on ENCRYPTED_KEYS
  88. depends on (LIBNVDIMM=ENCRYPTED_KEYS) || LIBNVDIMM=m
  89. config NVDIMM_KMSAN
  90. bool
  91. depends on KMSAN
  92. help
  93. KMSAN, and other memory debug facilities, increase the size of
  94. 'struct page' to contain extra metadata. This collides with
  95. the NVDIMM capability to store a potentially
  96. larger-than-"System RAM" size 'struct page' array in a
  97. reservation of persistent memory rather than limited /
  98. precious DRAM. However, that reservation needs to persist for
  99. the life of the given NVDIMM namespace. If you are using KMSAN
  100. to debug an issue unrelated to NVDIMMs or DAX then say N to this
  101. option. Otherwise, say Y but understand that any namespaces
  102. (with the page array stored pmem) created with this build of
  103. the kernel will permanently reserve and strand excess
  104. capacity compared to the CONFIG_KMSAN=n case.
  105. Select N if unsure.
  106. config NVDIMM_TEST_BUILD
  107. tristate "Build the unit test core"
  108. depends on m
  109. depends on COMPILE_TEST && X86_64
  110. default m if COMPILE_TEST
  111. help
  112. Build the core of the unit test infrastructure. The result of
  113. this build is non-functional for unit test execution, but it
  114. otherwise helps catch build errors induced by changes to the
  115. core devm_memremap_pages() implementation and other
  116. infrastructure.
  117. endif