lkml.org 
[lkml]   [2010]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 01/18] Make TSC offset writes non-preemptible
    On 07/13/2010 05:25 AM, Zachary Amsden wrote:
    >
    > +void guest_write_tsc(struct kvm_vcpu *vcpu, u64 data)
    > +{
    > + struct kvm *kvm = vcpu->kvm;
    > + u64 offset;
    > +
    > + spin_lock(&kvm->arch.tsc_write_lock);
    >

    Perhaps spin_lock_irq() for even more accuracy?

    spin_lock_irq_nmi_smi_hypervisor(), if you can find it.

    > + offset = data - native_read_tsc();
    > + kvm_x86_ops->write_tsc_offset(vcpu, offset);
    > + spin_unlock(&kvm->arch.tsc_write_lock);
    > +
    > + /* Reset of TSC must disable overshoot protection below */
    > + vcpu->arch.hv_clock.tsc_timestamp = 0;
    > +}
    > +EXPORT_SYMBOL_GPL(guest_write_tsc);
    > +
    >


    --
    error compiling committee.c: too many arguments to function



    \
     
     \ /
      Last update: 2010-07-18 16:35    [W:0.021 / U:2.124 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site