1# SPDX-License-Identifier: GPL-2.0 2# 3# PCI configuration 4# 5 6# select this to offer the PCI prompt 7config HAVE_PCI 8 bool 9 10# select this to unconditionally force on PCI support 11config FORCE_PCI 12 bool 13 select HAVE_PCI 14 select PCI 15 16# select this to provide a generic PCI iomap, 17# without PCI itself having to be defined 18config GENERIC_PCI_IOMAP 19 bool 20 21menuconfig PCI 22 bool "PCI support" 23 depends on HAVE_PCI 24 depends on MMU 25 help 26 This option enables support for the PCI local bus, including 27 support for PCI-X and the foundations for PCI Express support. 28 Say 'Y' here unless you know what you are doing. 29 30if PCI 31 32config PCI_DOMAINS 33 bool 34 depends on PCI 35 36config PCI_DOMAINS_GENERIC 37 bool 38 select PCI_DOMAINS 39 40config PCI_SYSCALL 41 bool 42 43source "drivers/pci/pcie/Kconfig" 44 45config PCI_MSI 46 bool "Message Signaled Interrupts (MSI and MSI-X)" 47 select GENERIC_MSI_IRQ 48 help 49 This allows device drivers to enable MSI (Message Signaled 50 Interrupts). Message Signaled Interrupts enable a device to 51 generate an interrupt using an inbound Memory Write on its 52 PCI bus instead of asserting a device IRQ pin. 53 54 Use of PCI MSI interrupts can be disabled at kernel boot time 55 by using the 'pci=nomsi' option. This disables MSI for the 56 entire system. 57 58 If you don't know what to do here, say Y. 59 60config PCI_MSI_ARCH_FALLBACKS 61 bool 62 63config PCI_QUIRKS 64 default y 65 bool "Enable PCI quirk workarounds" if EXPERT 66 help 67 This enables workarounds for various PCI chipset bugs/quirks. 68 Disable this only if your target machine is unaffected by PCI 69 quirks. 70 71config PCI_DEBUG 72 bool "PCI Debugging" 73 depends on DEBUG_KERNEL 74 help 75 Say Y here if you want the PCI core to produce a bunch of debug 76 messages to the system log. Select this if you are having a 77 problem with PCI support and want to see more of what is going on. 78 79 When in doubt, say N. 80 81config PCI_REALLOC_ENABLE_AUTO 82 bool "Enable PCI resource re-allocation detection" 83 depends on PCI_IOV 84 help 85 Say Y here if you want the PCI core to detect if PCI resource 86 re-allocation needs to be enabled. You can always use pci=realloc=on 87 or pci=realloc=off to override it. It will automatically 88 re-allocate PCI resources if SR-IOV BARs have not been allocated by 89 the BIOS. 90 91 When in doubt, say N. 92 93config PCI_STUB 94 tristate "PCI Stub driver" 95 help 96 Say Y or M here if you want be able to reserve a PCI device 97 when it is going to be assigned to a guest operating system. 98 99 When in doubt, say N. 100 101config PCI_PF_STUB 102 tristate "PCI PF Stub driver" 103 depends on PCI_IOV 104 help 105 Say Y or M here if you want to enable support for devices that 106 require SR-IOV support, while at the same time the PF (Physical 107 Function) itself is not providing any actual services on the 108 host itself such as storage or networking. 109 110 When in doubt, say N. 111 112config XEN_PCIDEV_FRONTEND 113 tristate "Xen PCI Frontend" 114 depends on XEN_PV 115 select PCI_XEN 116 select XEN_XENBUS_FRONTEND 117 default y 118 help 119 The PCI device frontend driver allows the kernel to import arbitrary 120 PCI devices from a PCI backend to support PCI driver domains. 121 122config PCI_ATS 123 bool 124 125config PCI_DOE 126 bool "Enable PCI Data Object Exchange (DOE) support" 127 help 128 Say Y here if you want be able to communicate with PCIe DOE 129 mailboxes. 130 131config PCI_ECAM 132 bool 133 134config PCI_LOCKLESS_CONFIG 135 bool 136 137config PCI_BRIDGE_EMUL 138 bool 139 140config PCI_IOV 141 bool "PCI IOV support" 142 select PCI_ATS 143 help 144 I/O Virtualization is a PCI feature supported by some devices 145 which allows them to create virtual devices which share their 146 physical resources. 147 148 If unsure, say N. 149 150config PCI_NPEM 151 bool "Native PCIe Enclosure Management" 152 depends on LEDS_CLASS=y 153 help 154 Support for Native PCIe Enclosure Management. It allows managing LED 155 indications in storage enclosures. Enclosure must support following 156 indications: OK, Locate, Fail, Rebuild, other indications are 157 optional. 158 159config PCI_PRI 160 bool "PCI PRI support" 161 select PCI_ATS 162 help 163 PRI is the PCI Page Request Interface. It allows PCI devices that are 164 behind an IOMMU to recover from page faults. 165 166 If unsure, say N. 167 168config PCI_PASID 169 bool "PCI PASID support" 170 select PCI_ATS 171 help 172 Process Address Space Identifiers (PASIDs) can be used by PCI devices 173 to access more than one IO address space at the same time. To make 174 use of this feature an IOMMU is required which also supports PASIDs. 175 Select this option if you have such an IOMMU and want to compile the 176 driver for it into your kernel. 177 178 If unsure, say N. 179 180config PCIE_TPH 181 bool "TLP Processing Hints" 182 help 183 This option adds support for PCIe TLP Processing Hints (TPH). 184 TPH allows endpoint devices to provide optimization hints, such as 185 desired caching behavior, for requests that target memory space. 186 These hints, called Steering Tags, can empower the system hardware 187 to optimize the utilization of platform resources. 188 189config PCI_P2PDMA 190 bool "PCI peer-to-peer transfer support" 191 depends on ZONE_DEVICE 192 # 193 # The need for the scatterlist DMA bus address flag means PCI P2PDMA 194 # requires 64bit 195 # 196 depends on 64BIT 197 select GENERIC_ALLOCATOR 198 select NEED_SG_DMA_FLAGS 199 help 200 Enables drivers to do PCI peer-to-peer transactions to and from 201 BARs that are exposed in other devices that are the part of 202 the hierarchy where peer-to-peer DMA is guaranteed by the PCI 203 specification to work (ie. anything below a single PCI bridge). 204 205 Many PCIe root complexes do not support P2P transactions and 206 it's hard to tell which support it at all, so at this time, 207 P2P DMA transactions must be between devices behind the same root 208 port. 209 210 Enabling this option will reduce the entropy of x86 KASLR memory 211 regions. For example - on a 46 bit system, the entropy goes down 212 from 16 bits to 15 bits. The actual reduction in entropy depends 213 on the physical address bits, on processor features, kernel config 214 (5 level page table) and physical memory present on the system. 215 216 If unsure, say N. 217 218config PCI_LABEL 219 def_bool y if (DMI || ACPI) 220 select NLS 221 222config PCI_HYPERV 223 tristate "Hyper-V PCI Frontend" 224 depends on ((X86 && X86_64) || ARM64) && HYPERV && PCI_MSI && SYSFS 225 select PCI_HYPERV_INTERFACE 226 select IRQ_MSI_LIB 227 help 228 The PCI device frontend driver allows the kernel to import arbitrary 229 PCI devices from a PCI backend to support PCI driver domains. 230 231config PCI_DYNAMIC_OF_NODES 232 bool "Create Device tree nodes for PCI devices" 233 depends on OF_IRQ 234 select OF_DYNAMIC 235 help 236 This option enables support for generating device tree nodes for some 237 PCI devices. Thus, the driver of this kind can load and overlay 238 flattened device tree for its downstream devices. 239 240 Once this option is selected, the device tree nodes will be generated 241 for all PCI bridges. 242 243choice 244 prompt "PCI Express hierarchy optimization setting" 245 default PCIE_BUS_DEFAULT 246 depends on PCI && EXPERT 247 help 248 MPS (Max Payload Size) and MRRS (Max Read Request Size) are PCIe 249 device parameters that affect performance and the ability to 250 support hotplug and peer-to-peer DMA. 251 252 The following choices set the MPS and MRRS optimization strategy 253 at compile-time. The choices are the same as those offered for 254 the kernel command-line parameter 'pci', i.e., 255 'pci=pcie_bus_tune_off', 'pci=pcie_bus_safe', 256 'pci=pcie_bus_perf', and 'pci=pcie_bus_peer2peer'. 257 258 This is a compile-time setting and can be overridden by the above 259 command-line parameters. If unsure, choose PCIE_BUS_DEFAULT. 260 261config PCIE_BUS_TUNE_OFF 262 bool "Tune Off" 263 depends on PCI 264 help 265 Use the BIOS defaults; don't touch MPS at all. This is the same 266 as booting with 'pci=pcie_bus_tune_off'. 267 268config PCIE_BUS_DEFAULT 269 bool "Default" 270 depends on PCI 271 help 272 Default choice; ensure that the MPS matches upstream bridge. 273 274config PCIE_BUS_SAFE 275 bool "Safe" 276 depends on PCI 277 help 278 Use largest MPS that boot-time devices support. If you have a 279 closed system with no possibility of adding new devices, this 280 will use the largest MPS that's supported by all devices. This 281 is the same as booting with 'pci=pcie_bus_safe'. 282 283config PCIE_BUS_PERFORMANCE 284 bool "Performance" 285 depends on PCI 286 help 287 Use MPS and MRRS for best performance. Ensure that a given 288 device's MPS is no larger than its parent MPS, which allows us to 289 keep all switches/bridges to the max MPS supported by their 290 parent. This is the same as booting with 'pci=pcie_bus_perf'. 291 292config PCIE_BUS_PEER2PEER 293 bool "Peer2peer" 294 depends on PCI 295 help 296 Set MPS = 128 for all devices. MPS configuration effected by the 297 other options could cause the MPS on one root port to be 298 different than that of the MPS on another, which may cause 299 hot-added devices or peer-to-peer DMA to fail. Set MPS to the 300 smallest possible value (128B) system-wide to avoid these issues. 301 This is the same as booting with 'pci=pcie_bus_peer2peer'. 302 303endchoice 304 305config VGA_ARB 306 bool "VGA Arbitration" if EXPERT 307 default y 308 depends on (PCI && !S390) 309 help 310 Some "legacy" VGA devices implemented on PCI typically have the same 311 hard-decoded addresses as they did on ISA. When multiple PCI devices 312 are accessed at same time they need some kind of coordination. Please 313 see Documentation/gpu/vgaarbiter.rst for more details. Select this to 314 enable VGA arbiter. 315 316config VGA_ARB_MAX_GPUS 317 int "Maximum number of GPUs" 318 default 16 319 depends on VGA_ARB 320 help 321 Reserves space in the kernel to maintain resource locking for 322 multiple GPUS. The overhead for each GPU is very small. 323 324source "drivers/pci/hotplug/Kconfig" 325source "drivers/pci/controller/Kconfig" 326source "drivers/pci/endpoint/Kconfig" 327source "drivers/pci/switch/Kconfig" 328source "drivers/pci/pwrctrl/Kconfig" 329 330endif 331