On Fri, Aug 23, 2013 at 12:00:46PM +0200, Paolo Bonzini wrote: > Il 22/08/2013 19:05, Paolo Bonzini ha scritto: > > Il 20/08/2013 20:20, Marcelo Tosatti ha scritto: > >> > >> The offset to add to the hosts monotonic time, kvmclock_offset, is > >> calculated against the monotonic time at KVM_SET_CLOCK ioctl time. > >> > >> Request a master clock update at this time, to reduce a potentially > >> unbounded difference between the values of the masterclock and > >> the clock value used to calculate kvmclock_offset. > >> > >> Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx> > >> > >> Index: linux-2.6-kvmclock-fixes/arch/x86/kvm/x86.c > >> =================================================================== > >> --- linux-2.6-kvmclock-fixes.orig/arch/x86/kvm/x86.c > >> +++ linux-2.6-kvmclock-fixes/arch/x86/kvm/x86.c > >> @@ -3806,6 +3806,7 @@ long kvm_arch_vm_ioctl(struct file *filp > >> delta = user_ns.clock - now_ns; > >> local_irq_enable(); > >> kvm->arch.kvmclock_offset = delta; > >> + kvm_gen_update_masterclock(kvm); > >> break; > >> } > >> case KVM_GET_CLOCK: { > > > > Reviewed-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> > > Actually, what commit is this patch based on? You are calling the > function at line 3799, but it is only declared at line 5786, and this > causes: > > /root/kvm-kmod/x86/x86.c: In function ‘kvm_arch_vm_ioctl’: > /root/kvm-kmod/x86/x86.c:3799:3: error: implicit declaration of function ‘kvm_gen_update_masterclock’ > /root/kvm-kmod/x86/x86.c: At top level: > /root/kvm-kmod/x86/x86.c:5786:13: warning: conflicting types for ‘kvm_gen_update_masterclock’ > /root/kvm-kmod/x86/x86.c:5786:13: error: static declaration of ‘kvm_gen_update_masterclock’ follows non-static declaration > /root/kvm-kmod/x86/x86.c:3799:3: note: previous implicit declaration of ‘kvm_gen_update_masterclock’ was here > > Paolo Wrong tree, my bad, sorry Paolo (sent v2). -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html