1. 30 11月, 2012 1 次提交
    • A
      KVM: Fix user memslot overlap check · 5419369e
      Alex Williamson 提交于
      Prior to memory slot sorting this loop compared all of the user memory
      slots for overlap with new entries.  With memory slot sorting, we're
      just checking some number of entries in the array that may or may not
      be user slots.  Instead, walk all the slots with kvm_for_each_memslot,
      which has the added benefit of terminating early when we hit the first
      empty slot, and skip comparison to private slots.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      5419369e
  2. 28 11月, 2012 2 次提交
    • M
      KVM: x86: add kvm_arch_vcpu_postcreate callback, move TSC initialization · 42897d86
      Marcelo Tosatti 提交于
      TSC initialization will soon make use of online_vcpus.
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      42897d86
    • M
      KVM: x86: implement PVCLOCK_TSC_STABLE_BIT pvclock flag · d828199e
      Marcelo Tosatti 提交于
      KVM added a global variable to guarantee monotonicity in the guest.
      One of the reasons for that is that the time between
      
      	1. ktime_get_ts(&timespec);
      	2. rdtscll(tsc);
      
      Is variable. That is, given a host with stable TSC, suppose that
      two VCPUs read the same time via ktime_get_ts() above.
      
      The time required to execute 2. is not the same on those two instances
      executing in different VCPUS (cache misses, interrupts...).
      
      If the TSC value that is used by the host to interpolate when
      calculating the monotonic time is the same value used to calculate
      the tsc_timestamp value stored in the pvclock data structure, and
      a single <system_timestamp, tsc_timestamp> tuple is visible to all
      vcpus simultaneously, this problem disappears. See comment on top
      of pvclock_update_vm_gtod_copy for details.
      
      Monotonicity is then guaranteed by synchronicity of the host TSCs
      and guest TSCs.
      
      Set TSC stable pvclock flag in that case, allowing the guest to read
      clock from userspace.
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      d828199e
  3. 14 11月, 2012 2 次提交
  4. 30 10月, 2012 1 次提交
  5. 23 10月, 2012 1 次提交
  6. 06 10月, 2012 1 次提交
  7. 18 9月, 2012 1 次提交
    • M
      KVM: make processes waiting on vcpu mutex killable · 9fc77441
      Michael S. Tsirkin 提交于
      vcpu mutex can be held for unlimited time so
      taking it with mutex_lock on an ioctl is wrong:
      one process could be passed a vcpu fd and
      call this ioctl on the vcpu used by another process,
      it will then be unkillable until the owner exits.
      
      Call mutex_lock_killable instead and return status.
      Note: mutex_lock_interruptible would be even nicer,
      but I am not sure all users are prepared to handle EINTR
      from these ioctls. They might misinterpret it as an error.
      
      Cleanup paths expect a vcpu that can't be used by
      any userspace so this will always succeed - catch bugs
      by calling BUG_ON.
      
      Catch callers that don't check return state by adding
      __must_check.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      9fc77441
  8. 06 9月, 2012 3 次提交
  9. 28 8月, 2012 1 次提交
  10. 27 8月, 2012 1 次提交
  11. 22 8月, 2012 7 次提交
  12. 06 8月, 2012 8 次提交
  13. 26 7月, 2012 2 次提交
  14. 23 7月, 2012 2 次提交
  15. 20 7月, 2012 3 次提交
  16. 19 7月, 2012 1 次提交
  17. 07 7月, 2012 1 次提交
  18. 04 7月, 2012 1 次提交
  19. 03 7月, 2012 1 次提交