xref: /linux-6.15/include/linux/ptp_kvm.h (revision b152688c)
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 
119be3b2f0SPeter Hilber #include <linux/clocksource_ids.h>
125f10376bSJakub Kicinski #include <linux/types.h>
135f10376bSJakub Kicinski 
14a8cf291bSJianyong Wu struct timespec64;
15a8cf291bSJianyong Wu 
16a8cf291bSJianyong Wu int kvm_arch_ptp_init(void);
176365ba64SJeremi 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,
20*b152688cSPeter Hilber 		struct timespec64 *tspec, enum clocksource_ids *cs_id);
21a8cf291bSJianyong Wu 
22a8cf291bSJianyong Wu #endif /* _PTP_KVM_H_ */
23