From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Subject: Re: [PATCH 2/3] kvm: svm: reset cr0 properly on vcpu reset Date: Wed, 17 Mar 2010 19:17:32 +0100 Message-ID: <4BA11CBC.7060303@suse.de> References: <1256359800-16893-1-git-send-email-ehabkost@redhat.com> <1256359800-16893-3-git-send-email-ehabkost@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti , kvm@vger.kernel.org To: Eduardo Habkost Return-path: Received: from cantor2.suse.de ([195.135.220.15]:54046 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750794Ab0CQSRd (ORCPT ); Wed, 17 Mar 2010 14:17:33 -0400 In-Reply-To: <1256359800-16893-3-git-send-email-ehabkost@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Eduardo Habkost wrote: > svm_vcpu_reset() was not properly resetting the contents of the guest-visible > cr0 register, causing the following issue: > https://bugzilla.redhat.com/show_bug.cgi?id=525699 > > Without resetting cr0 properly, the vcpu was running the SIPI bootstrap routine > with paging enabled, making the vcpu get a pagefault exception while trying to > run it. > > Instead of setting vmcb->save.cr0 directly, the new code just resets > kvm->arch.cr0 and calls kvm_set_cr0(). The bits that were set/cleared on > vmcb->save.cr0 (PG, WP, !CD, !NW) will be set properly by svm_set_cr0(). > > kvm_set_cr0() is used instead of calling svm_set_cr0() directly to make sure > kvm_mmu_reset_context() is called to reset the mmu to nonpaging mode. > > Signed-off-by: Eduardo Habkost > Should this go into -stable? Alex