Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | #ifndef _ASM_X86_KVM_CLOCK_H |
| 3 | #define _ASM_X86_KVM_CLOCK_H |
| 4 | |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 5 | #include <linux/percpu.h> |
| 6 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 7 | extern struct clocksource kvm_clock; |
| 8 | |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 9 | DECLARE_PER_CPU(struct pvclock_vsyscall_time_info *, hv_clock_per_cpu); |
| 10 | |
| 11 | static inline struct pvclock_vcpu_time_info *this_cpu_pvti(void) |
| 12 | { |
| 13 | return &this_cpu_read(hv_clock_per_cpu)->pvti; |
| 14 | } |
| 15 | |
| 16 | static inline struct pvclock_vsyscall_time_info *this_cpu_hvclock(void) |
| 17 | { |
| 18 | return this_cpu_read(hv_clock_per_cpu); |
| 19 | } |
| 20 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 21 | #endif /* _ASM_X86_KVM_CLOCK_H */ |