From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/10] KVM: MMU: fix kvm_mmu_get_spte_hierarchy Date: Mon, 07 Mar 2011 10:55:12 +0200 Message-ID: <4D749D70.1020106@redhat.com> References: <4D70C569.1030107@cn.fujitsu.com> <4D70C597.4070105@cn.fujitsu.com> <20110305164805.GB4607@amt.cnet> <4D744BA5.5020607@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , LKML , KVM To: Xiao Guangrong Return-path: In-Reply-To: <4D744BA5.5020607@cn.fujitsu.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 03/07/2011 05:06 AM, Xiao Guangrong wrote: > We can get the large mapping pte in the loop: > > static bool shadow_walk_okay(struct kvm_shadow_walk_iterator *iterator) > { > if (iterator->level< PT_PAGE_TABLE_LEVEL) > return false; > > if (iterator->level == PT_PAGE_TABLE_LEVEL) > if (is_large_pte(*iterator->sptep)) > return false; > > ...... > } > > if level> 1 and pte.pse is set, it will return true. > > And, i think this judgment is useless: > if (iterator->level == PT_PAGE_TABLE_LEVEL) > if (is_large_pte(*iterator->sptep)) > return false; > since if level = 1, the pte bit7 is PAT. Right, the logic is inverted. I'll fix it up. -- error compiling committee.c: too many arguments to function