KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR
authorMarcelo Tosatti <mtosatti@redhat.com>
Thu, 28 May 2015 23:20:41 +0000 (20:20 -0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 29 May 2015 12:02:40 +0000 (14:02 +0200)
commitb7e60c5aedd2b63f16ef06fde4f81ca032211bc5
tree5ed2d58c9692d940077a9851c823d7aeedf22813
parent0ad83caa21bff9f383c10e73b452425709573042
KVM: x86: zero kvmclock_offset when vcpu0 initializes kvmclock system MSR

Initialize kvmclock base, on kvmclock system MSR write time,
so that the guest sees kvmclock counting from zero.

This matches baremetal behaviour when kvmclock in guest
sets sched clock stable.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
[Remove unnecessary comment. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c