1. 05 Mar, 2007 3 commits
    • Zachary Amsden's avatar
      [PATCH] vmi: cpu cycles fix · 1182d852
      Zachary Amsden authored
      
      In order to share the common code in tsc.c which does CPU Khz calibration, we
      need to make an accurate value of CPU speed available to the tsc.c code.  This
      value loses a lot of precision in a VM because of the timing differences with
      real hardware, but we need it to be as precise as possible so the guest can
      make accurate time calculations with the cycle counters.
      Signed-off-by: default avatarZachary Amsden <zach@vmware.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1182d852
    • Zachary Amsden's avatar
      [PATCH] vmi: sched clock paravirt op fix · 6cb9a835
      Zachary Amsden authored
      
      The custom_sched_clock hook is broken.  The result from sched_clock needs to
      be in nanoseconds, not in CPU cycles.  The TSC is insufficient for this
      purpose, because TSC is poorly defined in a virtual environment, and mostly
      represents real world time instead of scheduled process time (which can be
      interrupted without notice when a virtual machine is descheduled).
      
      To make the scheduler consistent, we must expose a different nature of time,
      that is scheduled time.  So deprecate this custom_sched_clock hack and turn it
      into a paravirt-op, as it should have been all along.  This allows the tsc.c
      code which converts cycles to nanoseconds to be shared by all paravirt-ops
      backends.
      
      It is unfortunate to add a new paravirt-op, but this is a very distinct
      abstraction which is clearly different for all virtual machine
      implementations, and it gets rid of an ugly indirect function which I
      ashamedly admit I hacked in to try to get this to work earlier, and then even
      got in the wrong units.
      Signed-off-by: default avatarZachary Amsden <zach@vmware.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6cb9a835
    • Zachary Amsden's avatar
      [PATCH] vmi: timer fixes round two · 7507ba34
      Zachary Amsden authored
      
      Critical bugfixes for the VMI-Timer code.
      
      1) Do not setup a one shot alarm if we are keeping the periodic alarm
         armed.  Additionally, since the periodic alarm can be run at a lower rate
         than HZ, let's fixup the guard to the no-idle-hz mode appropriately.  This
         fixes the bug where the no-idle-hz mode might have a higher interrupt rate
         than the non-idle case.
      
      2) The interrupt handler can no longer adjust xtime due to nested lock
         acquisition.  Drop this.  We don't need to check for wallclock time at
         every tick, it can be done in userspace instead.
      
      3) Add a bypass to disable noidle operation.  This is useful as a last
         minute workaround, or testing measure.
      
      4) The code to skip the IO_APIC timer testing (no_timer_check) should be
         conditional on IO_APIC, not SMP, since UP kernels can have this configured
         in as well.
      Signed-off-by: default avatarDan Hecht <dhecht@vmware.com>
      Signed-off-by: default avatarZachary Amsden <zach@vmware.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7507ba34
  2. 13 Feb, 2007 2 commits
    • Zachary Amsden's avatar
      [PATCH] i386: vMI timer patches · bbab4f3b
      Zachary Amsden authored
      
      VMI timer code.  It works by taking over the local APIC clock when APIC is
      configured, which requires a couple hooks into the APIC code.  The backend
      timer code could be commonized into the timer infrastructure, but there are
      some pieces missing (stolen time, in particular), and the exact semantics of
      when to do accounting for NO_IDLE need to be shared between different
      hypervisors as well.  So for now, VMI timer is a separate module.
      
      [Adrian Bunk: cleanups]
      
      Subject: VMI timer patches
      Signed-off-by: default avatarZachary Amsden <zach@vmware.com>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      bbab4f3b
    • Zachary Amsden's avatar
      [PATCH] i386: vMI backend for paravirt-ops · 7ce0bcfd
      Zachary Amsden authored
      
      Fairly straightforward implementation of VMI backend for paravirt-ops.
      
      [Adrian Bunk: some cleanups]
      Signed-off-by: default avatarZachary Amsden <zach@vmware.com>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      7ce0bcfd