xref: /linux-6.15/include/linux/ptp_kvm.h (revision 9be3b2f0)
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 
11*9be3b2f0SPeter Hilber #include <linux/clocksource_ids.h>
125f10376bSJakub Kicinski #include <linux/types.h>
135f10376bSJakub Kicinski 
14a8cf291bSJianyong Wu struct timespec64;
15a8cf291bSJianyong Wu struct clocksource;
16a8cf291bSJianyong Wu 
17a8cf291bSJianyong Wu int kvm_arch_ptp_init(void);
186365ba64SJeremi Piotrowski void kvm_arch_ptp_exit(void);
19a8cf291bSJianyong Wu int kvm_arch_ptp_get_clock(struct timespec64 *ts);
20a8cf291bSJianyong Wu int kvm_arch_ptp_get_crosststamp(u64 *cycle,
21*9be3b2f0SPeter Hilber 		struct timespec64 *tspec, struct clocksource **cs,
22*9be3b2f0SPeter Hilber 		enum clocksource_ids *cs_id);
23a8cf291bSJianyong Wu 
24a8cf291bSJianyong Wu #endif /* _PTP_KVM_H_ */
25