요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
=========
S/390 PCI
=========
Authors:
- Pierre Morel
Copyright, IBM Corp. 2020
Command line parameters and debugfs entries
===========================================
Command line parameters
-----------------------
* nomio
Do not use PCI Mapped I/O (MIO) instructions.
* norid
Ignore the RID field and force use of one PCI domain per PCI function.
debugfs entries
---------------
The S/390 debug feature (s390dbf) generates views to hold various debug results in sysfs directories of the form:
* /sys/kernel/debug/s390dbf/pci_*/
For example:
- /sys/kernel/debug/s390dbf/pci_msg/sprintf
Holds messages from the processing of PCI events, like machine check handling
and setting of global functionality, like UID checking.
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/arch/s390/s390dbf.rst.
Sysfs entries
=============
Entries specific to zPCI functions and entries that hold zPCI information.
* /sys/bus/pci/slots/XXXXXXXX
The slot entries are set up using the function identifier (FID) of the
PCI function. The format depicted as XXXXXXXX above is 8 hexadecimal digits
with 0 padding and lower case hexadecimal digits.
- /sys/bus/pci/slots/XXXXXXXX/power
A physical function that currently supports a virtual function cannot be
powered off until all virtual functions are removed with:
echo 0 > /sys/bus/pci/devices/XXXX:XX:XX.X/sriov_numvf
* /sys/bus/pci/devices/XXXX:XX:XX.X/
- function_id
A zPCI function identifier that uniquely identifies the function in the Z server.
- function_handle
Low-level identifier used for a configured PCI function.
It might be useful for debugging.
- pchid
Model-dependent location of the I/O adapter.
- pfgid
PCI function group ID, functions that share identical functionality
use a common identifier.
A PCI group defines interrupts, IOMMU, IOTLB, and DMA specifics.
- vfn
The virtual function number, from 1 to N for virtual functions,
0 for physical functions.
- pft
The PCI function type
- port
The port corresponds to the physical port the function is attached to.
It also gives an indication of the physical function a virtual function
is attached to.
- uid
The user identifier (UID) may be defined as part of the machine
configuration or the z/VM or KVM guest configuration. If the accompanying
uid_is_unique attribute is 1 the platform guarantees that the UID is unique
within that instance and no devices with the same UID can be attached
during the lifetime of the system.
- uid_is_unique
Indicates whether the user identifier (UID) is guaranteed to be and remain
unique within this Linux instance.
- pfip/segmentX
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.
Enumeration and hotplug
=======================
The PCI address consists of four parts: domain, bus, device and function,
and is of this form: DDDD:BB:dd.f
* When not using multi-functions (norid is set, or the firmware does not
support multi-functions):
- There is only one function per domain.
- The domain is set from the zPCI function's UID as defined during the
LPAR creation.
* When using multi-functions (norid parameter is not set),
zPCI functions are addressed differently:
- There is still only one bus per domain.
- There can be up to 256 functions per bus.
- The domain part of the address of all functions for
a multi-Function device is set from the zPCI function's UID as defined
in the LPAR creation for the function zero.
- New functions will only be ready for use after the function zero
(the function with devfn 0) has been enumerated.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
S/390 PCI
1-12이 문서는 `GPL-2.0` 라이선스로 제공되는 S/390 PCI 안내서입니다. 저자는 Pierre Morel이며 저작권은 IBM Corp. 2020에 있습니다.
명령줄 매개변수
13-26| 매개변수 | 동작 |
|---|---|
| `nomio` | PCI Mapped I/O(MIO) 명령을 사용하지 않습니다. |
| `norid` | RID 필드를 무시하고 PCI function마다 PCI domain 하나를 강제로 사용합니다. |
debugfs 항목
27-44S/390 debug feature인 `s390dbf`는 `/sys/kernel/debug/s390dbf/pci_*/` 형식의 디렉터리에 여러 PCI 디버그 결과 뷰를 생성합니다.
| 경로 | 내용 |
|---|---|
| `/sys/kernel/debug/s390dbf/pci_msg/sprintf` | machine check 처리 같은 PCI event 처리와 UID 검사 같은 전역 기능 설정에서 나온 메시지를 보관합니다. |
| `/sys/kernel/debug/s390dbf/pci_*/level` | 0부터 6 사이의 숫자를 쓰면 logging 상세도를 높이거나 낮춥니다. |
자세한 내용은 `Documentation/arch/s390/s390dbf.rst`의 S/390 debug feature 문서를 참조하십시오.
zPCI slot sysfs 항목
45-61zPCI function 전용 항목과 zPCI 정보를 담는 항목이 sysfs에 제공됩니다. `/sys/bus/pci/slots/XXXXXXXX`의 slot 이름은 PCI function identifier(FID)로 구성합니다. `XXXXXXXX`는 0으로 채운 소문자 16진수 8자리입니다.
`/sys/bus/pci/slots/XXXXXXXX/power`는 slot 전원 제어 항목입니다. 현재 virtual function을 지원하는 physical function은 다음 명령으로 모든 virtual function을 제거하기 전에는 전원을 끌 수 없습니다.
echo 0 > /sys/bus/pci/devices/XXXX:XX:XX.X/sriov_numvf
zPCI device 속성
62-106`/sys/bus/pci/devices/XXXX:XX:XX.X/` 아래에는 다음 속성이 있습니다.
| 속성 | 의미 |
|---|---|
| `function_id` | Z server 안에서 function을 고유하게 식별하는 zPCI function identifier입니다. |
| `function_handle` | 구성된 PCI function에 사용하는 저수준 식별자이며 debugging에 유용할 수 있습니다. |
| `pchid` | I/O adapter의 모델 의존적 위치입니다. |
| `pfgid` | PCI function group ID입니다. 기능이 같은 function은 공통 식별자를 사용하며 PCI group은 interrupt, IOMMU, IOTLB, DMA 세부 사항을 정의합니다. |
| `vfn` | virtual function number입니다. virtual function은 1부터 N, physical function은 0입니다. |
| `pft` | PCI function type입니다. |
| `port` | function이 연결된 physical port이며, virtual function이 어느 physical function에 연결됐는지도 나타냅니다. |
| `uid` | machine configuration 또는 z/VM/KVM guest configuration에서 정의할 수 있는 user identifier(UID)입니다. 함께 제공되는 `uid_is_unique`가 1이면 해당 instance에서 UID가 고유하며 시스템 수명 동안 같은 UID의 장치를 연결할 수 없음을 platform이 보장합니다. |
| `uid_is_unique` | UID가 이 Linux instance 안에서 고유하며 계속 고유하게 유지된다는 보장 여부를 나타냅니다. |
| `pfip/segmentX` | function의 격리를 결정하는 physical path segment입니다. segment가 더 많이 다를수록 function 간 격리 수준이 높습니다. |
열거와 hotplug
107-133PCI 주소는 domain, bus, device, function 네 부분으로 구성되며 형식은 `DDDD:BB:dd.f`입니다.
| 구성 | 주소 지정 규칙 |
|---|---|
| multi-function 미사용 | `norid`가 설정됐거나 firmware가 multi-function을 지원하지 않는 경우입니다. domain마다 function이 하나뿐이며, domain은 LPAR 생성 시 정의한 zPCI function의 UID에서 정합니다. |
| multi-function 사용 | `norid`가 설정되지 않은 경우입니다. domain마다 bus는 하나이지만 bus마다 최대 256개 function을 둘 수 있습니다. |
multi-function device의 모든 function에 대한 주소 domain 부분은 function zero를 위해 LPAR 생성 시 정의한 zPCI function UID에서 정합니다. 새 function은 `devfn 0`인 function zero가 열거된 뒤에만 사용할 준비가 됩니다.
요약과 해설
pci.rst:1-133`nomio`와 `norid`는 PCI MIO와 domain 구성 방식을 제어합니다. sysfs는 FID, function handle, group, virtual function, UID, physical path 격리 정보를 노출하며 debugfs는 PCI event 처리 기록을 제공합니다.
multi-function 구성에서도 domain당 bus는 하나이고 bus당 최대 256개 function을 둘 수 있습니다. function zero의 UID가 domain을 정하며, 다른 function은 `devfn 0` 열거 후에 사용할 수 있습니다.