From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH] Fix to kvm_arch_vcpu_ioctl_set_sregs so that set_cr0 works properly Date: Wed, 6 Feb 2008 21:21:42 +0100 Message-ID: <20080206202142.GB6344@8bytes.org> References: <1DF02D2D-98D0-4695-A4A5-724A12616142@transitive.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Paul Knowles Return-path: Content-Disposition: inline In-Reply-To: <1DF02D2D-98D0-4695-A4A5-724A12616142-1LojSYAwM1QXQ3Lr6voeyA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org On Wed, Feb 06, 2008 at 11:02:35AM +0000, Paul Knowles wrote: > mmu_reset_needed |= vcpu->arch.cr0 != sregs->cr0; > - vcpu->arch.cr0 = sregs->cr0; > kvm_x86_ops->set_cr0(vcpu, sregs->cr0); Why should this fix anything? The vcpu->arch.cr0 is also set in kvm_x86_ops->set_cr0() aka vmx_set_cr0() and its not touched on the path to it? Btw, I think its very likely that you set an invalid guest state with your set_sregs ioctl (e.g. an impossible hardware register state). Starting a guest in PAE mode is basically working because otherwise live migration of PAE guests won't work. Joerg ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/