summaryrefslogtreecommitdiff
path: root/drivers/iommu/generic_pt/Kconfig
blob: ce4fb478691457e1305e7982fdf220574d9de314 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# SPDX-License-Identifier: GPL-2.0-only

menuconfig GENERIC_PT
	bool "Generic Radix Page Table" if COMPILE_TEST
	help
	  Generic library for building radix tree page tables.

	  Generic PT provides a set of HW page table formats and a common
	  set of APIs to work with them.

if GENERIC_PT
config DEBUG_GENERIC_PT
	bool "Extra debugging checks for GENERIC_PT"
	help
	  Enable extra run time debugging checks for GENERIC_PT code. This
	  incurs a runtime cost and should not be enabled for production
	  kernels.

	  The kunit tests require this to be enabled to get full coverage.

config IOMMU_PT
	tristate "IOMMU Page Tables"
	select IOMMU_API
	depends on IOMMU_SUPPORT
	depends on GENERIC_PT
	help
	  Generic library for building IOMMU page tables

	  IOMMU_PT provides an implementation of the page table operations
	  related to struct iommu_domain using GENERIC_PT. It provides a single
	  implementation of the page table operations that can be shared by
	  multiple drivers.

if IOMMU_PT
config IOMMU_PT_AMDV1
	tristate "IOMMU page table for 64-bit AMD IOMMU v1"
	depends on !GENERIC_ATOMIC64 # for cmpxchg64
	help
	  iommu_domain implementation for the AMD v1 page table. AMDv1 is the
	  "host" page table. It supports granular page sizes of almost every
	  power of 2 and decodes the full 64-bit IOVA space.

	  Selected automatically by an IOMMU driver that uses this format.

config IOMMU_PT_VTDSS
       tristate "IOMMU page table for Intel VT-d Second Stage"
	depends on !GENERIC_ATOMIC64 # for cmpxchg64
	help
	  iommu_domain implementation for the Intel VT-d's 64 bit 3/4/5
	  level Second Stage page table. It is similar to the X86_64 format with
	  4K/2M/1G page sizes.

	  Selected automatically by an IOMMU driver that uses this format.

config IOMMU_PT_X86_64
	tristate "IOMMU page table for x86 64-bit, 4/5 levels"
	depends on !GENERIC_ATOMIC64 # for cmpxchg64
	help
	  iommu_domain implementation for the x86 64-bit 4/5 level page table.
	  It supports 4K/2M/1G page sizes and can decode a sign-extended
	  portion of the 64-bit IOVA space.

	  Selected automatically by an IOMMU driver that uses this format.

config IOMMU_PT_KUNIT_TEST
	tristate "IOMMU Page Table KUnit Test" if !KUNIT_ALL_TESTS
	depends on KUNIT
	depends on IOMMU_PT_AMDV1 || !IOMMU_PT_AMDV1
	depends on IOMMU_PT_X86_64 || !IOMMU_PT_X86_64
	depends on IOMMU_PT_VTDSS || !IOMMU_PT_VTDSS
	default KUNIT_ALL_TESTS
	help
	  Enable kunit tests for GENERIC_PT and IOMMU_PT that covers all the
	  enabled page table formats. The test covers most of the GENERIC_PT
	  functions provided by the page table format, as well as covering the
	  iommu_domain related functions.

endif
endif