From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH v3 03/13] nEPT: Add EPT tables support to paging_tmpl.h Date: Wed, 22 May 2013 09:16:49 +0300 Message-ID: <20130522061649.GK14287@redhat.com> References: <1368939152-11406-1-git-send-email-jun.nakajima@intel.com> <1368939152-11406-3-git-send-email-jun.nakajima@intel.com> <519B27AC.6090903@linux.vnet.ibm.com> <519B3095.5020209@linux.vnet.ibm.com> <20130521090102.GA4725@redhat.com> <519B54EF.80906@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Xiao Guangrong , "kvm@vger.kernel.org" , Paolo Bonzini To: "Nakajima, Jun" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:32958 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755369Ab3EVGQ6 (ORCPT ); Wed, 22 May 2013 02:16:58 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Tue, May 21, 2013 at 03:26:18PM -0700, Nakajima, Jun wrote: > On Tue, May 21, 2013 at 4:05 AM, Xiao Guangrong > wrote: > > On 05/21/2013 05:01 PM, Gleb Natapov wrote: > >> On Tue, May 21, 2013 at 04:30:13PM +0800, Xiao Guangrong wrote: > >>>>> @@ -772,6 +810,7 @@ static gpa_t FNAME(gva_to_gpa_nested)(struct kvm_vcpu *vcpu, gva_t vaddr, > >>>>> > >>>>> return gpa; > >>>>> } > >>>>> +#endif > >>>> > >>>> Strange! > >>>> > >>>> Why does nested ept not need these functions? How to emulate the instruction faulted on L2? > >>> > >>> Sorry, i misunderstood it. Have found the reason out. > >>> > >> You can write it down here for future reviewers :) > > > > Okay. > > > > The functions used to translate L2's gva to L1's gpa are paging32_gva_to_gpa_nested > > and paging64_gva_to_gpa_nested which are created by PTTYPE == 32 and PTTYPE == 64. > > > > > > Back to your comments on PT_MAX_FULL_LEVELS: > > + #ifdef CONFIG_X86_64 > > + #define PT_MAX_FULL_LEVELS 4 > > + #define CMPXCHG cmpxchg > > + #else > > + #define CMPXCHG cmpxchg64 > > + #define PT_MAX_FULL_LEVELS 2 > I don't think we need to support nEPT on 32-bit hosts. So, I plan to > remove such code. What do you think? > Why shouldn't we support nEPT on 32-bit hosts? -- Gleb.