Signed-off-by: Gerd Hoffmann [EMAIL PROTECTED]
---
arch/x86/Kconfig |4 +
arch/x86/kernel/Makefile |1 +
arch/x86/kernel/pvclock.c | 148 +
include/asm-x86/pvclock.h |6 ++
4 files changed, 159 insertions(+), 0 deletions(-)
The helper functions are intended to be used by both xen and kvm
paravirtual clock sources. Following patches of this series put
them into use. They are based on the xen code.
Cc: Jeremy Fitzhardinge [EMAIL PROTECTED]
Signed-off-by: Gerd Hoffmann [EMAIL PROTECTED]
---
arch/x86/Kconfig
Glauber Costa wrote:
This is not exactly what kvm does. For us, wallclock read and system
time reads are decoupled operations, controlled by different msrs.
Same for xen. Although both live in the shared_info page they are
updated independently (and the wall clock is updated much less
Signed-off-by: Gerd Hoffmann [EMAIL PROTECTED]
---
arch/x86/Kconfig |4 +
arch/x86/kernel/Makefile |1 +
arch/x86/kernel/pvclock.c | 146 +
include/asm-x86/pvclock.h |6 ++
4 files changed, 157 insertions(+), 0 deletions(-)
+void pvclock_read_wallclock(struct kvm_wall_clock *wall_clock,
+ struct kvm_vcpu_time_info *vcpu_time,
+ struct timespec *ts)
+{
+ u32 version;
+ u64 delta;
+ struct timespec now;
+
+ /* get wallclock at