2020-12-09 14:09:26 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/*
|
|
|
|
* Virtual PTP 1588 clock for use with KVM guests
|
|
|
|
*
|
|
|
|
* Copyright (C) 2017 Red Hat Inc.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _PTP_KVM_H_
|
|
|
|
#define _PTP_KVM_H_
|
|
|
|
|
2022-07-27 05:56:52 +08:00
|
|
|
#include <linux/types.h>
|
|
|
|
|
2020-12-09 14:09:26 +08:00
|
|
|
struct timespec64;
|
|
|
|
struct clocksource;
|
|
|
|
|
|
|
|
int kvm_arch_ptp_init(void);
|
2023-03-08 23:05:31 +08:00
|
|
|
void kvm_arch_ptp_exit(void);
|
2020-12-09 14:09:26 +08:00
|
|
|
int kvm_arch_ptp_get_clock(struct timespec64 *ts);
|
|
|
|
int kvm_arch_ptp_get_crosststamp(u64 *cycle,
|
|
|
|
struct timespec64 *tspec, struct clocksource **cs);
|
|
|
|
|
|
|
|
#endif /* _PTP_KVM_H_ */
|