요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
IOMMU command buffer
debugfs-amd-iommu:35-61각 IOMMU instance의 command buffer head·tail offsets와 raw command entries를 읽기 전용으로 출력합니다.
Device ID, device table, interrupt remapping table
debugfs-amd-iommu:63-131PCI device ID를 devid에 지정한 뒤 devtbl에서 device table entry를, irqtbl에서 유효한 interrupt remapping table entries를 읽습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/kernel/debug/iommu/amd/iommu<x>/mmio
Date: January 2025
Contact: Dheeraj Kumar Srivastava <[email protected]>
Description:
This file provides read/write access for user input. Users specify the
MMIO register offset for iommu<x>, and the file outputs the corresponding
MMIO register value of iommu<x>
Example::
$ echo "0x18" > /sys/kernel/debug/iommu/amd/iommu00/mmio
$ cat /sys/kernel/debug/iommu/amd/iommu00/mmio
Output::
Offset:0x18 Value:0x000c22000003f48d
What: /sys/kernel/debug/iommu/amd/iommu<x>/capability
Date: January 2025
Contact: Dheeraj Kumar Srivastava <[email protected]>
Description:
This file provides read/write access for user input. Users specify the
capability register offset for iommu<x>, and the file outputs the
corresponding capability register value of iommu<x>.
Example::
$ echo "0x10" > /sys/kernel/debug/iommu/amd/iommu00/capability
$ cat /sys/kernel/debug/iommu/amd/iommu00/capability
Output::
Offset:0x10 Value:0x00203040
What: /sys/kernel/debug/iommu/amd/iommu<x>/cmdbuf
Date: January 2025
Contact: Dheeraj Kumar Srivastava <[email protected]>
Description:
This file is a read-only output file containing iommu<x> command
buffer entries.
Examples::
$ cat /sys/kernel/debug/iommu/amd/iommu<x>/cmdbuf
Output::
CMD Buffer Head Offset:339 Tail Offset:339
0: 00835001 10000001 00003c00 00000000
1: 00000000 30000005 fffff003 7fffffff
2: 00835001 10000001 00003c01 00000000
3: 00000000 30000005 fffff003 7fffffff
4: 00835001 10000001 00003c02 00000000
5: 00000000 30000005 fffff003 7fffffff
6: 00835001 10000001 00003c03 00000000
7: 00000000 30000005 fffff003 7fffffff
8: 00835001 10000001 00003c04 00000000
9: 00000000 30000005 fffff003 7fffffff
10: 00835001 10000001 00003c05 00000000
11: 00000000 30000005 fffff003 7fffffff
[...]
What: /sys/kernel/debug/iommu/amd/devid
Date: January 2025
Contact: Dheeraj Kumar Srivastava <[email protected]>
Description:
This file provides read/write access for user input. Users specify the
device ID, which can be used to dump IOMMU data structures such as the
interrupt remapping table and device table.
Example:
1.
::
$ echo 0000:01:00.0 > /sys/kernel/debug/iommu/amd/devid
$ cat /sys/kernel/debug/iommu/amd/devid
Output::
0000:01:00.0
2.
::
$ echo 01:00.0 > /sys/kernel/debug/iommu/amd/devid
$ cat /sys/kernel/debug/iommu/amd/devid
Output::
0000:01:00.0
What: /sys/kernel/debug/iommu/amd/devtbl
Date: January 2025
Contact: Dheeraj Kumar Srivastava <[email protected]>
Description:
This file is a read-only output file containing the device table entry
for the device ID provided in /sys/kernel/debug/iommu/amd/devid.
Example::
$ cat /sys/kernel/debug/iommu/amd/devtbl
Output::
DeviceId QWORD[3] QWORD[2] QWORD[1] QWORD[0] iommu
0000:01:00.0 0000000000000000 20000001373b8013 0000000000000038 6000000114d7b603 iommu3
What: /sys/kernel/debug/iommu/amd/irqtbl
Date: January 2025
Contact: Dheeraj Kumar Srivastava <[email protected]>
Description:
This file is a read-only output file containing valid IRT table entries
for the device ID provided in /sys/kernel/debug/iommu/amd/devid.
Example::
$ cat /sys/kernel/debug/iommu/amd/irqtbl
Output::
DeviceId 0000:01:00.0
IRT[0000] 0000000000000020 0000000000000241
IRT[0001] 0000000000000020 0000000000000841
IRT[0002] 0000000000000020 0000000000002041
IRT[0003] 0000000000000020 0000000000008041
IRT[0004] 0000000000000020 0000000000020041
IRT[0005] 0000000000000020 0000000000080041
IRT[0006] 0000000000000020 0000000000200041
IRT[0007] 0000000000000020 0000000000800041
[...]
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
MMIO와 capability register 조회
1-34| 항목 | 내용 |
|---|---|
| Date | 2025년 1월 |
| Contact | Dheeraj Kumar Srivastava <[email protected]> |
| What | 설명 | 권한 |
|---|---|---|
| /sys/kernel/debug/iommu/amd/iommu<x>/mmio | 사용자가 iommu<x>의 MMIO register offset을 지정하면 해당 MMIO register 값을 출력합니다. | RW |
| /sys/kernel/debug/iommu/amd/iommu<x>/capability | 사용자가 iommu<x>의 capability register offset을 지정하면 해당 capability register 값을 출력합니다. | RW |
MMIO register 0x18을 조회하는 예입니다.
$ echo "0x18" > /sys/kernel/debug/iommu/amd/iommu00/mmio
$ cat /sys/kernel/debug/iommu/amd/iommu00/mmio
출력:
Offset:0x18 Value:0x000c22000003f48d
Capability register 0x10을 조회하는 예입니다.
$ echo "0x10" > /sys/kernel/debug/iommu/amd/iommu00/capability
$ cat /sys/kernel/debug/iommu/amd/iommu00/capability
출력:
Offset:0x10 Value:0x00203040
Command buffer entries
35-61| 항목 | 내용 |
|---|---|
| What | /sys/kernel/debug/iommu/amd/iommu<x>/cmdbuf |
| Date | 2025년 1월 |
| Contact | Dheeraj Kumar Srivastava <[email protected]> |
| Description | iommu<x> command buffer entries를 담은 읽기 전용 출력 file |
$ cat /sys/kernel/debug/iommu/amd/iommu<x>/cmdbuf
출력:
CMD Buffer Head Offset:339 Tail Offset:339
0: 00835001 10000001 00003c00 00000000
1: 00000000 30000005 fffff003 7fffffff
2: 00835001 10000001 00003c01 00000000
3: 00000000 30000005 fffff003 7fffffff
4: 00835001 10000001 00003c02 00000000
5: 00000000 30000005 fffff003 7fffffff
6: 00835001 10000001 00003c03 00000000
7: 00000000 30000005 fffff003 7fffffff
8: 00835001 10000001 00003c04 00000000
9: 00000000 30000005 fffff003 7fffffff
10: 00835001 10000001 00003c05 00000000
11: 00000000 30000005 fffff003 7fffffff
[...]
Device ID selector
63-92| 항목 | 내용 |
|---|---|
| What | /sys/kernel/debug/iommu/amd/devid |
| Date | 2025년 1월 |
| Contact | Dheeraj Kumar Srivastava <[email protected]> |
| Description | Device ID를 입력받는 읽기·쓰기 file. 선택한 ID는 interrupt remapping table과 device table 같은 IOMMU data structures를 dump할 때 사용합니다. |
Domain을 포함한 PCI BDF를 지정하는 첫 번째 예입니다.
$ echo 0000:01:00.0 > /sys/kernel/debug/iommu/amd/devid
$ cat /sys/kernel/debug/iommu/amd/devid
출력:
0000:01:00.0
Domain을 생략한 PCI BDF를 지정해도 출력에는 0000 domain이 포함됩니다.
$ echo 01:00.0 > /sys/kernel/debug/iommu/amd/devid
$ cat /sys/kernel/debug/iommu/amd/devid
출력:
0000:01:00.0
Device table과 interrupt remapping table
93-131| What | 설명 | 권한 |
|---|---|---|
| /sys/kernel/debug/iommu/amd/devtbl | /sys/kernel/debug/iommu/amd/devid에 지정한 device ID의 device table entry를 출력합니다. | RO |
| /sys/kernel/debug/iommu/amd/irqtbl | /sys/kernel/debug/iommu/amd/devid에 지정한 device ID의 유효한 IRT table entries를 출력합니다. | RO |
두 ABI 항목의 날짜는 2025년 1월이고 담당자는 Dheeraj Kumar Srivastava <[email protected]>입니다.
$ cat /sys/kernel/debug/iommu/amd/devtbl
Device table 출력:
DeviceId QWORD[3] QWORD[2] QWORD[1] QWORD[0] iommu
0000:01:00.0 0000000000000000 20000001373b8013 0000000000000038 6000000114d7b603 iommu3
$ cat /sys/kernel/debug/iommu/amd/irqtbl
Interrupt remapping table 출력:
DeviceId 0000:01:00.0
IRT[0000] 0000000000000020 0000000000000241
IRT[0001] 0000000000000020 0000000000000841
IRT[0002] 0000000000000020 0000000000002041
IRT[0003] 0000000000000020 0000000000008041
IRT[0004] 0000000000000020 0000000000020041
IRT[0005] 0000000000000020 0000000000080041
IRT[0006] 0000000000000020 0000000000200041
IRT[0007] 0000000000000020 0000000000800041
[...]
Register files에는 offset을, devid에는 PCI device ID를 먼저 쓴다. 이후 같은 file 또는 연관된 read-only dump file을 읽어 선택한 대상을 확인한다.
MMIO와 capability registers
debugfs-amd-iommu:1-34IOMMU instance의 MMIO 또는 capability register offset을 debugfs file에 쓰고 같은 file을 읽어 해당 register 값을 확인합니다.