xref: /linux/Documentation/virt/kvm/arm/ptp_kvm.rst (revision b83deaa741558babf4b8d51d34f6637ccfff1b26)
1.. SPDX-License-Identifier: GPL-2.0
2
3PTP_KVM support for arm/arm64
4=============================
5
6PTP_KVM is used for high precision time sync between host and guests.
7It relies on transferring the wall clock and counter value from the
8host to the guest using a KVM-specific hypercall.
9
10* ARM_SMCCC_VENDOR_HYP_KVM_PTP_FUNC_ID: 0x86000001
11
12This hypercall uses the SMC32/HVC32 calling convention:
13
14ARM_SMCCC_VENDOR_HYP_KVM_PTP_FUNC_ID
15    ==============    ========    =====================================
16    Function ID:      (uint32)    0x86000001
17    Arguments:        (uint32)    KVM_PTP_VIRT_COUNTER(0)
18                                  KVM_PTP_PHYS_COUNTER(1)
19    Return Values:    (int32)     NOT_SUPPORTED(-1) on error, or
20                      (uint32)    Upper 32 bits of wall clock time (r0)
21                      (uint32)    Lower 32 bits of wall clock time (r1)
22                      (uint32)    Upper 32 bits of counter (r2)
23                      (uint32)    Lower 32 bits of counter (r3)
24    Endianness:                   No Restrictions.
25    ==============    ========    =====================================
26