Debian Codegraph @

drivers/iommu/generic_pt/Kconfig

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