aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2012-02-03 12:43:55 -0500
committerAvi Kivity <avi@redhat.com>2012-03-08 07:10:07 -0500
commitf1e2b26003c41e581243c09ceed7567677449468 (patch)
tree9c6dc330959815651611bf9636c401ba24cd6cd9 /arch/x86/kvm/vmx.c
parent6f526ec5383dcd5fa5ffc7b3ac1d62099a0b46ad (diff)
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>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index e6bf61fa1c03..575fb742a6fc 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1856,7 +1856,7 @@ static void vmx_write_tsc_offset(struct kvm_vcpu *vcpu, u64 offset)
1856 } 1856 }
1857} 1857}
1858 1858
1859static void vmx_adjust_tsc_offset(struct kvm_vcpu *vcpu, s64 adjustment) 1859static void vmx_adjust_tsc_offset(struct kvm_vcpu *vcpu, s64 adjustment, bool host)
1860{ 1860{
1861 u64 offset = vmcs_read64(TSC_OFFSET); 1861 u64 offset = vmcs_read64(TSC_OFFSET);
1862 vmcs_write64(TSC_OFFSET, offset + adjustment); 1862 vmcs_write64(TSC_OFFSET, offset + adjustment);