pci.rst 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. .. SPDX-License-Identifier: GPL-2.0
  2. =========
  3. S/390 PCI
  4. =========
  5. Authors:
  6. - Pierre Morel
  7. Copyright, IBM Corp. 2020
  8. Command line parameters and debugfs entries
  9. ===========================================
  10. Command line parameters
  11. -----------------------
  12. * nomio
  13. Do not use PCI Mapped I/O (MIO) instructions.
  14. * norid
  15. Ignore the RID field and force use of one PCI domain per PCI function.
  16. debugfs entries
  17. ---------------
  18. The S/390 debug feature (s390dbf) generates views to hold various debug results in sysfs directories of the form:
  19. * /sys/kernel/debug/s390dbf/pci_*/
  20. For example:
  21. - /sys/kernel/debug/s390dbf/pci_msg/sprintf
  22. Holds messages from the processing of PCI events, like machine check handling
  23. and setting of global functionality, like UID checking.
  24. Change the level of logging to be more or less verbose by piping
  25. a number between 0 and 6 to /sys/kernel/debug/s390dbf/pci_*/level. For
  26. details, see the documentation on the S/390 debug feature at
  27. Documentation/s390/s390dbf.rst.
  28. Sysfs entries
  29. =============
  30. Entries specific to zPCI functions and entries that hold zPCI information.
  31. * /sys/bus/pci/slots/XXXXXXXX
  32. The slot entries are set up using the function identifier (FID) of the
  33. PCI function. The format depicted as XXXXXXXX above is 8 hexadecimal digits
  34. with 0 padding and lower case hexadecimal digitis.
  35. - /sys/bus/pci/slots/XXXXXXXX/power
  36. A physical function that currently supports a virtual function cannot be
  37. powered off until all virtual functions are removed with:
  38. echo 0 > /sys/bus/pci/devices/XXXX:XX:XX.X/sriov_numvf
  39. * /sys/bus/pci/devices/XXXX:XX:XX.X/
  40. - function_id
  41. A zPCI function identifier that uniquely identifies the function in the Z server.
  42. - function_handle
  43. Low-level identifier used for a configured PCI function.
  44. It might be useful for debuging.
  45. - pchid
  46. Model-dependent location of the I/O adapter.
  47. - pfgid
  48. PCI function group ID, functions that share identical functionality
  49. use a common identifier.
  50. A PCI group defines interrupts, IOMMU, IOTLB, and DMA specifics.
  51. - vfn
  52. The virtual function number, from 1 to N for virtual functions,
  53. 0 for physical functions.
  54. - pft
  55. The PCI function type
  56. - port
  57. The port corresponds to the physical port the function is attached to.
  58. It also gives an indication of the physical function a virtual function
  59. is attached to.
  60. - uid
  61. The user identifier (UID) may be defined as part of the machine
  62. configuration or the z/VM or KVM guest configuration. If the accompanying
  63. uid_is_unique attribute is 1 the platform guarantees that the UID is unique
  64. within that instance and no devices with the same UID can be attached
  65. during the lifetime of the system.
  66. - uid_is_unique
  67. Indicates whether the user identifier (UID) is guaranteed to be and remain
  68. unique within this Linux instance.
  69. - pfip/segmentX
  70. The segments determine the isolation of a function.
  71. They correspond to the physical path to the function.
  72. The more the segments are different, the more the functions are isolated.
  73. Enumeration and hotplug
  74. =======================
  75. The PCI address consists of four parts: domain, bus, device and function,
  76. and is of this form: DDDD:BB:dd.f
  77. * When not using multi-functions (norid is set, or the firmware does not
  78. support multi-functions):
  79. - There is only one function per domain.
  80. - The domain is set from the zPCI function's UID as defined during the
  81. LPAR creation.
  82. * When using multi-functions (norid parameter is not set),
  83. zPCI functions are addressed differently:
  84. - There is still only one bus per domain.
  85. - There can be up to 256 functions per bus.
  86. - The domain part of the address of all functions for
  87. a multi-Function device is set from the zPCI function's UID as defined
  88. in the LPAR creation for the function zero.
  89. - New functions will only be ready for use after the function zero
  90. (the function with devfn 0) has been enumerated.