Commit d8f37d29 authored by Marc Zyngier's avatar Marc Zyngier
Browse files

Merge branch 'kvm-arm64/ptp' into kvmarm-master/next



Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
parents bba8857f 127ce0b1
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -6737,3 +6737,13 @@ vcpu_info is set.
The KVM_XEN_HVM_CONFIG_RUNSTATE flag indicates that the runstate-related
features KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADDR/_CURRENT/_DATA/_ADJUST are
supported by the KVM_XEN_VCPU_SET_ATTR/KVM_XEN_VCPU_GET_ATTR ioctls.

8.31 KVM_CAP_PTP_KVM
--------------------

:Architectures: arm64

This capability indicates that the KVM virtual PTP service is
supported in the host. A VMM can check whether the service is
available to the guest on migration.
+1 −0
Original line number Diff line number Diff line
@@ -10,3 +10,4 @@ ARM
   hyp-abi
   psci
   pvtime
   ptp_kvm
+25 −0
Original line number Diff line number Diff line
.. 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_HYP_KVM_PTP_FUNC_ID: 0x86000001

This hypercall uses the SMC32/HVC32 calling convention:

ARM_SMCCC_HYP_KVM_PTP_FUNC_ID
    ==============    ========    =====================================
    Function ID:      (uint32)    0x86000001
    Arguments:        (uint32)    KVM_PTP_VIRT_COUNTER(0)
                                  KVM_PTP_PHYS_COUNTER(1)
    Return Values:    (int32)     NOT_SUPPORTED(-1) on error, or
                      (uint32)    Upper 32 bits of wall clock time (r0)
                      (uint32)    Lower 32 bits of wall clock time (r1)
                      (uint32)    Upper 32 bits of counter (r2)
                      (uint32)    Lower 32 bits of counter (r3)
    Endianness:                   No Restrictions.
    ==============    ========    =====================================
+3 −0
Original line number Diff line number Diff line
@@ -4,4 +4,7 @@

#include <asm/xen/hypervisor.h>

void kvm_init_hyp_services(void);
bool kvm_arm_hyp_service_available(u32 func_id);

#endif
+3 −0
Original line number Diff line number Diff line
@@ -4,4 +4,7 @@

#include <asm/xen/hypervisor.h>

void kvm_init_hyp_services(void);
bool kvm_arm_hyp_service_available(u32 func_id);

#endif
Loading