1 // SPDX-License-Identifier: GPL-2.0-only
3 * Virtual PTP 1588 clock for use with KVM guests
4 * Copyright (C) 2019 ARM Ltd.
8 #include <linux/arm-smccc.h>
9 #include <linux/ptp_kvm.h>
11 #include <asm/arch_timer.h>
12 #include <asm/hypervisor.h>
14 int kvm_arch_ptp_init(void)
18 ret = kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_PTP);
25 void kvm_arch_ptp_exit(void)
29 int kvm_arch_ptp_get_clock(struct timespec64 *ts)
31 return kvm_arch_ptp_get_crosststamp(NULL, ts, NULL);