2020-04-01 12:12:24 +03:00
.. SPDX-License-Identifier: GPL-2.0
=========
S/390 PCI
=========
Authors:
- Pierre Morel
Copyright, IBM Corp. 2020
2020-04-30 11:02:17 +03:00
Command line parameters and debugfs entries
2020-04-01 12:12:24 +03:00
===========================================
Command line parameters
-----------------------
* nomio
2020-04-30 11:02:17 +03:00
Do not use PCI Mapped I/O (MIO) instructions.
2020-04-01 12:12:24 +03:00
* norid
Ignore the RID field and force use of one PCI domain per PCI function.
debugfs entries
---------------
2020-04-30 11:02:17 +03:00
The S/390 debug feature (s390dbf) generates views to hold various debug results in sysfs directories of the form:
2020-04-01 12:12:24 +03:00
2020-04-30 11:02:17 +03:00
* /sys/kernel/debug/s390dbf/pci_*/
For example:
2020-04-01 12:12:24 +03:00
- /sys/kernel/debug/s390dbf/pci_msg/sprintf
2020-04-30 11:02:17 +03:00
Holds messages from the processing of PCI events, like machine check handling
and setting of global functionality, like UID checking.
2020-04-01 12:12:24 +03:00
2020-04-30 11:02:17 +03:00
Change the level of logging to be more or less verbose by piping
a number between 0 and 6 to /sys/kernel/debug/s390dbf/pci_*/level. For
details, see the documentation on the S/390 debug feature at
Documentation/s390/s390dbf.rst.
2020-04-01 12:12:24 +03:00
Sysfs entries
=============
2020-04-30 11:02:17 +03:00
Entries specific to zPCI functions and entries that hold zPCI information.
2020-04-01 12:12:24 +03:00
* /sys/bus/pci/slots/XXXXXXXX
2020-04-30 11:02:17 +03:00
The slot entries are set up using the function identifier (FID) of the
2020-04-01 12:12:24 +03:00
PCI function.
- /sys/bus/pci/slots/XXXXXXXX/power
2020-04-30 11:02:17 +03:00
A physical function that currently supports a virtual function cannot be
powered off until all virtual functions are removed with:
2020-04-01 12:12:24 +03:00
echo 0 > /sys/bus/pci/devices/XXXX:XX:XX.X/sriov_numvf
* /sys/bus/pci/devices/XXXX:XX:XX.X/
- function_id
2020-04-30 11:02:17 +03:00
A zPCI function identifier that uniquely identifies the function in the Z server.
2020-04-01 12:12:24 +03:00
- function_handle
2020-04-30 11:02:17 +03:00
Low-level identifier used for a configured PCI function.
It might be useful for debuging.
2020-04-01 12:12:24 +03:00
- pchid
2020-04-30 11:02:17 +03:00
Model-dependent location of the I/O adapter.
2020-04-01 12:12:24 +03:00
- pfgid
2020-04-30 11:02:17 +03:00
PCI function group ID, functions that share identical functionality
use a common identifier.
A PCI group defines interrupts, IOMMU, IOTLB, and DMA specifics.
2020-04-01 12:12:24 +03:00
- vfn
2020-04-30 11:02:17 +03:00
The virtual function number, from 1 to N for virtual functions,
2020-04-01 12:12:24 +03:00
0 for physical functions.
- pft
2020-04-30 11:02:17 +03:00
The PCI function type
2020-04-01 12:12:24 +03:00
- port
2020-04-30 11:02:17 +03:00
The port corresponds to the physical port the function is attached to.
It also gives an indication of the physical function a virtual function
2020-04-01 12:12:24 +03:00
is attached to.
- uid
2020-04-30 11:02:17 +03:00
The unique identifier (UID) is defined when configuring an LPAR and is
unique in the LPAR.
2020-04-01 12:12:24 +03:00
- pfip/segmentX
2020-04-30 11:02:17 +03:00
The segments determine the isolation of a function.
They correspond to the physical path to the function.
The more the segments are different, the more the functions are isolated.
2020-04-01 12:12:24 +03:00
Enumeration and hotplug
=======================
2020-04-30 11:02:17 +03:00
The PCI address consists of four parts: domain, bus, device and function,
and is of this form: DDDD:BB:dd.f
2020-04-01 12:12:24 +03:00
2020-04-30 11:02:17 +03:00
* When not using multi-functions (norid is set, or the firmware does not
support multi-functions):
2020-04-01 12:12:24 +03:00
- There is only one function per domain.
2020-04-30 11:02:17 +03:00
- The domain is set from the zPCI function's UID as defined during the
2020-04-01 12:12:24 +03:00
LPAR creation.
2020-04-30 11:02:17 +03:00
* When using multi-functions (norid parameter is not set),
zPCI functions are addressed differently:
2020-04-01 12:12:24 +03:00
- There is still only one bus per domain.
- There can be up to 256 functions per bus.
2020-04-30 11:02:17 +03:00
- The domain part of the address of all functions for
2020-04-01 12:12:24 +03:00
a multi-Function device is set from the zPCI function's UID as defined
in the LPAR creation for the function zero.
2020-04-30 11:02:17 +03:00
- New functions will only be ready for use after the function zero
2020-04-01 12:12:24 +03:00
(the function with devfn 0) has been enumerated.