From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 4/24] Allow setting the VMXE bit in CR4 Date: Tue, 15 Jun 2010 14:09:05 +0300 Message-ID: <20100615110905.GS21797@redhat.com> References: <1276431753-nyh@il.ibm.com> <201006131224.o5DCObeq012904@rice.haifa.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: avi@redhat.com, kvm@vger.kernel.org To: "Nadav Har'El" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:10444 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751829Ab0FOLJI (ORCPT ); Tue, 15 Jun 2010 07:09:08 -0400 Content-Disposition: inline In-Reply-To: <201006131224.o5DCObeq012904@rice.haifa.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Jun 13, 2010 at 03:24:37PM +0300, Nadav Har'El wrote: > This patch allows the guest to enable the VMXE bit in CR4, which is a > prerequisite to running VMXON. > > Signed-off-by: Nadav Har'El > --- > --- .before/arch/x86/kvm/x86.c 2010-06-13 15:01:28.000000000 +0300 > +++ .after/arch/x86/kvm/x86.c 2010-06-13 15:01:28.000000000 +0300 > @@ -501,7 +501,7 @@ int __kvm_set_cr4(struct kvm_vcpu *vcpu, > && !load_pdptrs(vcpu, vcpu->arch.cr3)) > return 1; > > - if (cr4 & X86_CR4_VMXE) > + if (cr4 & X86_CR4_VMXE && !nested) > return 1; > We shouldn't be able to clear X86_CR4_VMXE after VMXON. > kvm_x86_ops->set_cr4(vcpu, cr4); > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Gleb.