From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH v2 2/8] KVM: nVMX: Fix up VM_ENTRY_IA32E_MODE control feature reporting Date: Tue, 6 Aug 2013 12:10:52 +0300 Message-ID: <20130806091052.GJ8218@redhat.com> References: <3f445212f8541a6029dbfa865773e66db1c90008.1375778397.git.jan.kiszka@web.de> 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]:2228 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754809Ab3HFJK5 (ORCPT ); Tue, 6 Aug 2013 05:10:57 -0400 Content-Disposition: inline In-Reply-To: <3f445212f8541a6029dbfa865773e66db1c90008.1375778397.git.jan.kiszka@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Aug 06, 2013 at 10:39:56AM +0200, Jan Kiszka wrote: > From: Jan Kiszka > > Do not report that we can enter the guest in 64-bit mode if the host is > 32-bit only. This is not supported by KVM. > > Signed-off-by: Jan Kiszka Reviewed-by: Gleb Natapov > --- > arch/x86/kvm/vmx.c | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index 773b54d..c810f9b 100644 > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -2212,9 +2212,13 @@ static __init void nested_vmx_setup_ctls_msrs(void) > /* If bit 55 of VMX_BASIC is off, bits 0-8 and 12 must be 1. */ > nested_vmx_entry_ctls_low = VM_ENTRY_ALWAYSON_WITHOUT_TRUE_MSR; > nested_vmx_entry_ctls_high &= > - VM_ENTRY_LOAD_IA32_PAT | VM_ENTRY_IA32E_MODE; > +#ifdef CONFIG_X86_64 > + VM_ENTRY_IA32E_MODE | > +#endif > + VM_ENTRY_LOAD_IA32_PAT; > nested_vmx_entry_ctls_high |= (VM_ENTRY_ALWAYSON_WITHOUT_TRUE_MSR | > VM_ENTRY_LOAD_IA32_EFER); > + > /* cpu-based controls */ > rdmsr(MSR_IA32_VMX_PROCBASED_CTLS, > nested_vmx_procbased_ctls_low, nested_vmx_procbased_ctls_high); > -- > 1.7.3.4 -- Gleb.