]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Add helper functions for time computation
authorZachary Amsden <zamsden@redhat.com>
Fri, 20 Aug 2010 08:07:25 +0000 (22:07 -1000)
committerAvi Kivity <avi@redhat.com>
Sun, 24 Oct 2010 08:51:23 +0000 (10:51 +0200)
commitf4d37a2bda8fd61a749aed6c63b2893d66a2855e
treed20cf95eb9f65293baa4e42e360465a2fc606e8e
parentbf5c89994bc389f18b4d8a6f628f1ecb7bf13497
KVM: x86: Add helper functions for time computation

Add a helper function to compute the kernel time and convert nanoseconds
back to CPU specific cycles.  Note that these must not be called in preemptible
context, as that would mean the kernel could enter software suspend state,
which would cause non-atomic operation.

Also, convert the KVM_SET_CLOCK / KVM_GET_CLOCK ioctls to use the kernel
time helper, these should be bootbased as well.

Signed-off-by: Zachary Amsden <zamsden@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/x86.c