From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH v4] KVM: nVMX: Replace kvm_set_cr0 with vmx_set_cr0 in load_vmcs12_host_state Date: Sun, 8 Sep 2013 11:57:41 +0300 Message-ID: <20130908085741.GB17294@redhat.com> References: <93ce2376292d9d6fc7a4f4d53919b0a07d4e7859.1375971992.git.jan.kiszka@siemens.com> <20130902082136.GM22899@redhat.com> <5224552D.3080700@siemens.com> <20130902093627.GO22899@redhat.com> <52262009.9090401@siemens.com> <20130903175544.GP10142@redhat.com> <52263471.5090906@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Paolo Bonzini , kvm , Xiao Guangrong , Jun Nakajima , Yang Zhang , Arthur Chunqi Li To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:13928 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751837Ab3IHI5u (ORCPT ); Sun, 8 Sep 2013 04:57:50 -0400 Content-Disposition: inline In-Reply-To: <52263471.5090906@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Sep 03, 2013 at 09:11:45PM +0200, Jan Kiszka wrote: > kvm_set_cr0 performs checks on the state transition that may prevent > loading L1's cr0. For now we rely on the hardware to catch invalid > states loaded by L1 into its VMCS. Still, consistency checks on the host > state part of the VMCS on guest entry will have to be improved later on. > > Signed-off-by: Jan Kiszka > --- > arch/x86/kvm/vmx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index 1f1da43..b43d1f8 100644 > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -8186,7 +8186,7 @@ static void load_vmcs12_host_state(struct kvm_vcpu *vcpu, > * fpu_active (which may have changed). > * Note that vmx_set_cr0 refers to efer set above. > */ > - kvm_set_cr0(vcpu, vmcs12->host_cr0); > + vmx_set_cr0(vcpu, vmcs12->host_cr0); > /* > * If we did fpu_activate()/fpu_deactivate() during L2's run, we need > * to apply the same changes to L1's vmcs. We just set cr0 correctly, For this one and 2,4,6 of the series: Reviewed-by: Gleb Natapov -- Gleb.