0001 What: /sys/bus/pci/drivers/.../bind
0002 What: /sys/devices/pciX/.../bind
0003 Date: December 2003
0004 Contact: linux-pci@vger.kernel.org
0005 Description:
0006 Writing a device location to this file will cause
0007 the driver to attempt to bind to the device found at
0008 this location. This is useful for overriding default
0009 bindings. The format for the location is: DDDD:BB:DD.F.
0010 That is Domain:Bus:Device.Function and is the same as
0011 found in /sys/bus/pci/devices/. For example::
0012
0013 # echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/bind
0014
0015 (Note: kernels before 2.6.28 may require echo -n).
0016
0017 What: /sys/bus/pci/drivers/.../unbind
0018 What: /sys/devices/pciX/.../unbind
0019 Date: December 2003
0020 Contact: linux-pci@vger.kernel.org
0021 Description:
0022 Writing a device location to this file will cause the
0023 driver to attempt to unbind from the device found at
0024 this location. This may be useful when overriding default
0025 bindings. The format for the location is: DDDD:BB:DD.F.
0026 That is Domain:Bus:Device.Function and is the same as
0027 found in /sys/bus/pci/devices/. For example::
0028
0029 # echo 0000:00:19.0 > /sys/bus/pci/drivers/foo/unbind
0030
0031 (Note: kernels before 2.6.28 may require echo -n).
0032
0033 What: /sys/bus/pci/drivers/.../new_id
0034 What: /sys/devices/pciX/.../new_id
0035 Date: December 2003
0036 Contact: linux-pci@vger.kernel.org
0037 Description:
0038 Writing a device ID to this file will attempt to
0039 dynamically add a new device ID to a PCI device driver.
0040 This may allow the driver to support more hardware than
0041 was included in the driver's static device ID support
0042 table at compile time. The format for the device ID is:
0043 VVVV DDDD SVVV SDDD CCCC MMMM PPPP. That is Vendor ID,
0044 Device ID, Subsystem Vendor ID, Subsystem Device ID,
0045 Class, Class Mask, and Private Driver Data. The Vendor ID
0046 and Device ID fields are required, the rest are optional.
0047 Upon successfully adding an ID, the driver will probe
0048 for the device and attempt to bind to it. For example::
0049
0050 # echo "8086 10f5" > /sys/bus/pci/drivers/foo/new_id
0051
0052 What: /sys/bus/pci/drivers/.../remove_id
0053 What: /sys/devices/pciX/.../remove_id
0054 Date: February 2009
0055 Contact: Chris Wright <chrisw@sous-sol.org>
0056 Description:
0057 Writing a device ID to this file will remove an ID
0058 that was dynamically added via the new_id sysfs entry.
0059 The format for the device ID is:
0060 VVVV DDDD SVVV SDDD CCCC MMMM. That is Vendor ID, Device
0061 ID, Subsystem Vendor ID, Subsystem Device ID, Class,
0062 and Class Mask. The Vendor ID and Device ID fields are
0063 required, the rest are optional. After successfully
0064 removing an ID, the driver will no longer support the
0065 device. This is useful to ensure auto probing won't
0066 match the driver to the device. For example::
0067
0068 # echo "8086 10f5" > /sys/bus/pci/drivers/foo/remove_id
0069
0070 What: /sys/bus/pci/rescan
0071 Date: January 2009
0072 Contact: Linux PCI developers <linux-pci@vger.kernel.org>
0073 Description:
0074 Writing a non-zero value to this attribute will
0075 force a rescan of all PCI buses in the system, and
0076 re-discover previously removed devices.
0077
0078 What: /sys/bus/pci/devices/.../msi_bus
0079 Date: September 2014
0080 Contact: Linux PCI developers <linux-pci@vger.kernel.org>
0081 Description:
0082 Writing a zero value to this attribute disallows MSI and
0083 MSI-X for any future drivers of the device. If the device
0084 is a bridge, MSI and MSI-X will be disallowed for future
0085 drivers of all child devices under the bridge. Drivers
0086 must be reloaded for the new setting to take effect.
0087
0088 What: /sys/bus/pci/devices/.../msi_irqs/
0089 Date: September, 2011
0090 Contact: Neil Horman <nhorman@tuxdriver.com>
0091 Description:
0092 The /sys/devices/.../msi_irqs directory contains a variable set
0093 of files, with each file being named after a corresponding msi
0094 irq vector allocated to that device.
0095
0096 What: /sys/bus/pci/devices/.../msi_irqs/<N>
0097 Date: September 2011
0098 Contact: Neil Horman <nhorman@tuxdriver.com>
0099 Description:
0100 This attribute indicates the mode that the irq vector named by
0101 the file is in (msi vs. msix)
0102
0103 What: /sys/bus/pci/devices/.../irq
0104 Date: August 2021
0105 Contact: Linux PCI developers <linux-pci@vger.kernel.org>
0106 Description:
0107 If a driver has enabled MSI (not MSI-X), "irq" contains the
0108 IRQ of the first MSI vector. Otherwise "irq" contains the
0109 IRQ of the legacy INTx interrupt.
0110
0111 "irq" being set to 0 indicates that the device isn't
0112 capable of generating legacy INTx interrupts.
0113
0114 What: /sys/bus/pci/devices/.../remove
0115 Date: January 2009
0116 Contact: Linux PCI developers <linux-pci@vger.kernel.org>
0117 Description:
0118 Writing a non-zero value to this attribute will
0119 hot-remove the PCI device and any of its children.
0120
0121 What: /sys/bus/pci/devices/.../pci_bus/.../rescan
0122 Date: May 2011
0123 Contact: Linux PCI developers <linux-pci@vger.kernel.org>
0124 Description:
0125 Writing a non-zero value to this attribute will
0126 force a rescan of the bus and all child buses,
0127 and re-discover devices removed earlier from this
0128 part of the device tree.
0129
0130 What: /sys/bus/pci/devices/.../rescan
0131 Date: January 2009
0132 Contact: Linux PCI developers <linux-pci@vger.kernel.org>
0133 Description:
0134 Writing a non-zero value to this attribute will
0135 force a rescan of the device's parent bus and all
0136 child buses, and re-discover devices removed earlier
0137 from this part of the device tree.
0138
0139 What: /sys/bus/pci/devices/.../reset_method
0140 Date: August 2021
0141 Contact: Amey Narkhede <ameynarkhede03@gmail.com>
0142 Description:
0143 Some devices allow an individual function to be reset
0144 without affecting other functions in the same slot.
0145
0146 For devices that have this support, a file named
0147 reset_method is present in sysfs. Reading this file
0148 gives names of the supported and enabled reset methods and
0149 their ordering. Writing a space-separated list of names of
0150 reset methods sets the reset methods and ordering to be
0151 used when resetting the device. Writing an empty string
0152 disables the ability to reset the device. Writing
0153 "default" enables all supported reset methods in the
0154 default ordering.
0155
0156 What: /sys/bus/pci/devices/.../reset
0157 Date: July 2009
0158 Contact: Michael S. Tsirkin <mst@redhat.com>
0159 Description:
0160 Some devices allow an individual function to be reset
0161 without affecting other functions in the same device.
0162 For devices that have this support, a file named reset
0163 will be present in sysfs. Writing 1 to this file
0164 will perform reset.
0165
0166 What: /sys/bus/pci/devices/.../vpd
0167 Date: February 2008
0168 Contact: Ben Hutchings <bwh@kernel.org>
0169 Description:
0170 A file named vpd in a device directory will be a
0171 binary file containing the Vital Product Data for the
0172 device. It should follow the VPD format defined in
0173 PCI Specification 2.1 or 2.2, but users should consider
0174 that some devices may have incorrectly formatted data.
0175 If the underlying VPD has a writable section then the
0176 corresponding section of this file will be writable.
0177
0178 What: /sys/bus/pci/devices/.../virtfn<N>
0179 Date: March 2009
0180 Contact: Yu Zhao <yu.zhao@intel.com>
0181 Description:
0182 This symbolic link appears when hardware supports the SR-IOV
0183 capability and the Physical Function driver has enabled it.
0184 The symbolic link points to the PCI device sysfs entry of the
0185 Virtual Function whose index is N (0...MaxVFs-1).
0186
0187 What: /sys/bus/pci/devices/.../dep_link
0188 Date: March 2009
0189 Contact: Yu Zhao <yu.zhao@intel.com>
0190 Description:
0191 This symbolic link appears when hardware supports the SR-IOV
0192 capability and the Physical Function driver has enabled it,
0193 and this device has vendor specific dependencies with others.
0194 The symbolic link points to the PCI device sysfs entry of
0195 Physical Function this device depends on.
0196
0197 What: /sys/bus/pci/devices/.../physfn
0198 Date: March 2009
0199 Contact: Yu Zhao <yu.zhao@intel.com>
0200 Description:
0201 This symbolic link appears when a device is a Virtual Function.
0202 The symbolic link points to the PCI device sysfs entry of the
0203 Physical Function this device associates with.
0204
0205 What: /sys/bus/pci/devices/.../modalias
0206 Date: May 2005
0207 Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
0208 Description:
0209 This attribute indicates the PCI ID of the device object.
0210
0211 That is in the format:
0212 pci:vXXXXXXXXdXXXXXXXXsvXXXXXXXXsdXXXXXXXXbcXXscXXiXX,
0213 where:
0214
0215 - vXXXXXXXX contains the vendor ID;
0216 - dXXXXXXXX contains the device ID;
0217 - svXXXXXXXX contains the sub-vendor ID;
0218 - sdXXXXXXXX contains the subsystem device ID;
0219 - bcXX contains the device class;
0220 - scXX contains the device subclass;
0221 - iXX contains the device class programming interface.
0222
0223 What: /sys/bus/pci/slots/.../module
0224 Date: June 2009
0225 Contact: linux-pci@vger.kernel.org
0226 Description:
0227 This symbolic link points to the PCI hotplug controller driver
0228 module that manages the hotplug slot.
0229
0230 What: /sys/bus/pci/devices/.../label
0231 Date: July 2010
0232 Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
0233 Description:
0234 Reading this attribute will provide the firmware
0235 given name (SMBIOS type 41 string or ACPI _DSM string) of
0236 the PCI device. The attribute will be created only
0237 if the firmware has given a name to the PCI device.
0238 ACPI _DSM string name will be given priority if the
0239 system firmware provides SMBIOS type 41 string also.
0240 Users:
0241 Userspace applications interested in knowing the
0242 firmware assigned name of the PCI device.
0243
0244 What: /sys/bus/pci/devices/.../index
0245 Date: July 2010
0246 Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
0247 Description:
0248 Reading this attribute will provide the firmware given instance
0249 number of the PCI device. Depending on the platform this can
0250 be for example the SMBIOS type 41 device type instance or the
0251 user-defined ID (UID) on s390. The attribute will be created
0252 only if the firmware has given an instance number to the PCI
0253 device and that number is guaranteed to uniquely identify the
0254 device in the system.
0255 Users:
0256 Userspace applications interested in knowing the
0257 firmware assigned device type instance of the PCI
0258 device that can help in understanding the firmware
0259 intended order of the PCI device.
0260
0261 What: /sys/bus/pci/devices/.../acpi_index
0262 Date: July 2010
0263 Contact: Narendra K <narendra_k@dell.com>, linux-bugs@dell.com
0264 Description:
0265 Reading this attribute will provide the firmware
0266 given instance (ACPI _DSM instance number) of the PCI device.
0267 The attribute will be created only if the firmware has given
0268 an instance number to the PCI device. ACPI _DSM instance number
0269 will be given priority if the system firmware provides SMBIOS
0270 type 41 device type instance also.
0271 Users:
0272 Userspace applications interested in knowing the
0273 firmware assigned instance number of the PCI
0274 device that can help in understanding the firmware
0275 intended order of the PCI device.
0276
0277 What: /sys/bus/pci/devices/.../d3cold_allowed
0278 Date: July 2012
0279 Contact: Huang Ying <ying.huang@intel.com>
0280 Description:
0281 d3cold_allowed is bit to control whether the corresponding PCI
0282 device can be put into D3Cold state. If it is cleared, the
0283 device will never be put into D3Cold state. If it is set, the
0284 device may be put into D3Cold state if other requirements are
0285 satisfied too. Reading this attribute will show the current
0286 value of d3cold_allowed bit. Writing this attribute will set
0287 the value of d3cold_allowed bit.
0288
0289 What: /sys/bus/pci/devices/.../sriov_totalvfs
0290 Date: November 2012
0291 Contact: Donald Dutile <ddutile@redhat.com>
0292 Description:
0293 This file appears when a physical PCIe device supports SR-IOV.
0294 Userspace applications can read this file to determine the
0295 maximum number of Virtual Functions (VFs) a PCIe physical
0296 function (PF) can support. Typically, this is the value reported
0297 in the PF's SR-IOV extended capability structure's TotalVFs
0298 element. Drivers have the ability at probe time to reduce the
0299 value read from this file via the pci_sriov_set_totalvfs()
0300 function.
0301
0302 What: /sys/bus/pci/devices/.../sriov_numvfs
0303 Date: November 2012
0304 Contact: Donald Dutile <ddutile@redhat.com>
0305 Description:
0306 This file appears when a physical PCIe device supports SR-IOV.
0307 Userspace applications can read and write to this file to
0308 determine and control the enablement or disablement of Virtual
0309 Functions (VFs) on the physical function (PF). A read of this
0310 file will return the number of VFs that are enabled on this PF.
0311 A number written to this file will enable the specified
0312 number of VFs. A userspace application would typically read the
0313 file and check that the value is zero, and then write the number
0314 of VFs that should be enabled on the PF; the value written
0315 should be less than or equal to the value in the sriov_totalvfs
0316 file. A userspace application wanting to disable the VFs would
0317 write a zero to this file. The core ensures that valid values
0318 are written to this file, and returns errors when values are not
0319 valid. For example, writing a 2 to this file when sriov_numvfs
0320 is not 0 and not 2 already will return an error. Writing a 10
0321 when the value of sriov_totalvfs is 8 will return an error.
0322
0323 What: /sys/bus/pci/devices/.../driver_override
0324 Date: April 2014
0325 Contact: Alex Williamson <alex.williamson@redhat.com>
0326 Description:
0327 This file allows the driver for a device to be specified which
0328 will override standard static and dynamic ID matching. When
0329 specified, only a driver with a name matching the value written
0330 to driver_override will have an opportunity to bind to the
0331 device. The override is specified by writing a string to the
0332 driver_override file (echo pci-stub > driver_override) and
0333 may be cleared with an empty string (echo > driver_override).
0334 This returns the device to standard matching rules binding.
0335 Writing to driver_override does not automatically unbind the
0336 device from its current driver or make any attempt to
0337 automatically load the specified driver. If no driver with a
0338 matching name is currently loaded in the kernel, the device
0339 will not bind to any driver. This also allows devices to
0340 opt-out of driver binding using a driver_override name such as
0341 "none". Only a single driver may be specified in the override,
0342 there is no support for parsing delimiters.
0343
0344 What: /sys/bus/pci/devices/.../numa_node
0345 Date: Oct 2014
0346 Contact: Prarit Bhargava <prarit@redhat.com>
0347 Description:
0348 This file contains the NUMA node to which the PCI device is
0349 attached, or -1 if the node is unknown. The initial value
0350 comes from an ACPI _PXM method or a similar firmware
0351 source. If that is missing or incorrect, this file can be
0352 written to override the node. In that case, please report
0353 a firmware bug to the system vendor. Writing to this file
0354 taints the kernel with TAINT_FIRMWARE_WORKAROUND, which
0355 reduces the supportability of your system.
0356
0357 What: /sys/bus/pci/devices/.../revision
0358 Date: November 2016
0359 Contact: Emil Velikov <emil.l.velikov@gmail.com>
0360 Description:
0361 This file contains the revision field of the PCI device.
0362 The value comes from device config space. The file is read only.
0363
0364 What: /sys/bus/pci/devices/.../sriov_drivers_autoprobe
0365 Date: April 2017
0366 Contact: Bodong Wang<bodong@mellanox.com>
0367 Description:
0368 This file is associated with the PF of a device that
0369 supports SR-IOV. It determines whether newly-enabled VFs
0370 are immediately bound to a driver. It initially contains
0371 1, which means the kernel automatically binds VFs to a
0372 compatible driver immediately after they are enabled. If
0373 an application writes 0 to the file before enabling VFs,
0374 the kernel will not bind VFs to a driver.
0375
0376 A typical use case is to write 0 to this file, then enable
0377 VFs, then assign the newly-created VFs to virtual machines.
0378 Note that changing this file does not affect already-
0379 enabled VFs. In this scenario, the user must first disable
0380 the VFs, write 0 to sriov_drivers_autoprobe, then re-enable
0381 the VFs.
0382
0383 This is similar to /sys/bus/pci/drivers_autoprobe, but
0384 affects only the VFs associated with a specific PF.
0385
0386 What: /sys/bus/pci/devices/.../p2pmem/size
0387 Date: November 2017
0388 Contact: Logan Gunthorpe <logang@deltatee.com>
0389 Description:
0390 If the device has any Peer-to-Peer memory registered, this
0391 file contains the total amount of memory that the device
0392 provides (in decimal).
0393
0394 What: /sys/bus/pci/devices/.../p2pmem/available
0395 Date: November 2017
0396 Contact: Logan Gunthorpe <logang@deltatee.com>
0397 Description:
0398 If the device has any Peer-to-Peer memory registered, this
0399 file contains the amount of memory that has not been
0400 allocated (in decimal).
0401
0402 What: /sys/bus/pci/devices/.../p2pmem/published
0403 Date: November 2017
0404 Contact: Logan Gunthorpe <logang@deltatee.com>
0405 Description:
0406 If the device has any Peer-to-Peer memory registered, this
0407 file contains a '1' if the memory has been published for
0408 use outside the driver that owns the device.
0409
0410 What: /sys/bus/pci/devices/.../link/clkpm
0411 /sys/bus/pci/devices/.../link/l0s_aspm
0412 /sys/bus/pci/devices/.../link/l1_aspm
0413 /sys/bus/pci/devices/.../link/l1_1_aspm
0414 /sys/bus/pci/devices/.../link/l1_2_aspm
0415 /sys/bus/pci/devices/.../link/l1_1_pcipm
0416 /sys/bus/pci/devices/.../link/l1_2_pcipm
0417 Date: October 2019
0418 Contact: Heiner Kallweit <hkallweit1@gmail.com>
0419 Description: If ASPM is supported for an endpoint, these files can be
0420 used to disable or enable the individual power management
0421 states. Write y/1/on to enable, n/0/off to disable.
0422
0423 What: /sys/bus/pci/devices/.../power_state
0424 Date: November 2020
0425 Contact: Linux PCI developers <linux-pci@vger.kernel.org>
0426 Description:
0427 This file contains the current PCI power state of the device.
0428 The value comes from the PCI kernel device state and can be one
0429 of: "unknown", "error", "D0", D1", "D2", "D3hot", "D3cold".
0430 The file is read only.
0431
0432 What: /sys/bus/pci/devices/.../sriov_vf_total_msix
0433 Date: January 2021
0434 Contact: Leon Romanovsky <leonro@nvidia.com>
0435 Description:
0436 This file is associated with a SR-IOV physical function (PF).
0437 It contains the total number of MSI-X vectors available for
0438 assignment to all virtual functions (VFs) associated with PF.
0439 The value will be zero if the device doesn't support this
0440 functionality. For supported devices, the value will be
0441 constant and won't be changed after MSI-X vectors assignment.
0442
0443 What: /sys/bus/pci/devices/.../sriov_vf_msix_count
0444 Date: January 2021
0445 Contact: Leon Romanovsky <leonro@nvidia.com>
0446 Description:
0447 This file is associated with a SR-IOV virtual function (VF).
0448 It allows configuration of the number of MSI-X vectors for
0449 the VF. This allows devices that have a global pool of MSI-X
0450 vectors to optimally divide them between VFs based on VF usage.
0451
0452 The values accepted are:
0453 * > 0 - this number will be reported as the Table Size in the
0454 VF's MSI-X capability
0455 * < 0 - not valid
0456 * = 0 - will reset to the device default value
0457
0458 The file is writable if the PF is bound to a driver that
0459 implements ->sriov_set_msix_vec_count().