Kconfig 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. menuconfig GENERIC_PT
  3. bool "Generic Radix Page Table" if COMPILE_TEST
  4. help
  5. Generic library for building radix tree page tables.
  6. Generic PT provides a set of HW page table formats and a common
  7. set of APIs to work with them.
  8. if GENERIC_PT
  9. config DEBUG_GENERIC_PT
  10. bool "Extra debugging checks for GENERIC_PT"
  11. help
  12. Enable extra run time debugging checks for GENERIC_PT code. This
  13. incurs a runtime cost and should not be enabled for production
  14. kernels.
  15. The kunit tests require this to be enabled to get full coverage.
  16. config IOMMU_PT
  17. tristate "IOMMU Page Tables"
  18. select IOMMU_API
  19. depends on IOMMU_SUPPORT
  20. depends on GENERIC_PT
  21. help
  22. Generic library for building IOMMU page tables
  23. IOMMU_PT provides an implementation of the page table operations
  24. related to struct iommu_domain using GENERIC_PT. It provides a single
  25. implementation of the page table operations that can be shared by
  26. multiple drivers.
  27. if IOMMU_PT
  28. config IOMMU_PT_AMDV1
  29. tristate "IOMMU page table for 64-bit AMD IOMMU v1"
  30. depends on !GENERIC_ATOMIC64 # for cmpxchg64
  31. help
  32. iommu_domain implementation for the AMD v1 page table. AMDv1 is the
  33. "host" page table. It supports granular page sizes of almost every
  34. power of 2 and decodes the full 64-bit IOVA space.
  35. Selected automatically by an IOMMU driver that uses this format.
  36. config IOMMU_PT_VTDSS
  37. tristate "IOMMU page table for Intel VT-d Second Stage"
  38. depends on !GENERIC_ATOMIC64 # for cmpxchg64
  39. help
  40. iommu_domain implementation for the Intel VT-d's 64 bit 3/4/5
  41. level Second Stage page table. It is similar to the X86_64 format with
  42. 4K/2M/1G page sizes.
  43. Selected automatically by an IOMMU driver that uses this format.
  44. config IOMMU_PT_X86_64
  45. tristate "IOMMU page table for x86 64-bit, 4/5 levels"
  46. depends on !GENERIC_ATOMIC64 # for cmpxchg64
  47. help
  48. iommu_domain implementation for the x86 64-bit 4/5 level page table.
  49. It supports 4K/2M/1G page sizes and can decode a sign-extended
  50. portion of the 64-bit IOVA space.
  51. Selected automatically by an IOMMU driver that uses this format.
  52. config IOMMU_PT_KUNIT_TEST
  53. tristate "IOMMU Page Table KUnit Test" if !KUNIT_ALL_TESTS
  54. depends on KUNIT
  55. depends on IOMMU_PT_AMDV1 || !IOMMU_PT_AMDV1
  56. depends on IOMMU_PT_X86_64 || !IOMMU_PT_X86_64
  57. depends on IOMMU_PT_VTDSS || !IOMMU_PT_VTDSS
  58. default KUNIT_ALL_TESTS
  59. help
  60. Enable kunit tests for GENERIC_PT and IOMMU_PT that covers all the
  61. enabled page table formats. The test covers most of the GENERIC_PT
  62. functions provided by the page table format, as well as covering the
  63. iommu_domain related functions.
  64. endif
  65. endif