1a8cf291bSJianyong Wu /* SPDX-License-Identifier: GPL-2.0-or-later */ 2a8cf291bSJianyong Wu /* 3a8cf291bSJianyong Wu * Virtual PTP 1588 clock for use with KVM guests 4a8cf291bSJianyong Wu * 5a8cf291bSJianyong Wu * Copyright (C) 2017 Red Hat Inc. 6a8cf291bSJianyong Wu */ 7a8cf291bSJianyong Wu 8a8cf291bSJianyong Wu #ifndef _PTP_KVM_H_ 9a8cf291bSJianyong Wu #define _PTP_KVM_H_ 10a8cf291bSJianyong Wu 115f10376bSJakub Kicinski #include <linux/types.h> 125f10376bSJakub Kicinski 13a8cf291bSJianyong Wu struct timespec64; 14a8cf291bSJianyong Wu struct clocksource; 15a8cf291bSJianyong Wu 16a8cf291bSJianyong Wu int kvm_arch_ptp_init(void); 17*6365ba64SJeremi Piotrowski void kvm_arch_ptp_exit(void); 18a8cf291bSJianyong Wu int kvm_arch_ptp_get_clock(struct timespec64 *ts); 19a8cf291bSJianyong Wu int kvm_arch_ptp_get_crosststamp(u64 *cycle, 20a8cf291bSJianyong Wu struct timespec64 *tspec, struct clocksource **cs); 21a8cf291bSJianyong Wu 22a8cf291bSJianyong Wu #endif /* _PTP_KVM_H_ */ 23