Re: KVM: x86: update masterclock when kvmclock_offset is calculated

2013-09-03 Thread Paolo Bonzini
Il 03/09/2013 05:03, Marcelo Tosatti ha scritto: Here is the code I was thinking of: spin_lock(ka-pvclock_gtod_sync_lock); make_all_cpus_request(kvm, KVM_REQ_CLOCK_UPDATE); /* * No guest entries from this point: VCPUs will be spinning * on

Re: KVM: x86: update masterclock when kvmclock_offset is calculated

2013-09-03 Thread Marcelo Tosatti
On Tue, Sep 03, 2013 at 12:42:40PM +0200, Paolo Bonzini wrote: Il 03/09/2013 05:03, Marcelo Tosatti ha scritto: Here is the code I was thinking of: spin_lock(ka-pvclock_gtod_sync_lock); make_all_cpus_request(kvm, KVM_REQ_CLOCK_UPDATE); /* * No guest entries from

Re: KVM: x86: update masterclock when kvmclock_offset is calculated

2013-09-03 Thread Paolo Bonzini
Il 03/09/2013 15:56, Marcelo Tosatti ha scritto: The point of REQ_MCLOCK_INPROGRESS request is to guarantee that the following is not possible: - 2 vcpus in guest mode with per-vcpu kvmclock areas with different {system_timestamp, tsc_offset} values. Understood. To achieve that: - Kick

Re: KVM: x86: update masterclock when kvmclock_offset is calculated

2013-09-02 Thread Marcelo Tosatti
On Wed, Aug 28, 2013 at 02:37:20PM +0200, Paolo Bonzini wrote: Il 28/08/2013 04:52, Marcelo Tosatti ha scritto: On Thu, Aug 22, 2013 at 07:05:20PM +0200, Paolo Bonzini wrote: Il 20/08/2013 20:20, Marcelo Tosatti ha scritto: The offset to add to the hosts monotonic time, kvmclock_offset,

Re: KVM: x86: update masterclock when kvmclock_offset is calculated

2013-08-28 Thread Paolo Bonzini
Il 28/08/2013 04:52, Marcelo Tosatti ha scritto: On Thu, Aug 22, 2013 at 07:05:20PM +0200, Paolo Bonzini wrote: 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

Re: KVM: x86: update masterclock when kvmclock_offset is calculated (v2)

2013-08-28 Thread Gleb Natapov
On Tue, Aug 27, 2013 at 11:55:29PM -0300, Marcelo Tosatti wrote: 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

Re: KVM: x86: update masterclock when kvmclock_offset is calculated

2013-08-27 Thread Marcelo Tosatti
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

Re: KVM: x86: update masterclock when kvmclock_offset is calculated

2013-08-27 Thread Marcelo Tosatti
On Thu, Aug 22, 2013 at 07:05:20PM +0200, Paolo Bonzini wrote: 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

KVM: x86: update masterclock when kvmclock_offset is calculated (v2)

2013-08-27 Thread Marcelo Tosatti
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

Re: KVM: x86: update masterclock when kvmclock_offset is calculated

2013-08-23 Thread Paolo Bonzini
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

Re: KVM: x86: update masterclock when kvmclock_offset is calculated

2013-08-22 Thread Paolo Bonzini
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

KVM: x86: update masterclock when kvmclock_offset is calculated

2013-08-20 Thread Marcelo Tosatti
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