요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
* Xen hypervisor device tree bindings
Xen ARM virtual platforms shall have a top-level "hypervisor" node with
the following properties:
- compatible:
compatible = "xen,xen-<version>", "xen,xen";
where <version> is the version of the Xen ABI of the platform.
- reg: specifies the base physical address and size of the regions in memory
where the special resources should be mapped to, using an HYPERVISOR_memory_op
hypercall.
Region 0 is reserved for mapping grant table, it must be always present.
The memory region is large enough to map the whole grant table (it is larger
or equal to gnttab_max_grant_frames()).
Regions 1...N are extended regions (unused address space) for mapping foreign
GFNs and grants, they might be absent if there is nothing to expose.
- interrupts: the interrupt used by Xen to inject event notifications.
A GIC node is also required.
To support UEFI on Xen ARM virtual platforms, Xen populates the FDT "uefi" node
under /hypervisor with following parameters:
________________________________________________________________________________
Name | Size | Description
================================================================================
xen,uefi-system-table | 64-bit | Guest physical address of the UEFI System
| | Table.
--------------------------------------------------------------------------------
xen,uefi-mmap-start | 64-bit | Guest physical address of the UEFI memory
| | map.
--------------------------------------------------------------------------------
xen,uefi-mmap-size | 32-bit | Size in bytes of the UEFI memory map
| | pointed to in previous entry.
--------------------------------------------------------------------------------
xen,uefi-mmap-desc-size | 32-bit | Size in bytes of each entry in the UEFI
| | memory map.
--------------------------------------------------------------------------------
xen,uefi-mmap-desc-ver | 32-bit | Version of the mmap descriptor format.
--------------------------------------------------------------------------------
Example (assuming #address-cells = <2> and #size-cells = <2>):
hypervisor {
compatible = "xen,xen-4.3", "xen,xen";
reg = <0 0xb0000000 0 0x20000>;
interrupts = <1 15 0xf08>;
uefi {
xen,uefi-system-table = <0xXXXXXXXX>;
xen,uefi-mmap-start = <0xXXXXXXXX>;
xen,uefi-mmap-size = <0xXXXXXXXX>;
xen,uefi-mmap-desc-size = <0xXXXXXXXX>;
xen,uefi-mmap-desc-ver = <0xXXXXXXXX>;
};
};
The format and meaning of the "xen,uefi-*" parameters are similar to those in
Documentation/arch/arm/uefi.rst, which are provided by the regular UEFI stub. However
they differ because they are provided by the Xen hypervisor, together with a set
of UEFI runtime services implemented via hypercalls, see
http://xenbits.xen.org/docs/unstable/hypercall/x86_64/include,public,platform.h.html.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Xen hypervisor 노드
1-21Xen hypervisor Device Tree 바인딩
Xen ARM 가상 플랫폼에는 top-level `hypervisor` 노드가 있어야 합니다. `compatible`은 `xen,xen-<version>`, `xen,xen` 순서이며 `<version>`은 플랫폼의 Xen ABI 버전입니다.
`reg`는 `HYPERVISOR_memory_op` hypercall로 특수 resource를 매핑할 memory 영역의 base physical address와 size를 지정합니다.
Region 0은 grant table 매핑용으로 예약되며 항상 있어야 합니다. 이 영역은 전체 grant table을 매핑할 만큼 커야 하므로 크기가 `gnttab_max_grant_frames()` 이상이어야 합니다.
Region 1부터 N까지는 foreign GFN과 grant를 매핑하는 확장 영역, 즉 사용하지 않는 주소 공간입니다. 노출할 것이 없으면 생략할 수 있습니다.
`interrupts`는 Xen이 event notification을 주입할 때 사용하는 interrupt입니다. GIC 노드도 필요합니다.
hypervisor 노드가 guest에 제공하는 memory와 event 경로입니다.
Xen UEFI 속성
22-42Xen ARM 가상 플랫폼에서 UEFI를 지원하기 위해 Xen은 `/hypervisor` 아래 FDT `uefi` 노드에 다음 매개변수를 채웁니다.
________________________________________________________________________________
Name | Size | Description
================================================================================
xen,uefi-system-table | 64-bit | Guest physical address of the UEFI System
| | Table.
--------------------------------------------------------------------------------
xen,uefi-mmap-start | 64-bit | Guest physical address of the UEFI memory
| | map.
--------------------------------------------------------------------------------
xen,uefi-mmap-size | 32-bit | Size in bytes of the UEFI memory map
| | pointed to in previous entry.
--------------------------------------------------------------------------------
xen,uefi-mmap-desc-size | 32-bit | Size in bytes of each entry in the UEFI
| | memory map.
--------------------------------------------------------------------------------
xen,uefi-mmap-desc-ver | 32-bit | Version of the mmap descriptor format.
--------------------------------------------------------------------------------
UEFI system table과 memory map 정보를 guest physical address 기준으로 전달합니다.
Xen 4.3 hypervisor 예와 UEFI 의미
43-62다음 예는 `#address-cells = <2>`와 `#size-cells = <2>`를 가정하고 Xen 4.3 ABI, grant table 영역, event interrupt와 UEFI 정보를 기술합니다.
hypervisor {
compatible = "xen,xen-4.3", "xen,xen";
reg = <0 0xb0000000 0 0x20000>;
interrupts = <1 15 0xf08>;
uefi {
xen,uefi-system-table = <0xXXXXXXXX>;
xen,uefi-mmap-start = <0xXXXXXXXX>;
xen,uefi-mmap-size = <0xXXXXXXXX>;
xen,uefi-mmap-desc-size = <0xXXXXXXXX>;
xen,uefi-mmap-desc-ver = <0xXXXXXXXX>;
};
};
`xen,uefi-*` 매개변수의 형식과 의미는 일반 UEFI stub이 제공하는 `Documentation/arch/arm/uefi.rst`의 값과 비슷합니다. 다만 이 값은 Xen hypervisor가 제공하며 hypercall로 구현한 UEFI runtime service 집합과 함께 사용된다는 점이 다릅니다.
관련 hypercall 정의는 `http://xenbits.xen.org/docs/unstable/hypercall/x86_64/include,public,platform.h.html`을 참조합니다.
요약과 해설
xen.txt:1-62top-level hypervisor 노드와 필수 grant table 영역, 선택적 확장 영역 및 UEFI memory map 속성을 설명합니다.