요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/virtio/pci-iommu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: virtio-iommu device using the virtio-pci transport
maintainers:
- Jean-Philippe Brucker <jean-philippe@linaro.org>
description: |
When virtio-iommu uses the PCI transport, its programming interface is
discovered dynamically by the PCI probing infrastructure. However the
device tree statically describes the relation between IOMMU and DMA
masters. Therefore, the PCI root complex that hosts the virtio-iommu
contains a child node representing the IOMMU device explicitly.
DMA from the IOMMU device isn't managed by another IOMMU. Therefore the
virtio-iommu node doesn't have an "iommus" property, and is omitted from
the iommu-map property of the root complex.
allOf:
- $ref: /schemas/pci/pci-device.yaml#
properties:
# If compatible is present, it should contain the vendor and device ID
# according to the PCI Bus Binding specification. Since PCI provides
# built-in identification methods, compatible is not actually required.
compatible:
oneOf:
- items:
- const: virtio,pci-iommu
- const: pci1af4,1057
- items:
- const: pci1af4,1057
reg:
maxItems: 1
'#iommu-cells':
const: 1
required:
- compatible
- reg
- '#iommu-cells'
additionalProperties: false
examples:
- |
bus {
#address-cells = <2>;
#size-cells = <2>;
pcie@40000000 {
device_type = "pci";
#address-cells = <3>;
#size-cells = <2>;
reg = <0x0 0x40000000 0x0 0x1000000>;
ranges = <0x02000000 0x0 0x41000000 0x0 0x41000000 0x0 0x0f000000>;
/*
* The IOMMU manages all functions in this PCI domain except
* itself. Omit BDF 00:01.0.
*/
iommu-map = <0x0 &iommu0 0x0 0x8
0x9 &iommu0 0x9 0xfff7>;
/* The IOMMU programming interface uses slot 00:01.0 */
iommu0: iommu@1,0 {
compatible = "pci1af4,1057";
reg = <0x800 0 0 0 0>;
#iommu-cells = <1>;
};
};
pcie@50000000 {
device_type = "pci";
#address-cells = <3>;
#size-cells = <2>;
reg = <0x0 0x50000000 0x0 0x1000000>;
ranges = <0x02000000 0x0 0x51000000 0x0 0x51000000 0x0 0x0f000000>;
/*
* The IOMMU also manages all functions from this domain,
* with endpoint IDs 0x10000 - 0x1ffff
*/
iommu-map = <0x0 &iommu0 0x10000 0x10000>;
};
ethernet {
/* The IOMMU manages this platform device with endpoint ID 0x20000 */
iommus = <&iommu0 0x20000>;
};
};
...
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Virtio-PCI IOMMU
1-10GPL-2.0-only 또는 BSD-2-Clause로 배포되는 이 스키마는 virtio-pci transport를 사용하는 virtio-iommu device를 정의합니다. 관리자는 Jean-Philippe Brucker입니다.
동적 PCI 탐색과 정적 DMA 관계
11-25Virtio IOMMU의 programming interface는 PCI probing infrastructure가 동적으로 찾지만, Device Tree는 IOMMU와 DMA master의 관계를 정적으로 기술합니다. 따라서 Virtio IOMMU를 수용하는 PCI root complex에는 IOMMU device를 명시적으로 나타내는 child node가 있습니다.
IOMMU device 자체의 DMA는 다른 IOMMU가 관리하지 않습니다. 그러므로 Virtio IOMMU node에는 `iommus` property가 없고 root complex의 `iommu-map`에서도 자신을 제외합니다. 공통 PCI device 스키마를 상속합니다.
description: |
When virtio-iommu uses the PCI transport, its programming interface is
discovered dynamically by the PCI probing infrastructure. However the
device tree statically describes the relation between IOMMU and DMA
masters. Therefore, the PCI root complex that hosts the virtio-iommu
contains a child node representing the IOMMU device explicitly.
DMA from the IOMMU device isn't managed by another IOMMU. Therefore the
virtio-iommu node doesn't have an "iommus" property, and is omitted from
the iommu-map property of the root complex.
allOf:
- $ref: /schemas/pci/pci-device.yaml#
PCI ID, register와 IOMMU cell
26-50PCI 자체에 식별 기능이 있어 설명 주석상 compatible은 본질적으로 필요하지 않지만, 제공한다면 PCI Bus Binding에 따른 vendor·device ID를 포함해야 합니다. 허용 형식은 `virtio,pci-iommu`와 `pci1af4,1057`의 쌍 또는 PCI ID 단독입니다.
`reg`는 최대 한 항목이고 `#iommu-cells`는 1입니다. 스키마의 required 목록에는 compatible, reg, #iommu-cells가 있으며 추가 속성은 허용하지 않습니다.
properties:
# If compatible is present, it should contain the vendor and device ID
# according to the PCI Bus Binding specification. Since PCI provides
# built-in identification methods, compatible is not actually required.
compatible:
oneOf:
- items:
- const: virtio,pci-iommu
- const: pci1af4,1057
- items:
- const: pci1af4,1057
reg:
maxItems: 1
'#iommu-cells':
const: 1
required:
- compatible
- reg
- '#iommu-cells'
additionalProperties: false
첫 PCI domain과 IOMMU 자체 제외
51-78첫 PCI root complex의 `iommu-map`은 domain의 모든 function을 관리하되 Virtio IOMMU 자체가 사용하는 BDF `00:01.0`은 제외합니다. RID 0x0~0x7과 0x9부터 이어지는 범위를 IOMMU endpoint ID에 일대일 대응시킵니다.
IOMMU programming interface child는 slot `00:01.0`, PCI ID `pci1af4,1057`, encoded `reg = <0x800 0 0 0 0>`과 한 개의 IOMMU cell을 사용합니다.
examples:
- |
bus {
#address-cells = <2>;
#size-cells = <2>;
pcie@40000000 {
device_type = "pci";
#address-cells = <3>;
#size-cells = <2>;
reg = <0x0 0x40000000 0x0 0x1000000>;
ranges = <0x02000000 0x0 0x41000000 0x0 0x41000000 0x0 0x0f000000>;
/*
* The IOMMU manages all functions in this PCI domain except
* itself. Omit BDF 00:01.0.
*/
iommu-map = <0x0 &iommu0 0x0 0x8
0x9 &iommu0 0x9 0xfff7>;
/* The IOMMU programming interface uses slot 00:01.0 */
iommu0: iommu@1,0 {
compatible = "pci1af4,1057";
reg = <0x800 0 0 0 0>;
#iommu-cells = <1>;
};
};
두 번째 PCI domain과 platform endpoint
79-99두 번째 PCI domain의 모든 function은 endpoint ID `0x10000~0x1ffff`로 같은 IOMMU에 매핑됩니다. 별도의 platform Ethernet device는 `iommus = <&iommu0 0x20000>`으로 endpoint ID 0x20000을 사용합니다.
pcie@50000000 {
device_type = "pci";
#address-cells = <3>;
#size-cells = <2>;
reg = <0x0 0x50000000 0x0 0x1000000>;
ranges = <0x02000000 0x0 0x51000000 0x0 0x51000000 0x0 0x0f000000>;
/*
* The IOMMU also manages all functions from this domain,
* with endpoint IDs 0x10000 - 0x1ffff
*/
iommu-map = <0x0 &iommu0 0x10000 0x10000>;
};
ethernet {
/* The IOMMU manages this platform device with endpoint ID 0x20000 */
iommus = <&iommu0 0x20000>;
};
};
...
요약과 해설
pci-iommu.yaml:1-99Virtio PCI IOMMU의 정적 DMA 관계, RID mapping과 endpoint ID를 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, property, PCI BDF·RID, phandle, example, source path와 원문 줄 좌표를 원형대로 보존합니다.