Right now there is only a pvclock_pvti_cpu0_va() which is defined
on kvmclock since:
commit dac16fba6fc5
("x86/vdso: Get pvclock data from the vvar VMA instead of the fixmap")
The only user of this interface so far is kvm. This commit adds a
setter function for the pvti page and moves pvclock_pvti_cpu0_va
to pvclock, which is a more generic place to have it; and would
allow other PV clocksources to use it, such as Xen.
Signed-off-by: Joao Martins <
joao.m.martins@oracle.com>
Acked-by: Andy Lutomirski <
luto@kernel.org>
---
Changes since v1:
* Rebased: the only conflict was that I had move the export
pvclock_pvti_cpu0_va() symbol as it is used by kvm PTP driver.
* Do not initialize pvti_cpu0_va to NULL (checkpatch error)
( Comments from Andy Lutomirski )
* Removed asm/pvclock.h 'pvclock_set_pvti_cpu0_va' definition
for non !PARAVIRT_CLOCK to better track screwed Kconfig stuff.
* Add his Acked-by (provided the previous adjustment was made)
Changes since RFC:
(Comments from Andy Lutomirski)
* Add __init to pvclock_set_pvti_cpu0_va
* Add WARN_ON(vclock_was_used(VCLOCK_PVCLOCK)) to
pvclock_set_pvti_cpu0_va
---
arch/x86/include/asm/pvclock.h | 19 ++++++++++---------
arch/x86/kernel/kvmclock.c | 7 +------
arch/x86/kernel/pvclock.c | 14 ++++++++++++++
3 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/arch/x86/include/asm/pvclock.h b/arch/x86/include/asm/pvclock.h index 448cfe1b48cf..6f228f90cdd7 100644
--- a/arch/x86/include/asm/pvclock.h
+++ b/arch/x86/include/asm/pv