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``
11----------------------------------------
12
13Retrieve current time information for the specific counter. There are no
14endianness restrictions.
15
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+---------------------+----------+----+---------------------------------------+
36