Re: [PATCH 3/8] KVM: Activate fpu on clts

Paolo Bonzini
2010-02-02T08:40:04Z

On 01/21/2010 02:31 PM, Avi Kivity wrote:
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index feca59f..09207ba 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -3266,6 +3266,7 @@ int emulate_invlpg(struct kvm_vcpu *vcpu, gva_t address)
> int emulate_clts(struct kvm_vcpu *vcpu)
> {
> kvm_x86_ops->set_cr0(vcpu, kvm_read_cr0_bits(vcpu, ~X86_CR0_TS));
> + kvm_x86_ops->fpu_activate(vcpu);
> return X86EMUL_CONTINUE;
> }

Can this code be reached if CLTS is executed in real mode? That would
cause a NULL-pointer access on VMX.

Paolo