x86: kvmclock: add flag to indicate pvclock counts from zero
authorMarcelo Tosatti <mtosatti@redhat.com>
Thu, 28 May 2015 23:20:39 +0000 (20:20 -0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 29 May 2015 12:01:39 +0000 (14:01 +0200)
Setting sched clock stable for kvmclock causes the printk timestamps
to not start from zero, which is different from baremetal and
can possibly break userspace. Add a flag to indicate that
hypervisor sets clock base at zero when kvmclock is initialized.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/pvclock-abi.h

index 6167fd7981886228dc075f58901380be63ed87a7..655e07a48f6cfa9c09114108f7d8b4cb466fc705 100644 (file)
@@ -41,5 +41,6 @@ struct pvclock_wall_clock {
 
 #define PVCLOCK_TSC_STABLE_BIT (1 << 0)
 #define PVCLOCK_GUEST_STOPPED  (1 << 1)
+#define PVCLOCK_COUNTS_FROM_ZERO (1 << 2)
 #endif /* __ASSEMBLY__ */
 #endif /* _ASM_X86_PVCLOCK_ABI_H */