]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - drivers/ptp/ptp_kvm_arm.c
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 int kvm_arch_ptp_get_clock(struct timespec64
*ts
)
27 return kvm_arch_ptp_get_crosststamp(NULL
, ts
, NULL
);