1. 11 3月, 2014 5 次提交
  2. 04 3月, 2014 2 次提交
    • A
      x86: kvm: introduce periodic global clock updates · 332967a3
      Andrew Jones 提交于
      commit 0061d53d introduced a mechanism to execute a global clock
      update for a vm. We can apply this periodically in order to propagate
      host NTP corrections. Also, if all vcpus of a vm are pinned, then
      without an additional trigger, no guest NTP corrections can propagate
      either, as the current trigger is only vcpu cpu migration.
      Signed-off-by: NAndrew Jones <drjones@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      332967a3
    • A
      x86: kvm: rate-limit global clock updates · 7e44e449
      Andrew Jones 提交于
      When we update a vcpu's local clock it may pick up an NTP correction.
      We can't wait an indeterminate amount of time for other vcpus to pick
      up that correction, so commit 0061d53d introduced a global clock
      update. However, we can't request a global clock update on every vcpu
      load either (which is what happens if the tsc is marked as unstable).
      The solution is to rate-limit the global clock updates. Marcelo
      calculated that we should delay the global clock updates no more
      than 0.1s as follows:
      
      Assume an NTP correction c is applied to one vcpu, but not the other,
      then in n seconds the delta of the vcpu system_timestamps will be
      c * n. If we assume a correction of 500ppm (worst-case), then the two
      vcpus will diverge 50us in 0.1s, which is a considerable amount.
      Signed-off-by: NAndrew Jones <drjones@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7e44e449
  3. 03 3月, 2014 1 次提交
  4. 28 2月, 2014 3 次提交
  5. 27 2月, 2014 1 次提交
  6. 26 2月, 2014 3 次提交
  7. 24 2月, 2014 1 次提交
  8. 22 2月, 2014 3 次提交
  9. 18 2月, 2014 2 次提交
  10. 04 2月, 2014 1 次提交
  11. 30 1月, 2014 2 次提交
  12. 27 1月, 2014 1 次提交
  13. 24 1月, 2014 2 次提交
  14. 20 1月, 2014 1 次提交
  15. 17 1月, 2014 10 次提交
  16. 16 1月, 2014 1 次提交
  17. 15 1月, 2014 1 次提交
    • M
      KVM: x86: fix tsc catchup issue with tsc scaling · f25e656d
      Marcelo Tosatti 提交于
      To fix a problem related to different resolution of TSC and system clock,
      the offset in TSC units is approximated by
      
      delta = vcpu->hv_clock.tsc_timestamp 	- 	vcpu->last_guest_tsc
      
      (Guest TSC value at 			(Guest TSC value at last VM-exit)
      the last kvm_guest_time_update
      call)
      
      Delta is then later scaled using mult,shift pair found in hv_clock
      structure (which is correct against tsc_timestamp in that
      structure).
      
      However, if a frequency change is performed between these two points,
      this delta is measured using different TSC frequencies, but scaled using
      mult,shift pair for one frequency only.
      
      The end result is an incorrect delta.
      
      The bug which this code works around is not the only cause for
      clock backwards events. The global accumulator is still
      necessary, so remove the max_kernel_ns fix and rely on the
      global accumulator for no clock backwards events.
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      f25e656d