요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
1
.. SPDX-License-Identifier: GPL-2.0
3
PTP_KVM support for arm/arm64
4
=============================
6
PTP_KVM is used for high precision time sync between host and guests.
7
It relies on transferring the wall clock and counter value from the
8
host to the guest using a KVM-specific hypercall.
10
``ARM_SMCCC_VENDOR_HYP_KVM_PTP_FUNC_ID``
11
----------------------------------------
13
Retrieve current time information for the specific counter. There are no
14
endianness restrictions.
16
+---------------------+-------------------------------------------------------+
17
| Presence: | Optional |
18
+---------------------+-------------------------------------------------------+
19
| Calling convention: | HVC32 |
20
+---------------------+----------+--------------------------------------------+
21
| Function ID: | (uint32) | 0x86000001 |
22
+---------------------+----------+----+---------------------------------------+
23
| Arguments: | (uint32) | R1 | ``KVM_PTP_VIRT_COUNTER (0)`` |
24
| | | +---------------------------------------+
25
| | | | ``KVM_PTP_PHYS_COUNTER (1)`` |
26
+---------------------+----------+----+---------------------------------------+
27
| Return Values: | (int32) | R0 | ``NOT_SUPPORTED (-1)`` on error, else |
28
| | | | upper 32 bits of wall clock time |
29
| +----------+----+---------------------------------------+
30
| | (uint32) | R1 | Lower 32 bits of wall clock time |
31
| +----------+----+---------------------------------------+
32
| | (uint32) | R2 | Upper 32 bits of counter |
33
| +----------+----+---------------------------------------+
34
| | (uint32) | R3 | Lower 32 bits of counter |
35
+---------------------+----------+----+---------------------------------------+
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
KVM PTP hypercall ABI
1-35PTP_KVM은 KVM-specific hypercall로 host의 wall clock과 counter 값을 guest에 함께 전달해 host와 guest 사이의 고정밀 time synchronization을 제공합니다. 반환값에는 endianness 제한이 없습니다.
항목값
PresenceOptional
Function ID`0x86000001`
R1 argument`KVM_PTP_VIRT_COUNTER (0)` 또는 `KVM_PTP_PHYS_COUNTER (1)`
R0오류 시 `NOT_SUPPORTED (-1)`, 성공 시 wall-clock 상위 32 bit
R1Wall-clock 하위 32 bit
R2Counter 상위 32 bit
R3Counter 하위 32 bit
선택한 counter에 대응하는 현재 wall-clock과 counter 값을 HVC32로 읽습니다.
Guest는 R0:R1을 조합해 64-bit wall-clock 값을, R2:R3을 조합해 같은 시점의 64-bit counter 값을 구성합니다. 요청할 counter 종류는 virtual 또는 physical 중 하나여야 합니다.
.. SPDX-License-Identifier: GPL-2.0
PTP_KVM support for arm/arm64
=============================
PTP_KVM is used for high precision time sync between host and guests.
It relies on transferring the wall clock and counter value from the
host to the guest using a KVM-specific hypercall.
``ARM_SMCCC_VENDOR_HYP_KVM_PTP_FUNC_ID``
----------------------------------------
Retrieve current time information for the specific counter. There are no
endianness restrictions.
+---------------------+-------------------------------------------------------+
| Presence: | Optional |
+---------------------+-------------------------------------------------------+
| Calling convention: | HVC32 |
+---------------------+----------+--------------------------------------------+
| Function ID: | (uint32) | 0x86000001 |
+---------------------+----------+----+---------------------------------------+
| Arguments: | (uint32) | R1 | ``KVM_PTP_VIRT_COUNTER (0)`` |
| | | +---------------------------------------+
| | | | ``KVM_PTP_PHYS_COUNTER (1)`` |
+---------------------+----------+----+---------------------------------------+
| Return Values: | (int32) | R0 | ``NOT_SUPPORTED (-1)`` on error, else |
| | | | upper 32 bits of wall clock time |
| +----------+----+---------------------------------------+
| | (uint32) | R1 | Lower 32 bits of wall clock time |
| +----------+----+---------------------------------------+
| | (uint32) | R2 | Upper 32 bits of counter |
| +----------+----+---------------------------------------+
| | (uint32) | R3 | Lower 32 bits of counter |
+---------------------+----------+----+---------------------------------------+
요약·해설
ptp_kvm.rst:1-35Host wall clock과 virtual·physical counter를 함께 전달해 host와 guest를 정밀 동기화하는 HVC32 ABI입니다.
API 이름, register, function ID, source path와 error code는 원문 표기를 유지했습니다.