Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0
0002 
0003 =========
0004 S/390 PCI
0005 =========
0006 
0007 Authors:
0008         - Pierre Morel
0009 
0010 Copyright, IBM Corp. 2020
0011 
0012 
0013 Command line parameters and debugfs entries
0014 ===========================================
0015 
0016 Command line parameters
0017 -----------------------
0018 
0019 * nomio
0020 
0021   Do not use PCI Mapped I/O (MIO) instructions.
0022 
0023 * norid
0024 
0025   Ignore the RID field and force use of one PCI domain per PCI function.
0026 
0027 debugfs entries
0028 ---------------
0029 
0030 The S/390 debug feature (s390dbf) generates views to hold various debug results in sysfs directories of the form:
0031 
0032  * /sys/kernel/debug/s390dbf/pci_*/
0033 
0034 For example:
0035 
0036   - /sys/kernel/debug/s390dbf/pci_msg/sprintf
0037     Holds messages from the processing of PCI events, like machine check handling
0038     and setting of global functionality, like UID checking.
0039 
0040   Change the level of logging to be more or less verbose by piping
0041   a number between 0 and 6 to  /sys/kernel/debug/s390dbf/pci_*/level. For
0042   details, see the documentation on the S/390 debug feature at
0043   Documentation/s390/s390dbf.rst.
0044 
0045 Sysfs entries
0046 =============
0047 
0048 Entries specific to zPCI functions and entries that hold zPCI information.
0049 
0050 * /sys/bus/pci/slots/XXXXXXXX
0051 
0052   The slot entries are set up using the function identifier (FID) of the
0053   PCI function. The format depicted as XXXXXXXX above is 8 hexadecimal digits
0054   with 0 padding and lower case hexadecimal digitis.
0055 
0056   - /sys/bus/pci/slots/XXXXXXXX/power
0057 
0058   A physical function that currently supports a virtual function cannot be
0059   powered off until all virtual functions are removed with:
0060   echo 0 > /sys/bus/pci/devices/XXXX:XX:XX.X/sriov_numvf
0061 
0062 * /sys/bus/pci/devices/XXXX:XX:XX.X/
0063 
0064   - function_id
0065     A zPCI function identifier that uniquely identifies the function in the Z server.
0066 
0067   - function_handle
0068     Low-level identifier used for a configured PCI function.
0069     It might be useful for debuging.
0070 
0071   - pchid
0072     Model-dependent location of the I/O adapter.
0073 
0074   - pfgid
0075     PCI function group ID, functions that share identical functionality
0076     use a common identifier.
0077     A PCI group defines interrupts, IOMMU, IOTLB, and DMA specifics.
0078 
0079   - vfn
0080     The virtual function number, from 1 to N for virtual functions,
0081     0 for physical functions.
0082 
0083   - pft
0084     The PCI function type
0085 
0086   - port
0087     The port corresponds to the physical port the function is attached to.
0088     It also gives an indication of the physical function a virtual function
0089     is attached to.
0090 
0091   - uid
0092     The user identifier (UID) may be defined as part of the machine
0093     configuration or the z/VM or KVM guest configuration. If the accompanying
0094     uid_is_unique attribute is 1 the platform guarantees that the UID is unique
0095     within that instance and no devices with the same UID can be attached
0096     during the lifetime of the system.
0097 
0098   - uid_is_unique
0099     Indicates whether the user identifier (UID) is guaranteed to be and remain
0100     unique within this Linux instance.
0101 
0102   - pfip/segmentX
0103     The segments determine the isolation of a function.
0104     They correspond to the physical path to the function.
0105     The more the segments are different, the more the functions are isolated.
0106 
0107 Enumeration and hotplug
0108 =======================
0109 
0110 The PCI address consists of four parts: domain, bus, device and function,
0111 and is of this form: DDDD:BB:dd.f
0112 
0113 * When not using multi-functions (norid is set, or the firmware does not
0114   support multi-functions):
0115 
0116   - There is only one function per domain.
0117 
0118   - The domain is set from the zPCI function's UID as defined during the
0119     LPAR creation.
0120 
0121 * When using multi-functions (norid parameter is not set),
0122   zPCI functions are addressed differently:
0123 
0124   - There is still only one bus per domain.
0125 
0126   - There can be up to 256 functions per bus.
0127 
0128   - The domain part of the address of all functions for
0129     a multi-Function device is set from the zPCI function's UID as defined
0130     in the LPAR creation for the function zero.
0131 
0132   - New functions will only be ready for use after the function zero
0133     (the function with devfn 0) has been enumerated.