lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 18 Jul 2010 17:30:38 +0300 From: Avi Kivity <avi@...hat.com> To: Zachary Amsden <zamsden@...hat.com> CC: KVM <kvm@...r.kernel.org>, Marcelo Tosatti <mtosatti@...hat.com>, Glauber Costa <glommer@...hat.com>, Linux-kernel <linux-kernel@...r.kernel.org> Subject: Re: [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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists