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 help 227 The PCI device frontend driver allows the kernel to import arbitrary 228 PCI devices from a PCI backend to support PCI driver domains. 229 230config PCI_DYNAMIC_OF_NODES 231 bool "Create Device tree nodes for PCI devices" 232 depends on OF_IRQ 233 select OF_DYNAMIC 234 help 235 This option enables support for generating device tree nodes for some 236 PCI devices. Thus, the driver of this kind can load and overlay 237 flattened device tree for its downstream devices. 238 239 Once this option is selected, the device tree nodes will be generated 240 for all PCI bridges. 241 242choice 243 prompt "PCI Express hierarchy optimization setting" 244 default PCIE_BUS_DEFAULT 245 depends on PCI && EXPERT 246 help 247 MPS (Max Payload Size) and MRRS (Max Read Request Size) are PCIe 248 device parameters that affect performance and the ability to 249 support hotplug and peer-to-peer DMA. 250 251 The following choices set the MPS and MRRS optimization strategy 252 at compile-time. The choices are the same as those offered for 253 the kernel command-line parameter 'pci', i.e., 254 'pci=pcie_bus_tune_off', 'pci=pcie_bus_safe', 255 'pci=pcie_bus_perf', and 'pci=pcie_bus_peer2peer'. 256 257 This is a compile-time setting and can be overridden by the above 258 command-line parameters. If unsure, choose PCIE_BUS_DEFAULT. 259 260config PCIE_BUS_TUNE_OFF 261 bool "Tune Off" 262 depends on PCI 263 help 264 Use the BIOS defaults; don't touch MPS at all. This is the same 265 as booting with 'pci=pcie_bus_tune_off'. 266 267config PCIE_BUS_DEFAULT 268 bool "Default" 269 depends on PCI 270 help 271 Default choice; ensure that the MPS matches upstream bridge. 272 273config PCIE_BUS_SAFE 274 bool "Safe" 275 depends on PCI 276 help 277 Use largest MPS that boot-time devices support. If you have a 278 closed system with no possibility of adding new devices, this 279 will use the largest MPS that's supported by all devices. This 280 is the same as booting with 'pci=pcie_bus_safe'. 281 282config PCIE_BUS_PERFORMANCE 283 bool "Performance" 284 depends on PCI 285 help 286 Use MPS and MRRS for best performance. Ensure that a given 287 device's MPS is no larger than its parent MPS, which allows us to 288 keep all switches/bridges to the max MPS supported by their 289 parent. This is the same as booting with 'pci=pcie_bus_perf'. 290 291config PCIE_BUS_PEER2PEER 292 bool "Peer2peer" 293 depends on PCI 294 help 295 Set MPS = 128 for all devices. MPS configuration effected by the 296 other options could cause the MPS on one root port to be 297 different than that of the MPS on another, which may cause 298 hot-added devices or peer-to-peer DMA to fail. Set MPS to the 299 smallest possible value (128B) system-wide to avoid these issues. 300 This is the same as booting with 'pci=pcie_bus_peer2peer'. 301 302endchoice 303 304config VGA_ARB 305 bool "VGA Arbitration" if EXPERT 306 default y 307 depends on (PCI && !S390) 308 help 309 Some "legacy" VGA devices implemented on PCI typically have the same 310 hard-decoded addresses as they did on ISA. When multiple PCI devices 311 are accessed at same time they need some kind of coordination. Please 312 see Documentation/gpu/vgaarbiter.rst for more details. Select this to 313 enable VGA arbiter. 314 315config VGA_ARB_MAX_GPUS 316 int "Maximum number of GPUs" 317 default 16 318 depends on VGA_ARB 319 help 320 Reserves space in the kernel to maintain resource locking for 321 multiple GPUS. The overhead for each GPU is very small. 322 323source "drivers/pci/hotplug/Kconfig" 324source "drivers/pci/controller/Kconfig" 325source "drivers/pci/endpoint/Kconfig" 326source "drivers/pci/switch/Kconfig" 327source "drivers/pci/pwrctrl/Kconfig" 328 329endif 330