From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 3/8] KVM: Activate fpu on clts Date: Thu, 4 Feb 2010 15:11:25 +0200 Message-ID: <20100204131125.GF2471@redhat.com> References: <1264080712-3981-1-git-send-email-avi@redhat.com> <1264080712-3981-4-git-send-email-avi@redhat.com> <4B67DF6C.3000507@redhat.com> <4B6AC60D.5030905@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Paolo Bonzini , Marcelo Tosatti , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:45398 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751705Ab0BDNL1 (ORCPT ); Thu, 4 Feb 2010 08:11:27 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o14DBQHo005784 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 4 Feb 2010 08:11:27 -0500 Content-Disposition: inline In-Reply-To: <4B6AC60D.5030905@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Feb 04, 2010 at 03:05:17PM +0200, Avi Kivity wrote: > On 02/02/2010 10:16 AM, Paolo Bonzini wrote: > >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. > > How would this cause a null pointer access? > vmx.c doesn't initialize kvm_x86_ops->fpu_activate as far as I see. -- Gleb.