Kconfig 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. menuconfig CXL_BUS
  3. tristate "CXL (Compute Express Link) Devices Support"
  4. depends on PCI
  5. select FW_LOADER
  6. select FW_UPLOAD
  7. select PCI_DOE
  8. select FIRMWARE_TABLE
  9. select NUMA_KEEP_MEMINFO if NUMA_MEMBLKS
  10. help
  11. CXL is a bus that is electrically compatible with PCI Express, but
  12. layers three protocols on that signalling (CXL.io, CXL.cache, and
  13. CXL.mem). The CXL.cache protocol allows devices to hold cachelines
  14. locally, the CXL.mem protocol allows devices to be fully coherent
  15. memory targets, the CXL.io protocol is equivalent to PCI Express.
  16. Say 'y' to enable support for the configuration and management of
  17. devices supporting these protocols.
  18. if CXL_BUS
  19. config CXL_PCI
  20. tristate "PCI manageability"
  21. default CXL_BUS
  22. help
  23. The CXL specification defines a "CXL memory device" sub-class in the
  24. PCI "memory controller" base class of devices. Device's identified by
  25. this class code provide support for volatile and / or persistent
  26. memory to be mapped into the system address map (Host-managed Device
  27. Memory (HDM)).
  28. Say 'y/m' to enable a driver that will attach to CXL memory expander
  29. devices enumerated by the memory device class code for configuration
  30. and management primarily via the mailbox interface. See Chapter 2.3
  31. Type 3 CXL Device in the CXL 2.0 specification for more details.
  32. If unsure say 'm'.
  33. config CXL_MEM_RAW_COMMANDS
  34. bool "RAW Command Interface for Memory Devices"
  35. depends on CXL_PCI
  36. help
  37. Enable CXL RAW command interface.
  38. The CXL driver ioctl interface may assign a kernel ioctl command
  39. number for each specification defined opcode. At any given point in
  40. time the number of opcodes that the specification defines and a device
  41. may implement may exceed the kernel's set of associated ioctl function
  42. numbers. The mismatch is either by omission, specification is too new,
  43. or by design. When prototyping new hardware, or developing / debugging
  44. the driver it is useful to be able to submit any possible command to
  45. the hardware, even commands that may crash the kernel due to their
  46. potential impact to memory currently in use by the kernel.
  47. If developing CXL hardware or the driver say Y, otherwise say N.
  48. config CXL_ACPI
  49. tristate "CXL ACPI: Platform Support"
  50. depends on ACPI
  51. depends on ACPI_NUMA
  52. default CXL_BUS
  53. select ACPI_TABLE_LIB
  54. select ACPI_HMAT
  55. select CXL_PORT
  56. help
  57. Enable support for host managed device memory (HDM) resources
  58. published by a platform's ACPI CXL memory layout description. See
  59. Chapter 9.14.1 CXL Early Discovery Table (CEDT) in the CXL 2.0
  60. specification, and CXL Fixed Memory Window Structures (CEDT.CFMWS)
  61. (https://www.computeexpresslink.org/spec-landing). The CXL core
  62. consumes these resource to publish the root of a cxl_port decode
  63. hierarchy to map regions that represent System RAM, or Persistent
  64. Memory regions to be managed by LIBNVDIMM.
  65. If unsure say 'm'.
  66. config CXL_PMEM
  67. tristate "CXL PMEM: Persistent Memory Support"
  68. depends on LIBNVDIMM
  69. default CXL_BUS
  70. help
  71. In addition to typical memory resources a platform may also advertise
  72. support for persistent memory attached via CXL. This support is
  73. managed via a bridge driver from CXL to the LIBNVDIMM system
  74. subsystem. Say 'y/m' to enable support for enumerating and
  75. provisioning the persistent memory capacity of CXL memory expanders.
  76. If unsure say 'm'.
  77. config CXL_MEM
  78. tristate "CXL: Memory Expansion"
  79. depends on CXL_PCI
  80. default CXL_BUS
  81. help
  82. The CXL.mem protocol allows a device to act as a provider of "System
  83. RAM" and/or "Persistent Memory" that is fully coherent as if the
  84. memory were attached to the typical CPU memory controller. This is
  85. known as HDM "Host-managed Device Memory".
  86. Say 'y/m' to enable a driver that will attach to CXL.mem devices for
  87. memory expansion and control of HDM. See Chapter 9.13 in the CXL 2.0
  88. specification for a detailed description of HDM.
  89. If unsure say 'm'.
  90. config CXL_PORT
  91. default CXL_BUS
  92. tristate
  93. config CXL_SUSPEND
  94. def_bool y
  95. depends on SUSPEND && CXL_MEM
  96. config CXL_REGION
  97. bool "CXL: Region Support"
  98. default CXL_BUS
  99. # For MAX_PHYSMEM_BITS
  100. depends on SPARSEMEM
  101. select MEMREGION
  102. select GET_FREE_REGION
  103. help
  104. Enable the CXL core to enumerate and provision CXL regions. A CXL
  105. region is defined by one or more CXL expanders that decode a given
  106. system-physical address range. For CXL regions established by
  107. platform-firmware this option enables memory error handling to
  108. identify the devices participating in a given interleaved memory
  109. range. Otherwise, platform-firmware managed CXL is enabled by being
  110. placed in the system address map and does not need a driver.
  111. If unsure say 'y'
  112. config CXL_REGION_INVALIDATION_TEST
  113. bool "CXL: Region Cache Management Bypass (TEST)"
  114. depends on CXL_REGION
  115. help
  116. CXL Region management and security operations potentially invalidate
  117. the content of CPU caches without notifying those caches to
  118. invalidate the affected cachelines. The CXL Region driver attempts
  119. to invalidate caches when those events occur. If that invalidation
  120. fails the region will fail to enable. Reasons for cache
  121. invalidation failure are due to the CPU not providing a cache
  122. invalidation mechanism. For example usage of wbinvd is restricted to
  123. bare metal x86. However, for testing purposes toggling this option
  124. can disable that data integrity safety and proceed with enabling
  125. regions when there might be conflicting contents in the CPU cache.
  126. If unsure, or if this kernel is meant for production environments,
  127. say N.
  128. endif