From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 3/8] KVM: Activate fpu on clts Date: Thu, 04 Feb 2010 15:05:17 +0200 Message-ID: <4B6AC60D.5030905@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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:60104 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750946Ab0BDNFV (ORCPT ); Thu, 4 Feb 2010 08:05:21 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o14D5Ljh008181 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 4 Feb 2010 08:05:21 -0500 In-Reply-To: <4B67DF6C.3000507@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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? -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.