Re: [PATCH] KVM: VMX: Fix clts

2010-01-25 Thread Marcelo Tosatti
On Sun, Jan 24, 2010 at 12:17:23PM +0200, Avi Kivity wrote: The simplistic clts implementation has a couple of flaws: - kvm_read_cr0_bits() is temporarily unsynchronized when vcpu-arch.cr0 changes - if the fpu is active, we need to clear GUEST_CR0.TS, not just CR_READ_SHADOW.TS, so that we

[PATCH] KVM: VMX: Fix clts

2010-01-24 Thread Avi Kivity
The simplistic clts implementation has a couple of flaws: - kvm_read_cr0_bits() is temporarily unsynchronized when vcpu-arch.cr0 changes - if the fpu is active, we need to clear GUEST_CR0.TS, not just CR_READ_SHADOW.TS, so that we don't send the guest an unexpected #NM. Fix by replacing custom