kvm: kvmclock: let KVM_GET_CLOCK return whether the master clock is in use
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 9 Nov 2016 16:48:15 +0000 (17:48 +0100)
committerRadim Krčmář <rkrcmar@redhat.com>
Sat, 19 Nov 2016 18:04:16 +0000 (19:04 +0100)
commite3fd9a93a12a1020067a676e826877623cee8e2b
treefcc53a18d286b78631e7764d6d8b948e355a1566
parent1650b4ebc99da4c137bfbfc531be4a2405f951dd
kvm: kvmclock: let KVM_GET_CLOCK return whether the master clock is in use

Userspace can read the exact value of kvmclock by reading the TSC
and fetching the timekeeping parameters out of guest memory.  This
however is brittle and not necessary anymore with KVM 4.11.  Provide
a mechanism that lets userspace know if the new KVM_GET_CLOCK
semantics are in effect, and---since we are at it---if the clock
is stable across all VCPUs.

Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Documentation/virtual/kvm/api.txt
arch/x86/kvm/x86.c
include/uapi/linux/kvm.h