xref: /linux-6.15/include/linux/ptp_kvm.h (revision 5f10376b)
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*5f10376bSJakub Kicinski #include <linux/types.h>
12*5f10376bSJakub Kicinski 
13a8cf291bSJianyong Wu struct timespec64;
14a8cf291bSJianyong Wu struct clocksource;
15a8cf291bSJianyong Wu 
16a8cf291bSJianyong Wu int kvm_arch_ptp_init(void);
17a8cf291bSJianyong Wu int kvm_arch_ptp_get_clock(struct timespec64 *ts);
18a8cf291bSJianyong Wu int kvm_arch_ptp_get_crosststamp(u64 *cycle,
19a8cf291bSJianyong Wu 		struct timespec64 *tspec, struct clocksource **cs);
20a8cf291bSJianyong Wu 
21a8cf291bSJianyong Wu #endif /* _PTP_KVM_H_ */
22