lkml.org 
[lkml]   [2015]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/12] KVM: x86: Move TSC scaling logic out of call-back adjust_tsc_offset()
On Mon, Sep 28, 2015 at 10:14:19PM +0200, Paolo Bonzini wrote:
>
>
> On 28/09/2015 07:38, Haozhong Zhang wrote:
> > +
> > +static inline void adjust_tsc_offset_guest(struct kvm_vcpu *vcpu,
> > + s64 adjustment)
> > +{
> > + kvm_x86_ops->adjust_tsc_offset(vcpu, adjustment, false);
> > +}
> > +
> > +static inline void adjust_tsc_offset_host(struct kvm_vcpu *vcpu, s64 adjustment)
> > +{
> > + if (vcpu->arch.tsc_scaling_ratio != kvm_default_tsc_scaling_ratio)
> > + WARN_ON(adjustment < 0);
> > + adjustment = kvm_scale_tsc(vcpu, (u64) adjustment);
> > + kvm_x86_ops->adjust_tsc_offset(vcpu, adjustment, true);
> > +}
>
> You can remove the final argument to the callback (and possibly change
> the callback's name to adjust_tsc_offset_guest), because it is now unused.
>
> Paolo

Thanks! will do it.

- Haozhong


\
 
 \ /
  Last update: 2015-09-29 04:01    [W:0.216 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site