From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [patch 2/5] KVM: MMU: make for_each_shadow_entry aware of largepages Date: Wed, 10 Jun 2009 12:21:05 +0300 Message-ID: <4A2F7B01.90807@redhat.com> References: <20090609213009.436123773@amt.cnet> <20090609213312.750051328@amt.cnet> <4A2F7996.8020805@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, sheng.yang@intel.com To: Marcelo Tosatti Return-path: Received: from mx2.redhat.com ([66.187.237.31]:60137 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757494AbZFJJVF (ORCPT ); Wed, 10 Jun 2009 05:21:05 -0400 In-Reply-To: <4A2F7996.8020805@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > Marcelo Tosatti wrote: >> This way there is no need to add explicit checks in every >> for_each_shadow_entry user. >> >> Signed-off-by: Marcelo Tosatti >> >> Index: kvm/arch/x86/kvm/mmu.c >> =================================================================== >> --- kvm.orig/arch/x86/kvm/mmu.c >> +++ kvm/arch/x86/kvm/mmu.c >> @@ -1273,6 +1273,11 @@ static bool shadow_walk_okay(struct kvm_ >> { >> if (iterator->level < PT_PAGE_TABLE_LEVEL) >> return false; >> + >> + if (iterator->level == PT_PAGE_TABLE_LEVEL) >> + if (is_large_pte(*iterator->sptep)) >> + return false; >> >> > s/==/>/? > Ah, it's actually fine. But changing == to >= will make it 1GBpage-ready. -- error compiling committee.c: too many arguments to function