Skip to content

Commit ab65ba5

Browse files
snitsjoergroedel
authored andcommitted
iommu/vt-d: Move Kconfig and Makefile bits down into intel directory
Move Intel Kconfig and Makefile bits down into intel directory with the rest of the Intel specific files. Signed-off-by: Jerry Snitselaar <[email protected]> Reviewed-by: Lu Baolu <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Lu Baolu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent f34ce7a commit ab65ba5

File tree

4 files changed

+96
-91
lines changed

4 files changed

+96
-91
lines changed

drivers/iommu/Kconfig

Lines changed: 1 addition & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -172,91 +172,7 @@ config AMD_IOMMU_DEBUGFS
172172
This option is -NOT- intended for production environments, and should
173173
not generally be enabled.
174174

175-
# Intel IOMMU support
176-
config DMAR_TABLE
177-
bool
178-
179-
config INTEL_IOMMU
180-
bool "Support for Intel IOMMU using DMA Remapping Devices"
181-
depends on PCI_MSI && ACPI && (X86 || IA64)
182-
select IOMMU_API
183-
select IOMMU_IOVA
184-
select NEED_DMA_MAP_STATE
185-
select DMAR_TABLE
186-
select SWIOTLB
187-
select IOASID
188-
help
189-
DMA remapping (DMAR) devices support enables independent address
190-
translations for Direct Memory Access (DMA) from devices.
191-
These DMA remapping devices are reported via ACPI tables
192-
and include PCI device scope covered by these DMA
193-
remapping devices.
194-
195-
config INTEL_IOMMU_DEBUGFS
196-
bool "Export Intel IOMMU internals in Debugfs"
197-
depends on INTEL_IOMMU && IOMMU_DEBUGFS
198-
help
199-
!!!WARNING!!!
200-
201-
DO NOT ENABLE THIS OPTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!!!
202-
203-
Expose Intel IOMMU internals in Debugfs.
204-
205-
This option is -NOT- intended for production environments, and should
206-
only be enabled for debugging Intel IOMMU.
207-
208-
config INTEL_IOMMU_SVM
209-
bool "Support for Shared Virtual Memory with Intel IOMMU"
210-
depends on INTEL_IOMMU && X86_64
211-
select PCI_PASID
212-
select PCI_PRI
213-
select MMU_NOTIFIER
214-
select IOASID
215-
help
216-
Shared Virtual Memory (SVM) provides a facility for devices
217-
to access DMA resources through process address space by
218-
means of a Process Address Space ID (PASID).
219-
220-
config INTEL_IOMMU_DEFAULT_ON
221-
def_bool y
222-
prompt "Enable Intel DMA Remapping Devices by default"
223-
depends on INTEL_IOMMU
224-
help
225-
Selecting this option will enable a DMAR device at boot time if
226-
one is found. If this option is not selected, DMAR support can
227-
be enabled by passing intel_iommu=on to the kernel.
228-
229-
config INTEL_IOMMU_BROKEN_GFX_WA
230-
bool "Workaround broken graphics drivers (going away soon)"
231-
depends on INTEL_IOMMU && BROKEN && X86
232-
help
233-
Current Graphics drivers tend to use physical address
234-
for DMA and avoid using DMA APIs. Setting this config
235-
option permits the IOMMU driver to set a unity map for
236-
all the OS-visible memory. Hence the driver can continue
237-
to use physical addresses for DMA, at least until this
238-
option is removed in the 2.6.32 kernel.
239-
240-
config INTEL_IOMMU_FLOPPY_WA
241-
def_bool y
242-
depends on INTEL_IOMMU && X86
243-
help
244-
Floppy disk drivers are known to bypass DMA API calls
245-
thereby failing to work when IOMMU is enabled. This
246-
workaround will setup a 1:1 mapping for the first
247-
16MiB to make floppy (an ISA device) work.
248-
249-
config INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON
250-
bool "Enable Intel IOMMU scalable mode by default"
251-
depends on INTEL_IOMMU
252-
help
253-
Selecting this option will enable by default the scalable mode if
254-
hardware presents the capability. The scalable mode is defined in
255-
VT-d 3.0. The scalable mode capability could be checked by reading
256-
/sys/devices/virtual/iommu/dmar*/intel-iommu/ecap. If this option
257-
is not selected, scalable mode support could also be enabled by
258-
passing intel_iommu=sm_on to the kernel. If not sure, please use
259-
the default value.
175+
source "drivers/iommu/intel/Kconfig"
260176

261177
config IRQ_REMAP
262178
bool "Support for Interrupt Remapping"

drivers/iommu/Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0
2+
obj-y += intel/
23
obj-$(CONFIG_IOMMU_API) += iommu.o
34
obj-$(CONFIG_IOMMU_API) += iommu-traces.o
45
obj-$(CONFIG_IOMMU_API) += iommu-sysfs.o
@@ -17,13 +18,8 @@ obj-$(CONFIG_AMD_IOMMU_V2) += amd/iommu_v2.o
1718
obj-$(CONFIG_ARM_SMMU) += arm_smmu.o
1819
arm_smmu-objs += arm-smmu.o arm-smmu-impl.o arm-smmu-qcom.o
1920
obj-$(CONFIG_ARM_SMMU_V3) += arm-smmu-v3.o
20-
obj-$(CONFIG_DMAR_TABLE) += intel/dmar.o
21-
obj-$(CONFIG_INTEL_IOMMU) += intel/iommu.o intel/pasid.o
22-
obj-$(CONFIG_INTEL_IOMMU) += intel/trace.o
23-
obj-$(CONFIG_INTEL_IOMMU_DEBUGFS) += intel/debugfs.o
24-
obj-$(CONFIG_INTEL_IOMMU_SVM) += intel/svm.o
2521
obj-$(CONFIG_IPMMU_VMSA) += ipmmu-vmsa.o
26-
obj-$(CONFIG_IRQ_REMAP) += intel/irq_remapping.o irq_remapping.o
22+
obj-$(CONFIG_IRQ_REMAP) += irq_remapping.o
2723
obj-$(CONFIG_MTK_IOMMU) += mtk_iommu.o
2824
obj-$(CONFIG_MTK_IOMMU_V1) += mtk_iommu_v1.o
2925
obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o

drivers/iommu/intel/Kconfig

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
# Intel IOMMU support
3+
config DMAR_TABLE
4+
bool
5+
6+
config INTEL_IOMMU
7+
bool "Support for Intel IOMMU using DMA Remapping Devices"
8+
depends on PCI_MSI && ACPI && (X86 || IA64)
9+
select IOMMU_API
10+
select IOMMU_IOVA
11+
select NEED_DMA_MAP_STATE
12+
select DMAR_TABLE
13+
select SWIOTLB
14+
select IOASID
15+
help
16+
DMA remapping (DMAR) devices support enables independent address
17+
translations for Direct Memory Access (DMA) from devices.
18+
These DMA remapping devices are reported via ACPI tables
19+
and include PCI device scope covered by these DMA
20+
remapping devices.
21+
22+
config INTEL_IOMMU_DEBUGFS
23+
bool "Export Intel IOMMU internals in Debugfs"
24+
depends on INTEL_IOMMU && IOMMU_DEBUGFS
25+
help
26+
!!!WARNING!!!
27+
28+
DO NOT ENABLE THIS OPTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!!!
29+
30+
Expose Intel IOMMU internals in Debugfs.
31+
32+
This option is -NOT- intended for production environments, and should
33+
only be enabled for debugging Intel IOMMU.
34+
35+
config INTEL_IOMMU_SVM
36+
bool "Support for Shared Virtual Memory with Intel IOMMU"
37+
depends on INTEL_IOMMU && X86_64
38+
select PCI_PASID
39+
select PCI_PRI
40+
select MMU_NOTIFIER
41+
select IOASID
42+
help
43+
Shared Virtual Memory (SVM) provides a facility for devices
44+
to access DMA resources through process address space by
45+
means of a Process Address Space ID (PASID).
46+
47+
config INTEL_IOMMU_DEFAULT_ON
48+
def_bool y
49+
prompt "Enable Intel DMA Remapping Devices by default"
50+
depends on INTEL_IOMMU
51+
help
52+
Selecting this option will enable a DMAR device at boot time if
53+
one is found. If this option is not selected, DMAR support can
54+
be enabled by passing intel_iommu=on to the kernel.
55+
56+
config INTEL_IOMMU_BROKEN_GFX_WA
57+
bool "Workaround broken graphics drivers (going away soon)"
58+
depends on INTEL_IOMMU && BROKEN && X86
59+
help
60+
Current Graphics drivers tend to use physical address
61+
for DMA and avoid using DMA APIs. Setting this config
62+
option permits the IOMMU driver to set a unity map for
63+
all the OS-visible memory. Hence the driver can continue
64+
to use physical addresses for DMA, at least until this
65+
option is removed in the 2.6.32 kernel.
66+
67+
config INTEL_IOMMU_FLOPPY_WA
68+
def_bool y
69+
depends on INTEL_IOMMU && X86
70+
help
71+
Floppy disk drivers are known to bypass DMA API calls
72+
thereby failing to work when IOMMU is enabled. This
73+
workaround will setup a 1:1 mapping for the first
74+
16MiB to make floppy (an ISA device) work.
75+
76+
config INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON
77+
bool "Enable Intel IOMMU scalable mode by default"
78+
depends on INTEL_IOMMU
79+
help
80+
Selecting this option will enable by default the scalable mode if
81+
hardware presents the capability. The scalable mode is defined in
82+
VT-d 3.0. The scalable mode capability could be checked by reading
83+
/sys/devices/virtual/iommu/dmar*/intel-iommu/ecap. If this option
84+
is not selected, scalable mode support could also be enabled by
85+
passing intel_iommu=sm_on to the kernel. If not sure, please use
86+
the default value.

drivers/iommu/intel/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
obj-$(CONFIG_DMAR_TABLE) += dmar.o
3+
obj-$(CONFIG_INTEL_IOMMU) += iommu.o pasid.o
4+
obj-$(CONFIG_INTEL_IOMMU) += trace.o
5+
obj-$(CONFIG_INTEL_IOMMU_DEBUGFS) += debugfs.o
6+
obj-$(CONFIG_INTEL_IOMMU_SVM) += svm.o
7+
obj-$(CONFIG_IRQ_REMAP) += irq_remapping.o

0 commit comments

Comments
 (0)