From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: Fix OSXSAVE after migration Date: Thu, 09 Dec 2010 12:04:16 +0200 Message-ID: <4D00A9A0.3030600@redhat.com> References: <1291776583-9979-1-git-send-email-sheng@linux.intel.com> <4CFF5F07.6080403@redhat.com> <201012090917.42363.sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org, stable@kernel.org To: Sheng Yang Return-path: Received: from mx1.redhat.com ([209.132.183.28]:34793 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752129Ab0LIKEV (ORCPT ); Thu, 9 Dec 2010 05:04:21 -0500 In-Reply-To: <201012090917.42363.sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/09/2010 03:17 AM, Sheng Yang wrote: > > > if (!is_long_mode(vcpu)&& is_pae(vcpu)) { > > > > > > load_pdptrs(vcpu, vcpu->arch.walk_mmu, vcpu->arch.cr3); > > > mmu_reset_needed = 1; > > > > We really should use kvm_set_crX() here. > > Yeah, I suppose we use ops->set_cr4() here because we don't need to all kinds of > check and operation for the value(which should already be done by other S/R code), > so I just add update_cpuid() here. > IIRC the reason is that there are ordering constraints for kvm_set_crX (and kvm_set_efer). We should do a kvm_set_crs() which sets them all at once. -- error compiling committee.c: too many arguments to function