KVM: Allow adjust_tsc_offset to be in host or guest cycles
Redefine the API to take a parameter indicating whether an adjustment is in host or guest cycles. Signed-off-by: Zachary Amsden <zamsden@gmail.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:

committed by
Avi Kivity

parent
6f526ec538
commit
f1e2b26003
@@ -1116,7 +1116,7 @@ static int kvm_guest_time_update(struct kvm_vcpu *v)
|
||||
if (vcpu->tsc_catchup) {
|
||||
u64 tsc = compute_guest_tsc(v, kernel_ns);
|
||||
if (tsc > tsc_timestamp) {
|
||||
kvm_x86_ops->adjust_tsc_offset(v, tsc - tsc_timestamp);
|
||||
adjust_tsc_offset_guest(v, tsc - tsc_timestamp);
|
||||
tsc_timestamp = tsc;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user